Index: dialin/dg/dialysate_fill.py =================================================================== diff -u -r4d5e17118983a1cc04231f4c423588fad24816b4 -r6f7e1ee38afb4fba5bedfcfcea5f4b5ee631ac95 --- dialin/dg/dialysate_fill.py (.../dialysate_fill.py) (revision 4d5e17118983a1cc04231f4c423588fad24816b4) +++ dialin/dg/dialysate_fill.py (.../dialysate_fill.py) (revision 6f7e1ee38afb4fba5bedfcfcea5f4b5ee631ac95) @@ -53,6 +53,7 @@ self.pctDiffConduct = 0.0 self.used_acid = 0.0 self.used_bicarb = 0.0 + self.total_volume = 0.0 if self.can_interface is not None: channel_id = DenaliChannels.dg_sync_broadcast_ch_id @@ -71,8 +72,7 @@ return [self.avg_acid, self.avg_bicarb, self.first_fill, self.pctDiffConduct, self.used_acid, self.used_bicarb] - @publish(["avg_acid", "avg_bicarb", "first_fill", - "pctDiffConduct", "used_acid", "used_bicarb"]) + @publish(["avg_acid", "avg_bicarb", "first_fill", "pctDiffConduct", "used_acid", "used_bicarb", "total_volume"]) def _handler_fill_mode_monitor_sync(self, message): """ Handles published dialysate fill mode data' data messages. Dialysate fill data are captured @@ -93,6 +93,8 @@ message['message'][MsgFieldPositions.START_POS_FIELD_5:MsgFieldPositions.END_POS_FIELD_5]))[0] self.used_bicarb = struct.unpack('f', bytearray( message['message'][MsgFieldPositions.START_POS_FIELD_6:MsgFieldPositions.END_POS_FIELD_6]))[0] + self.total_volume = struct.unpack('f', bytearray( + message['message'][MsgFieldPositions.START_POS_FIELD_7:MsgFieldPositions.END_POS_FIELD_7]))[0] def cmd_used_acid_volume_override(self, volume: float) -> int: """ Index: dialin/dg/ro_pump.py =================================================================== diff -u -r88b4967ce6b9ac816ac21b26326450de4b540887 -r6f7e1ee38afb4fba5bedfcfcea5f4b5ee631ac95 --- dialin/dg/ro_pump.py (.../ro_pump.py) (revision 88b4967ce6b9ac816ac21b26326450de4b540887) +++ dialin/dg/ro_pump.py (.../ro_pump.py) (revision 6f7e1ee38afb4fba5bedfcfcea5f4b5ee631ac95) @@ -62,7 +62,7 @@ self.ro_pump_state = 0 self.target_flow_lpm = 0.0 self.feedback_duty_cycle_pct = 0.0 - self.measured_raw_flow_rate_mlp = 0.0 + self.measured_raw_flow_rate_with_conc_pumps_mlp = 0.0 def get_target_pressure(self): """ @@ -102,10 +102,10 @@ @return: The RO pump measured raw flow rate in mL/min """ - return self.measured_raw_flow_rate_mlp + return self.measured_raw_flow_rate_with_conc_pumps_mlp @publish(["target_pressure_psi", "measured_flow_rate_lpm", "pwm_duty_cycle_pct", "ro_pump_state", - "feedback_duty_cycle_pct", "measured_raw_flow_rate_mlp"]) + "feedback_duty_cycle_pct", "measured_raw_flow_rate_with_conc_pumps_mlp"]) def _handler_ro_pump_sync(self, message): """ Handles published ro pump data messages. RO pump data are captured @@ -127,7 +127,7 @@ message['message'][MsgFieldPositions.START_POS_FIELD_5:MsgFieldPositions.END_POS_FIELD_5]))[0] self.feedback_duty_cycle_pct = struct.unpack('f', bytearray( message['message'][MsgFieldPositions.START_POS_FIELD_6:MsgFieldPositions.END_POS_FIELD_6]))[0] - self.measured_raw_flow_rate_mlp = struct.unpack('f', bytearray( + self.measured_raw_flow_rate_with_conc_pumps_mlp = struct.unpack('f', bytearray( message['message'][MsgFieldPositions.START_POS_FIELD_7:MsgFieldPositions.END_POS_FIELD_7]))[0] self.ro_pump_state = ROPumpStates(ro_state).name Index: tests/dg_nvm_scripts.py =================================================================== diff -u -r88b4967ce6b9ac816ac21b26326450de4b540887 -r6f7e1ee38afb4fba5bedfcfcea5f4b5ee631ac95 --- tests/dg_nvm_scripts.py (.../dg_nvm_scripts.py) (revision 88b4967ce6b9ac816ac21b26326450de4b540887) +++ tests/dg_nvm_scripts.py (.../dg_nvm_scripts.py) (revision 6f7e1ee38afb4fba5bedfcfcea5f4b5ee631ac95) @@ -31,12 +31,12 @@ # It creates a folder called DG_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 you computer. - dg.calibration_record.cmd_get_dg_calibration_record_report() + #dg.calibration_record.cmd_get_dg_calibration_record_report() # Use cmd_set_dg_calibration_excel_to_fw() 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 - #dg.calibration_record.cmd_set_dg_calibration_excel_to_fw('/home/fw/projects/DG_NV_Records/2022-02-14-DG-Record.xlsx') + dg.calibration_record.cmd_set_dg_calibration_excel_to_fw('/home/fw/projects/DG_NV_Records/2022-03-31-DG-Record.xlsx') # For resetting the calibration record to benign values, use the function below #dg.calibration_record.cmd_reset_dg_calibration_record() Index: tests/dg_tests.py =================================================================== diff -u -r4d5e17118983a1cc04231f4c423588fad24816b4 -r6f7e1ee38afb4fba5bedfcfcea5f4b5ee631ac95 --- tests/dg_tests.py (.../dg_tests.py) (revision 4d5e17118983a1cc04231f4c423588fad24816b4) +++ tests/dg_tests.py (.../dg_tests.py) (revision 6f7e1ee38afb4fba5bedfcfcea5f4b5ee631ac95) @@ -162,11 +162,11 @@ def get_ro_info(): info = ('RO, {}, PPi, {:5.3f}, PPo, {:5.3f}, PWM, {:5.3f}, Flow, {:5.3f}, Tgt_flow, {:5.3f}, Dia_flow, {:5.3f}, ' - 'Feedback_PWM, {:5.3f}, Raw_flow, {:5.3f}, ' + 'Feedback_PWM, {:5.3f}, flow_with_conc_pumps, {:5.3f}, ' .format(dg.ro_pump.ro_pump_state, dg.pressures.ro_pump_inlet_pressure, dg.pressures.ro_pump_outlet_pressure, dg.ro_pump.pwm_duty_cycle_pct, dg.ro_pump.measured_flow_rate_lpm, dg.ro_pump.target_flow_lpm, dg.dialysate_flow_sensor.flow_rate, - dg.ro_pump.feedback_duty_cycle_pct, dg.ro_pump.measured_raw_flow_rate_mlp)) + dg.ro_pump.feedback_duty_cycle_pct, dg.ro_pump.measured_raw_flow_rate_with_conc_pumps_mlp)) return info @@ -265,9 +265,10 @@ def get_dg_fill_info(): info = ('Avg_acid_cond, {:5.3f}, Avg_bicarb_cond, {:5.3f}, Is_this_first_fill, {}, Diff_cond_pct, {:5.3f}, ' - 'Used_acid, {:5.3f}, Used_bicarb, {:5.3f}, ' + 'Used_acid, {:5.3f}, Used_bicarb, {:5.3f}, Total_vol, {:5.3f}, ' .format(dg.dialysate_fill.avg_acid, dg.dialysate_fill.avg_bicarb, dg.dialysate_fill.first_fill, - dg.dialysate_fill.pctDiffConduct, dg.dialysate_fill.used_acid, dg.dialysate_fill.used_acid)) + dg.dialysate_fill.pctDiffConduct, dg.dialysate_fill.used_acid, dg.dialysate_fill.used_acid, + dg.dialysate_fill.total_volume)) return info