Beispiel #1
0
 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
Beispiel #2
0
def write_log(s):
    if config.LOGGING and \
       s is not None:
        DriverStation.reportError(str(s) + "\n", False)
Beispiel #3
0
def write_message(s):
    DriverStation.reportError(str(s) + "\n", False)
Beispiel #4
0
def write_message(s):
    DriverStation.reportError(str(s) + "\n", False)
Beispiel #5
0
def write_log(s):
    if config.LOGGING and \
       s is not None:
        DriverStation.reportError(str(s) + "\n", False)