Index: dialin/common/msg_defs.py =================================================================== diff -u -r9fed7e633ffc4cf92a93e22ccff7d5aa078801ce -rdfa8befbb517c638f2813076b2dab2a5fb1fe3a2 --- dialin/common/msg_defs.py (.../msg_defs.py) (revision 9fed7e633ffc4cf92a93e22ccff7d5aa078801ce) +++ dialin/common/msg_defs.py (.../msg_defs.py) (revision dfa8befbb517c638f2813076b2dab2a5fb1fe3a2) @@ -64,8 +64,8 @@ MSG_ID_DG_HEATERS_DATA = 0x2C # DG broadcast of the heaters data MSG_ID_DG_TEMPERATURE_DATA = 0x2D # DG broadcast of the temperature sensors data MSG_ID_USER_UF_SETTINGS_CHANGE_CONFIRMATION_RESPONSE = 0x2E # HD response to user selection of ultrafiltration settings change option selection - MSG_ID_DG_START_STOP_HEAT_DISINFECT = 0x2F # HD request to start or stop DG heat disinfection - MSG_ID_SALINE_BOLUS_DATA = 0x30 # HD broadcast of saline bolus data + MSG_ID_SALINE_BOLUS_DATA = 0x2F # HD broadcast of saline bolus data + MSG_ID_DG_START_STOP_HEAT_DISINFECT = 0x30 # HD request to start or stop DG heat disinfection MSG_ID_DG_CONDUCTIVITY_DATA = 0x31 # DG broadcast of the conductivity sensors data MSG_ID_USER_REQUEST_ALARM_SILENCE = 0x32 # UI request alarm silence (or cancel) MSG_ID_HD_ACCELEROMETER_DATA = 0x33 # HD broadcast of accelerometer data Index: tests/test_saline_bolus.py =================================================================== diff -u -r65277463eda63686c6132b6716aaa997b6df1861 -rdfa8befbb517c638f2813076b2dab2a5fb1fe3a2 --- tests/test_saline_bolus.py (.../test_saline_bolus.py) (revision 65277463eda63686c6132b6716aaa997b6df1861) +++ tests/test_saline_bolus.py (.../test_saline_bolus.py) (revision dfa8befbb517c638f2813076b2dab2a5fb1fe3a2) @@ -23,26 +23,25 @@ if __name__ == "__main__": # create an HD object called hd hd = HD() - sleep(2) - # log in to HD as tester -# if hd.cmd_log_in_to_hd() == 0: -# exit(1) -# sleep(1) - - for x in range(30): + # print params every second for a while + for x in range(300): sleep(1) hdmod = hd.hd_operation_mode hdsub = hd.hd_operation_sub_mode + trtim = hd.treatment.get_treatment_time_elapsed() ufmod = hd.treatment.get_treatment_uf_state() sbmod = hd.treatment.get_saline_bolus_state() mxvol = hd.treatment.get_saline_bolus_max_volume() cmvol = hd.treatment.get_saline_bolus_cumulative_volume_delivered() bovol = hd.treatment.get_saline_bolus_volume_delivered() - print(x, hdmod, hdsub, ufmod, sbmod, mxvol, cmvol, bovol) + print(x, hdmod, hdsub, trtim, ufmod, sbmod, mxvol, cmvol, bovol) + # exit here unless you want to trigger a saline bolus from here + exit(1) + # send saline bolus request hd.ui.cmd_ui_request_saline_bolus(True) - + # continue showing params every second for x in range(60): sleep(1) hdmod = hd.hd_operation_mode