Index: dialin/dg/chemical_disinfect.py =================================================================== diff -u -r3a70bfb451b74106348c064c34f19934aadd9119 -rc3fa0bd1ad54dddd9f7faee36d806961959f362c --- dialin/dg/chemical_disinfect.py (.../chemical_disinfect.py) (revision 3a70bfb451b74106348c064c34f19934aadd9119) +++ dialin/dg/chemical_disinfect.py (.../chemical_disinfect.py) (revision c3fa0bd1ad54dddd9f7faee36d806961959f362c) @@ -64,7 +64,7 @@ self.can_interface.register_receiving_publication_function(channel_id, msg_id, self._handler_chemical_disinfect_to_ui_sync) - @publish(["chemical_disinfect_elapsed_time"]) + @publish(["chemical_disinfect_elapsed_time", "chemical_disinfect_target_time"]) def _handler_chemical_disinfect_to_ui_sync(self, message): """ Handles published chemical disinfect message @@ -78,7 +78,7 @@ message['message'][MsgFieldPositions.START_POS_FIELD_2:MsgFieldPositions.END_POS_FIELD_2]))[0] self.chemical_disinfect_target_time = int(disinfect_target_time / 1000) - self.chemical_disinfect_target_time = int(disinfect_elapsed_time / 1000) + self.chemical_disinfect_elapsed_time = int(disinfect_elapsed_time / 1000) @publish(["chemical_disinfect_state", "overall_elapsed_time", "state_elapsed_time", "cancellation_mode", "r1_level", "r2_level", "target_post_rinse_count", "current_post_rinse_count", Index: dialin/dg/fans.py =================================================================== diff -u -r6a6230aa286637776e8eddd840f8ec704f959cc3 -rc3fa0bd1ad54dddd9f7faee36d806961959f362c --- dialin/dg/fans.py (.../fans.py) (revision 6a6230aa286637776e8eddd840f8ec704f959cc3) +++ dialin/dg/fans.py (.../fans.py) (revision c3fa0bd1ad54dddd9f7faee36d806961959f362c) @@ -208,7 +208,7 @@ Constraints: Must be logged into DG. - @param time: (int) time offset in seconds + @param time: (int) time offset in milliseconds @return: 1 if successful, zero otherwise """ payload = integer_to_bytearray(time) Index: dialin/dg/switches.py =================================================================== diff -u -r3a70bfb451b74106348c064c34f19934aadd9119 -rc3fa0bd1ad54dddd9f7faee36d806961959f362c --- dialin/dg/switches.py (.../switches.py) (revision 3a70bfb451b74106348c064c34f19934aadd9119) +++ dialin/dg/switches.py (.../switches.py) (revision c3fa0bd1ad54dddd9f7faee36d806961959f362c) @@ -35,7 +35,6 @@ class DGSwitchesName(DialinEnum): CONCENTRATE_CAP = 0 DIALYSATE_CAP = 1 - FLUID_DOOR = 2 class DGSwitches(AbstractSubSystem): @@ -59,8 +58,7 @@ self.can_interface.register_receiving_publication_function(channel_id, msg_id, self._handler_switches_sync) self.dg_switches_status = {DGSwitchesName.CONCENTRATE_CAP.name: DGSwitchStatus.CLOSED.value, - DGSwitchesName.DIALYSATE_CAP.name: DGSwitchStatus.CLOSED.value, - DGSwitchesName.FLUID_DOOR.name: DGSwitchStatus.CLOSED.value} + DGSwitchesName.DIALYSATE_CAP.name: DGSwitchStatus.CLOSED.value} def get_switches_status(self) -> dict: """ @@ -83,12 +81,9 @@ message['message'][MsgFieldPositions.START_POS_FIELD_1:MsgFieldPositions.END_POS_FIELD_1]))[0] dialysate_cap = struct.unpack('i', bytearray( message['message'][MsgFieldPositions.START_POS_FIELD_2:MsgFieldPositions.END_POS_FIELD_2]))[0] - fluid_door = struct.unpack('i', bytearray( - message['message'][MsgFieldPositions.START_POS_FIELD_3:MsgFieldPositions.END_POS_FIELD_3]))[0] self.dg_switches_status[DGSwitchesName.CONCENTRATE_CAP.name] = DGSwitchStatus(conc_cap).value self.dg_switches_status[DGSwitchesName.DIALYSATE_CAP.name] = DGSwitchStatus(dialysate_cap).value - self.dg_switches_status[DGSwitchesName.FLUID_DOOR.name] = DGSwitchStatus(fluid_door).value def cmd_dg_switch_status_override(self, switch: int, status: int, reset: int = NO_RESET) -> int: """ Index: dialin/hd/fans.py =================================================================== diff -u -r6a6230aa286637776e8eddd840f8ec704f959cc3 -rc3fa0bd1ad54dddd9f7faee36d806961959f362c --- dialin/hd/fans.py (.../fans.py) (revision 6a6230aa286637776e8eddd840f8ec704f959cc3) +++ dialin/hd/fans.py (.../fans.py) (revision c3fa0bd1ad54dddd9f7faee36d806961959f362c) @@ -149,7 +149,7 @@ Constraints: Must be logged into HD. - @param time: (int) time offset in seconds + @param time: (int) time offset in milliseconds @return: 1 if successful, zero otherwise """ payload = integer_to_bytearray(time) Index: tests/dg_tests.py =================================================================== diff -u -r6052189ad455e04a98d23cff2ded8e0fee8b3edf -rc3fa0bd1ad54dddd9f7faee36d806961959f362c --- tests/dg_tests.py (.../dg_tests.py) (revision 6052189ad455e04a98d23cff2ded8e0fee8b3edf) +++ tests/dg_tests.py (.../dg_tests.py) (revision c3fa0bd1ad54dddd9f7faee36d806961959f362c) @@ -44,14 +44,15 @@ def get_chemical_disinfect_mode_info(): info = ('State, {}, Overall_elapsed_time, {}, State_elapsed_time, {}, Disinfect_elapsed_time, {}, ' 'Cancellation_mode, {}, R1_level, {:5.3f}, R2_level, {:5.3f}, Current_rinse_count, {}, ' - 'Total_rinse_count, {}, UI_state, {}, ' + 'Total_rinse_count, {}, UI_state, {}, Top_alarm, {}, ' .format(DGChemicalDisinfectStates(dg.chemical_disinfect.chemical_disinfect_state).name, dg.chemical_disinfect.overall_elapsed_time, dg.chemical_disinfect.state_elapsed_time, dg.chemical_disinfect.chemical_disinfect_elapsed_time, ChemCancellationModes(dg.chemical_disinfect.cancellation_mode).name, dg.chemical_disinfect.r1_level, dg.chemical_disinfect.r2_level, dg.chemical_disinfect.current_post_rinse_count, dg.chemical_disinfect.target_post_rinse_count, - DGChemDisinfectUIStates(dg.chemical_disinfect.chemical_disinfect_ui_state).name)) + DGChemDisinfectUIStates(dg.chemical_disinfect.chemical_disinfect_ui_state).name, + hd.alarms.alarm_top)) return info @@ -556,13 +557,13 @@ # run_heat_disinfect() - # run_chemical_disinfect() + run_chemical_disinfect() # run_dg() # cmd_set_disinfect_ui_screen() - collect_treatment_data() + # collect_treatment_data() # collect_hd_treatment() Index: tests/hd_nvm_scripts.py =================================================================== diff -u -r6052189ad455e04a98d23cff2ded8e0fee8b3edf -rc3fa0bd1ad54dddd9f7faee36d806961959f362c --- tests/hd_nvm_scripts.py (.../hd_nvm_scripts.py) (revision 6052189ad455e04a98d23cff2ded8e0fee8b3edf) +++ tests/hd_nvm_scripts.py (.../hd_nvm_scripts.py) (revision c3fa0bd1ad54dddd9f7faee36d806961959f362c) @@ -27,12 +27,12 @@ # It creates a folder called HD_NV_Records in the destination that is called # If no address is provided, the default location is one folder above the dialin folder wherever it is installed # in your computer. - #hd.sw_configs.cmd_get_hd_sw_config_record() + hd.sw_configs.cmd_get_hd_sw_config_record() # Use cmd_update_hd_sw_config_record() set the changes back to firmware # This function requires an address for the excel report. Use the absolute address of your excel report like the # example below - hd.sw_configs.cmd_update_hd_sw_config_record('/home/fw/projects/HD_NV_Records/2022-03-09-HD-SW-CONFIGS-Record_EP_File.xlsx') + #hd.sw_configs.cmd_update_hd_sw_config_record('/home/fw/projects/HD_NV_Records/2022-03-09-HD-SW-CONFIGS-Record_EP_File.xlsx') # Use this function to reset the configuration records to all be 0 # hd.sw_configs.cmd_reset_hd_sw_config_record()