def check_versions(self): self.get_firmware_version() self.get_hardware_version() if compare_semver(MINIMUM_FIRMWARE_VERSION, self.firmware_version) == 1: raise APIError('Incompatible firmware version. Please check for an update using the Communicator') elif self.hardware_version[0] != '2': raise APIError('Incompatible hardware version.')
def check_features(self): if self.hardware_version == '2.0': self.encoder_toggle_supported = \ not (compare_semver(ENCODER_MOVE_TOGGLE_MINIMUM_FIRMWARE_VERSION, self.firmware_version) == 1)