Index: tests/test_hd_valves.py =================================================================== diff -u -r5239867d81fd373c44964081fa9a8a5a93d10ff6 -r32e628abcbbd3fd70866505d9f2836a6f732ef06 --- tests/test_hd_valves.py (.../test_hd_valves.py) (revision 5239867d81fd373c44964081fa9a8a5a93d10ff6) +++ tests/test_hd_valves.py (.../test_hd_valves.py) (revision 32e628abcbbd3fd70866505d9f2836a6f732ef06) @@ -1,14 +1,14 @@ ########################################################################### # -# Copyright (c) 2020-2022 Diality Inc. - All Rights Reserved. +# Copyright (c) 2020-2024 Diality Inc. - All Rights Reserved. # # THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN # WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. # # @file test_hd_valves.py # # @author (last) Dara Navaei -# @date (last) 07-Apr-2021 +# @date (last) 25-Apr-2023 # @author (original) Sean Nash # @date (original) 15-Oct-2020 # @@ -19,19 +19,28 @@ from dialin.hd.hemodialysis_device import HD from dialin.hd.valves import ValvesEnum from time import sleep +import os if __name__ == "__main__": # create an HD object called hd hd = HD() hd.cmd_log_in_to_hd() + address = os.path.join(os.getcwd(), "DVT-006-valves.log") + f = open(address, "w") + hd.valves.cmd_hd_valves_broadcast_interval_override(50) sleep(1) #hd.valves.cmd_home_hd_valve(ValvesEnum.VDI.value) + #hd.cmd_hd_set_operation_mode(2) + #sleep(1) + while True: - print(hd.valves.valves_status, hd.alarms.alarm_top) - sleep(0.05) + var = str(hd.valves.valves_status) + '\r' + print(var) + f.write(var) + sleep(0.5) """