Index: dialin/dg/hd_proxy.py =================================================================== diff -u -re979b3b8161d4232a93fd7c995e1aaeb690c1c6c -r032b28f8b9d38f680a91171b650462a44223843d --- dialin/dg/hd_proxy.py (.../hd_proxy.py) (revision e979b3b8161d4232a93fd7c995e1aaeb690c1c6c) +++ dialin/dg/hd_proxy.py (.../hd_proxy.py) (revision 032b28f8b9d38f680a91171b650462a44223843d) @@ -105,7 +105,8 @@ self.logger.debug("Timeout!!!!") return False - def cmd_drain(self, volume: int = 0, tare_load_cell: bool = False, rinse_concentrate_lines: bool = False ) -> int: + def cmd_drain(self, volume: int = 0, tare_load_cell: bool = False, rinse_conc_lines: bool = False, + start: int = 1) -> int: """ Constructs and sends the drain command. Constraints: @@ -114,14 +115,16 @@ @param volume: unsigned int - volume (in mL) to drain the inactive reservoir to. @param tare_load_cell: bool - flag indicates to tare load cell. - @param rinse_concentrate_lines: bool - flag indicates to whether rinse the concentrate lines or not + @param rinse_conc_lines: bool - flag indicates to whether rinse the concentrate lines or not. + @param start: int - start/stop drain command. The default is start = 1 @return: 1 if successful, zero otherwise """ vol = integer_to_bytearray(volume) tare = integer_to_bytearray(tare_load_cell) - rinse = integer_to_bytearray(rinse_concentrate_lines) - payload = vol + tare + rinse + rinse = integer_to_bytearray(rinse_conc_lines) + st = integer_to_bytearray(start) + payload = vol + tare + rinse + st message = DenaliMessage.build_message(channel_id=DenaliChannels.dialin_to_dg_ch_id, message_id=MsgIds.MSG_ID_DG_DRAIN_CMD.value, Index: tests/test_hd_dg_fans.py =================================================================== diff -u -r6b5600f056eff25cbb365fa6a5eefc4f5fad9360 -r032b28f8b9d38f680a91171b650462a44223843d --- tests/test_hd_dg_fans.py (.../test_hd_dg_fans.py) (revision 6b5600f056eff25cbb365fa6a5eefc4f5fad9360) +++ tests/test_hd_dg_fans.py (.../test_hd_dg_fans.py) (revision 032b28f8b9d38f680a91171b650462a44223843d) @@ -29,21 +29,28 @@ # Create an instance of the DG Class hd = HD(log_level='DEBUG') - dg = DG(log_level="DEBUG") + #dg = DG(log_level="DEBUG") - if hd.cmd_log_in_to_hd() == 0 or dg.cmd_log_in_to_dg() == 0: + if hd.cmd_log_in_to_hd() == 0: #or dg.cmd_log_in_to_dg() == 0: exit(1) #hd.fans.cmd_dg_fan_rpm_override(FansNames.FAN_INLET_1.value, 4000.0) #sleep(1) - hd.fans.cmd_dg_fan_rpm_override(FansNames.FAN_INLET_1.value, 4000, reset=1) - #hd.temperatures.cmd_hd_temperatures_value_override(HDTemperaturesNames.THERMISTOR_ONBOARD_NTC.value, 60.0) + #hd.fans.cmd_dg_fan_rpm_override(FansNames.FAN_INLET_1.value, 4000, reset=1) + test = 'THERMISTOR_ONBOARD_NTC' + test2 = HDTemperaturesNames.test + print(type(HDTemperaturesNames.THERMISTOR_ONBOARD_NTC.name), type(test2)) + hd.temperatures.cmd_hd_temperatures_value_override(HDTemperaturesNames.test2.value, 60.0, 1) #sleep(1) #hd.temperatures.cmd_hd_temperatures_value_override(HDTemperaturesNames.THERMISTOR_ONBOARD_NTC.value, 90.00, reset=1) while True: - fans = get_fans_info() - switches = get_hd_switches_info() + #fans = get_fans_info() + #switches = get_hd_switches_info() - print(fans + switches) + #print(fans + switches) sleep(1) + + test = hd.fans.get_fans_target_duty_cycle() + + print(test)