def __check_device_id(self) -> bool: raw = list() if self.__m_i2c.read(self.Register.K_PART_ID.value, 1, raw): DriverStation.reportError("Could not find REV color sensor", False) return False if self.__K_PART_ID != raw[0]: DriverStation.reportError( "Unknown device found with same I2C address as REV color sensor", False) return False return True
def write_log(s): if config.LOGGING and \ s is not None: DriverStation.reportError(str(s) + "\n", False)
def write_message(s): DriverStation.reportError(str(s) + "\n", False)