Index: tests/set_RTCs.py =================================================================== diff -u -rdd42e4d9cfe821b0a755ccc86cc1a4a2a3dd2f37 -r20659ffd56482b0596253aa0f1f1a7eda1221945 --- tests/set_RTCs.py (.../set_RTCs.py) (revision dd42e4d9cfe821b0a755ccc86cc1a4a2a3dd2f37) +++ tests/set_RTCs.py (.../set_RTCs.py) (revision 20659ffd56482b0596253aa0f1f1a7eda1221945) @@ -18,25 +18,23 @@ sys.path.append("..") from dialin.hd.hemodialysis_device import HD from dialin.dg.dialysate_generator import DG -from time import sleep from time import time from time import localtime if __name__ == "__main__": # create an HD object called hd - hd = HD() - # create a DG object called hd - dg = DG() - sleep(2) + hd = HD(log_level="DEBUG") - current_time_stamp = time() - current_time = localtime(current_time_stamp) - print(current_time) + if hd.cmd_log_in_to_hd(): + current_time_stamp = time() + current_time = localtime(current_time_stamp) + print(current_time) - hd.rtc.cmd_set_rtc_time_and_date(current_time.tm_sec, - current_time.tm_min, - current_time.tm_hour, - current_time.tm_mday, - current_time.tm_mon, - current_time.tm_year) - #TODO - set DG clock when supported + hd.rtc.cmd_set_rtc_time_and_date(current_time.tm_sec, + current_time.tm_min, + current_time.tm_hour, + current_time.tm_mday, + current_time.tm_mon, + current_time.tm_year) + print("Successfully set HD rtc") + #TODO - set DG clock when supported