Index: leahi_dialin/td/modules/air_trap.py =================================================================== diff -u -rdf2b51a17a2ccdaf3587f631de7623fa7fcae624 -reb02c56e88faeeda46ed62b1c0ec841dca0b9aba --- leahi_dialin/td/modules/air_trap.py (.../air_trap.py) (revision df2b51a17a2ccdaf3587f631de7623fa7fcae624) +++ leahi_dialin/td/modules/air_trap.py (.../air_trap.py) (revision eb02c56e88faeeda46ed62b1c0ec841dca0b9aba) @@ -234,7 +234,7 @@ vlv = integer_to_bytearray(valve) sts = integer_to_bytearray(valve_state) - payload = vlv + sts + payload = sts + vlv message = DenaliMessage.build_message(channel_id=DenaliChannels.dialin_to_td_ch_id, message_id=MsgIds.MSG_ID_TD_2_WAY_VALVE_SET_STATE_REQUEST.value, @@ -245,34 +245,7 @@ # If there is content... if received_message is not None: # response payload is OK or not OK - self.logger.debug("Air trap valve " + str(valve) + " set to " + str(valve_state)) return received_message['message'][DenaliMessage.PAYLOAD_START_INDEX] else: self.logger.debug("timeout!!") return False - - def cmd_set_td_air_trap_control(self, control: int = 0) -> int: - """ - Constructs and sends a set control command to the TD air trap. - - @param control: start/stop for air trap control (0=stop, 1=start) - @returns 1 if successful, zero otherwise - """ - - ctl = integer_to_bytearray(control) - payload = ctl - - message = DenaliMessage.build_message(channel_id=DenaliChannels.dialin_to_td_ch_id, - message_id=MsgIds.MSG_ID_TD_SET_AIR_TRAP_CONTROL.value, - payload=payload) - # Send message - received_message = self.can_interface.send(message) - - # If there is content... - if received_message is not None: - # response payload is OK or not OK - self.logger.debug("Air trap control set to " + str(control)) - return received_message['message'][DenaliMessage.PAYLOAD_START_INDEX] - else: - self.logger.debug("timeout!!") - return False \ No newline at end of file