Index: leahi_dialin/td/modules/air_pump.py =================================================================== diff -u -rd1377c677d8a9fc576f941f413ae3b6af6f50776 -rb0d9d887e826ed5f1acd355f0c568822412bf1bb --- leahi_dialin/td/modules/air_pump.py (.../air_pump.py) (revision d1377c677d8a9fc576f941f413ae3b6af6f50776) +++ leahi_dialin/td/modules/air_pump.py (.../air_pump.py) (revision b0d9d887e826ed5f1acd355f0c568822412bf1bb) @@ -68,31 +68,23 @@ self.h12_air_pump_power = app[0] self.td_air_pump_timestamp = timestamp - def cmd_air_pump_set_state(self, state: int, power: int) -> int: + def cmd_air_pump_set_state(self, power: int) -> int: """ Constructs and sends the air pump set state command. - AIR_PUMP_STATE_INIT = 0, ///< Air Pump Initialize state - AIR_PUMP_STATE_OFF, ///< Air Pump Off state - AIR_PUMP_STATE_ON, ///< Air Pump On state - NUM_OF_AIR_PUMP_STATES, ///< Number of air pump states Constraints: Must be logged into TD. - @param state: integer - state value to set the air pump @param power: integer - 0-255 value to set the air pump power @return: 1 if successful, zero otherwise """ - idx = integer_to_bytearray(state) pwr = integer_to_bytearray(power) - payload = idx + pwr + payload = pwr message = DenaliMessage.build_message(channel_id=DenaliChannels.dialin_to_td_ch_id, message_id=MsgIds.MSG_ID_TD_AIR_PUMP_SET_STATE_REQUEST.value, payload=payload) - self.logger.debug("setting air pump state to" + str(state)) - # Send message received_message = self.can_interface.send(message)