Index: tests/test_hd_valves.py =================================================================== diff -u -r46fb3f18ae1a349eeb8bcc56d243618737ae3279 -r32e628abcbbd3fd70866505d9f2836a6f732ef06 --- tests/test_hd_valves.py (.../test_hd_valves.py) (revision 46fb3f18ae1a349eeb8bcc56d243618737ae3279) +++ tests/test_hd_valves.py (.../test_hd_valves.py) (revision 32e628abcbbd3fd70866505d9f2836a6f732ef06) @@ -1,16 +1,16 @@ ########################################################################### # -# Copyright (c) 2019-2020 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 +# @file test_hd_valves.py # -# @author (last) Sean Nash -# @date (last) 15-Oct-2020 -# @author (original) Sean Nash -# @date (original) 15-Oct-2020 +# @author (last) Dara Navaei +# @date (last) 25-Apr-2023 +# @author (original) Sean Nash +# @date (original) 15-Oct-2020 # ############################################################################ @@ -19,16 +19,30 @@ 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.name) + #hd.valves.cmd_home_hd_valve(ValvesEnum.VDI.value) + #hd.cmd_hd_set_operation_mode(2) + #sleep(1) + + while True: + var = str(hd.valves.valves_status) + '\r' + print(var) + f.write(var) + sleep(0.5) + + """ # print params every second for a while while True: