Index: leahi_dialin/td/modules/air_trap.py =================================================================== diff -u -rd0d72ba74208cb43073ec38c7bbfebb2d32dcc66 -rb4e77cdb95bebe6ba3fc49c2389d7e6127a81e9c --- leahi_dialin/td/modules/air_trap.py (.../air_trap.py) (revision d0d72ba74208cb43073ec38c7bbfebb2d32dcc66) +++ leahi_dialin/td/modules/air_trap.py (.../air_trap.py) (revision b4e77cdb95bebe6ba3fc49c2389d7e6127a81e9c) @@ -115,16 +115,12 @@ Constructs and sends the air trap level sensor override command Constraints: Must be logged into TD. - Given sensor must be one of the sensors listed below. @param sensor: unsigned int - sensor ID - @param detected: unsigned int - detected (0=air, 1=fluid) to override sensor with + @param detected: unsigned int - detected to override sensor with @param reset: integer - 1 to reset a previous override, 0 to override @return: 1 if successful, zero otherwise - Air trap sensor IDs: \n - 0 = Lower level \n - 1 = Upper level \n """ rst = integer_to_bytearray(reset) @@ -154,16 +150,12 @@ Constructs and sends the raw air trap level sensor override command Constraints: Must be logged into TD. - Given sensor must be one of the sensors listed below. @param sensor: unsigned int - sensor ID @param detected: unsigned int - detected (0=air, 1=fluid) to override sensor with @param reset: integer - 1 to reset a previous override, 0 to override @return: 1 if successful, zero otherwise - Air trap sensor IDs: \n - 0 = Lower level \n - 1 = Upper level \n """ rst = integer_to_bytearray(reset) @@ -230,12 +222,12 @@ self.logger.debug("Timeout!!!!") return False - def cmd_set_td_air_trap_valve(self, valve: int = AirTrapValves.VBT.value, + def cmd_set_td_air_trap_valve(self, valve: int = AirTrapValves.H13_VALV.value, valve_state: int = AirTrapState.STATE_CLOSED.value) -> int: """ - Constructs and sends an open/close command to the TD air trap valve + Constructs and sends an open/close command to the TD air trap valves. - @param valve: air trap valve ID ( VBT = 0 ) + @param valve: air trap valve ID @param valve_state: air trap valve state (open or close) @returns 1 if successful, zero otherwise """ @@ -252,9 +244,8 @@ # If there is content... if received_message is not None: - self.logger.debug("Opening air trap valve") # response payload is OK or not OK return received_message['message'][DenaliMessage.PAYLOAD_START_INDEX] else: - self.logger.debug("Opening air trap valve timeout!!") + self.logger.debug("timeout!!") return False