Index: dialin/common/msg_defs.py =================================================================== diff -u -re0ee1c47b7d49ff63855c1c5c2f35a0ab52b822d -re193e10da7d6c16158592c1aae7ebe1221dd0cde --- dialin/common/msg_defs.py (.../msg_defs.py) (revision e0ee1c47b7d49ff63855c1c5c2f35a0ab52b822d) +++ dialin/common/msg_defs.py (.../msg_defs.py) (revision e193e10da7d6c16158592c1aae7ebe1221dd0cde) @@ -1,6 +1,6 @@ ########################################################################### # -# Copyright (c) 2019-2022 Diality Inc. - All Rights Reserved. +# Copyright (c) 2020-2022 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. Index: dialin/dg/dialysate_generator.py =================================================================== diff -u -rde182c178484211749c94484b2fbe84d6451fe3a -re193e10da7d6c16158592c1aae7ebe1221dd0cde --- dialin/dg/dialysate_generator.py (.../dialysate_generator.py) (revision de182c178484211749c94484b2fbe84d6451fe3a) +++ dialin/dg/dialysate_generator.py (.../dialysate_generator.py) (revision e193e10da7d6c16158592c1aae7ebe1221dd0cde) @@ -1,6 +1,6 @@ ########################################################################### # -# Copyright (c) 2019-2022 Diality Inc. - All Rights Reserved. +# Copyright (c) 2020-2022 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. Index: dialin/dg/events.py =================================================================== diff -u -re0ee1c47b7d49ff63855c1c5c2f35a0ab52b822d -re193e10da7d6c16158592c1aae7ebe1221dd0cde --- dialin/dg/events.py (.../events.py) (revision e0ee1c47b7d49ff63855c1c5c2f35a0ab52b822d) +++ dialin/dg/events.py (.../events.py) (revision e193e10da7d6c16158592c1aae7ebe1221dd0cde) @@ -1,6 +1,6 @@ ########################################################################### # -# Copyright (c) 2019-2022 Diality Inc. - All Rights Reserved. +# Copyright (c) 2021-2022 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. Index: dialin/dg/ro_pump.py =================================================================== diff -u -re0ee1c47b7d49ff63855c1c5c2f35a0ab52b822d -re193e10da7d6c16158592c1aae7ebe1221dd0cde --- dialin/dg/ro_pump.py (.../ro_pump.py) (revision e0ee1c47b7d49ff63855c1c5c2f35a0ab52b822d) +++ dialin/dg/ro_pump.py (.../ro_pump.py) (revision e193e10da7d6c16158592c1aae7ebe1221dd0cde) @@ -1,6 +1,6 @@ ########################################################################### # -# Copyright (c) 2019-2022 Diality Inc. - All Rights Reserved. +# Copyright (c) 2020-2022 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. @@ -62,6 +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 def get_target_pressure(self): """ @@ -95,8 +96,16 @@ """ return self.ro_pump_state + def get_ro_pump_measured_raw_flow_rate_mlp(self): + """ + Gets the RO pump measured raw flow rate + + @return: The RO pump measured raw flow rate in mL/min + """ + return self.measured_raw_flow_rate_mlp + @publish(["target_pressure_psi", "measured_flow_rate_lpm", "pwm_duty_cycle_pct", "ro_pump_state", - "feedback_duty_cycle_pct"]) + "feedback_duty_cycle_pct", "raw_measured_flow_rate_lpm"]) def _handler_ro_pump_sync(self, message): """ Handles published ro pump data messages. RO pump data are captured @@ -118,6 +127,8 @@ 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( + message['message'][MsgFieldPositions.START_POS_FIELD_7:MsgFieldPositions.END_POS_FIELD_7]))[0] self.ro_pump_state = ROPumpStates(ro_state).name Index: dialin/hd/rtc.py =================================================================== diff -u -re0ee1c47b7d49ff63855c1c5c2f35a0ab52b822d -re193e10da7d6c16158592c1aae7ebe1221dd0cde --- dialin/hd/rtc.py (.../rtc.py) (revision e0ee1c47b7d49ff63855c1c5c2f35a0ab52b822d) +++ dialin/hd/rtc.py (.../rtc.py) (revision e193e10da7d6c16158592c1aae7ebe1221dd0cde) @@ -1,6 +1,6 @@ ########################################################################### # -# Copyright (c) 2019-2022 Diality Inc. - All Rights Reserved. +# Copyright (c) 2020-2022 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. Index: dialin/hd/ui_proxy.py =================================================================== diff -u -re0ee1c47b7d49ff63855c1c5c2f35a0ab52b822d -re193e10da7d6c16158592c1aae7ebe1221dd0cde --- dialin/hd/ui_proxy.py (.../ui_proxy.py) (revision e0ee1c47b7d49ff63855c1c5c2f35a0ab52b822d) +++ dialin/hd/ui_proxy.py (.../ui_proxy.py) (revision e193e10da7d6c16158592c1aae7ebe1221dd0cde) @@ -1,6 +1,6 @@ ########################################################################### # -# Copyright (c) 2019-2022 Diality Inc. - All Rights Reserved. +# Copyright (c) 2020-2022 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. Index: dialin/protocols/CAN.py =================================================================== diff -u -re0ee1c47b7d49ff63855c1c5c2f35a0ab52b822d -re193e10da7d6c16158592c1aae7ebe1221dd0cde --- dialin/protocols/CAN.py (.../CAN.py) (revision e0ee1c47b7d49ff63855c1c5c2f35a0ab52b822d) +++ dialin/protocols/CAN.py (.../CAN.py) (revision e193e10da7d6c16158592c1aae7ebe1221dd0cde) @@ -1,6 +1,6 @@ ########################################################################### # -# Copyright (c) 2019-2022 Diality Inc. - All Rights Reserved. +# Copyright (c) 2020-2022 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. Index: dialin/ui/hd_simulator.py =================================================================== diff -u -r37713699423a2fb9343fca8f1fdf2ccdfe50a16d -re193e10da7d6c16158592c1aae7ebe1221dd0cde --- dialin/ui/hd_simulator.py (.../hd_simulator.py) (revision 37713699423a2fb9343fca8f1fdf2ccdfe50a16d) +++ dialin/ui/hd_simulator.py (.../hd_simulator.py) (revision e193e10da7d6c16158592c1aae7ebe1221dd0cde) @@ -1,14 +1,14 @@ ########################################################################### # -# Copyright (c) 2019-2022 Diality Inc. - All Rights Reserved. +# Copyright (c) 2020-2022 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 hd_simulator.py # -# @author (last) Quang Nguyen -# @date (last) 11-Aug-2021 +# @author (last) Micahel Garthwaite +# @date (last) 22-Feb-2022 # @author (original) Peter Lucia # @date (original) 06-Aug-2020 # @@ -637,13 +637,13 @@ def cmd_set_treatment_blood_flow_rate(self, flow_set_pt: int, measured_flow: float, rot_speed: float, mot_speed: float, mc_speed: float, - mc_current: float, pwm: float, signal_strength: float) -> None: + mc_current: float, pwm: float, rotor_count: int) -> None: """ The Blood Flow Data message setter/sender method - | MSG | CAN ID | Box | Type | Ack | Src | Dst | Description | #1:(S32) | #2:(F32) | #3:(F32) | #4:(F32) | #5:(F32) | #6:(F32) | #7:(F32) | #8:(F32) | + | MSG | CAN ID | Box | Type | Ack | Src | Dst | Description | #1:(S32) | #2:(F32) | #3:(F32) | #4:(F32) | #5:(F32) | #6:(F32) | #7:(F32) | #8:(U32) | |:----:|:------:|:---:|:------:|:---:|:---:|:---:|:-----------: |:--: |:--: |:--: |:--: |:--: |:--: |:--: |:--: | - |0x0500| 0x040 | 7 | 1 Hz | N | HD | All | Blood Flow Data | \ref Data::mFlowSetPoint | \ref Data::mMeasuredFlow | \ref Data::mRotorSpeed | \ref Data::mMotorSpeed | \ref Data::mMotorCtlSpeed | \ref Data::mMotorCtlCurrent | \ref Data::mPWMDutyCycle | \ref Data::mSigStrenght | + |0x0500| 0x040 | 7 | 1 Hz | N | HD | All | Blood Flow Data | \ref Data::mFlowSetPoint | \ref Data::mMeasuredFlow | \ref Data::mRotorSpeed | \ref Data::mMotorSpeed | \ref Data::mMotorCtlSpeed | \ref Data::mMotorCtlCurrent | \ref Data::mPWMDutyCycle | \ref Data::mRotorCount | @param flow_set_pt: (int) Flow Set Point @param measured_flow: (float) Measured Flow @@ -652,7 +652,7 @@ @param mc_speed: (float) MC Speed @param mc_current: (float) MC Current @param pwm: (float) PWM - @param signal_strength: (float) Signal strength in percent + @param rotor_count: (int) Rotor Count @return: None """ @@ -663,7 +663,7 @@ payload += float_to_bytearray(mc_speed) payload += float_to_bytearray(mc_current) payload += float_to_bytearray(pwm) - payload += float_to_bytearray(signal_strength) + payload += integer_to_bytearray(rotor_count) message = DenaliMessage.build_message(channel_id=DenaliChannels.hd_sync_broadcast_ch_id, message_id=MsgIds.MSG_ID_BLOOD_FLOW_DATA.value, @@ -673,13 +673,13 @@ def cmd_set_treatment_dialysate_flow_rate(self, flow_set_pt: int, measured_flow: float, rot_speed: float, mot_speed: float, mc_speed: float, - mc_current: float, pwm: float, signal_strength: float) -> None: + mc_current: float, pwm: float) -> None: """ The Dialysate Flow Data message setter/sender method - | MSG | CAN ID | Box | Type | Ack | Src | Dst | Description | #1:(S32) | #2:(F32) | #3:(F32) | #4:(F32) | #5:(F32) | #6:(F32) | #7:(F32) | #8:(F32) | - |:----:|:------:|:---:|:------:|:---:|:---:|:---:|:-----------: |:--: |:--: |:--: |:--: |:--: |:--: |:--: |:--: | - |0x0800| 0x040 | 7 | 1 Hz | N | HD | All | Dialysate Flow Data | mFlowSetPoint | mMeasuredFlow | mRotorSpeed | mMotorSpeed | mMotorCtlSpeed | mMotorCtlCurrent | mPWMDutyCycle | \ref Data::mSigStrenght | + | MSG | CAN ID | Box | Type | Ack | Src | Dst | Description | #1:(S32) | #2:(F32) | #3:(F32) | #4:(F32) | #5:(F32) | #6:(F32) | #7:(F32) | + |:----:|:------:|:---:|:------:|:---:|:---:|:---:|:-----------: |:--: |:--: |:--: |:--: |:--: |:--: |:--: | + |0x0800| 0x040 | 7 | 1 Hz | N | HD | All | Dialysate Flow Data | mFlowSetPoint | mMeasuredFlow | mRotorSpeed | mMotorSpeed | mMotorCtlSpeed | mMotorCtlCurrent | mPWMDutyCycle | @param flow_set_pt: (signed int) Flow Set Point @param measured_flow: (float) Measured Flow @@ -688,7 +688,6 @@ @param mc_speed: (float) MC Speed @param mc_current: (float) MC Current @param pwm: (float) PWM - @param signal_strength: (float) Signal strength in percent @return: None """ @@ -699,7 +698,6 @@ payload += float_to_bytearray(mc_speed) payload += float_to_bytearray(mc_current) payload += float_to_bytearray(pwm) - payload += float_to_bytearray(signal_strength) message = DenaliMessage.build_message(channel_id=DenaliChannels.hd_sync_broadcast_ch_id, message_id=MsgIds.MSG_ID_DIALYSATE_FLOW_DATA.value, @@ -1872,7 +1870,8 @@ self.can_interface.send(message, 0) - def cmd_send_hd_disinfection_state(self, sub_mode: int, flush_mode: int, heat_mode: int, chemical_mode: int) -> None: + def cmd_send_hd_disinfection_state(self, sub_mode: int, flush_mode: int, heat_mode: int, + chemical_mode: int) -> None: """ Broadcasts the current DG disinfection mode @param sub_mode: (int) disinfect states Index: tests/test_flush.py =================================================================== diff -u -re0ee1c47b7d49ff63855c1c5c2f35a0ab52b822d -re193e10da7d6c16158592c1aae7ebe1221dd0cde --- tests/test_flush.py (.../test_flush.py) (revision e0ee1c47b7d49ff63855c1c5c2f35a0ab52b822d) +++ tests/test_flush.py (.../test_flush.py) (revision e193e10da7d6c16158592c1aae7ebe1221dd0cde) @@ -1,6 +1,6 @@ ########################################################################### # -# Copyright (c) 2019-2022 Diality Inc. - All Rights Reserved. +# Copyright (c) 2021-2022 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. Index: tests/unit_tests/test_ui_proxy.py =================================================================== diff -u -re0ee1c47b7d49ff63855c1c5c2f35a0ab52b822d -re193e10da7d6c16158592c1aae7ebe1221dd0cde --- tests/unit_tests/test_ui_proxy.py (.../test_ui_proxy.py) (revision e0ee1c47b7d49ff63855c1c5c2f35a0ab52b822d) +++ tests/unit_tests/test_ui_proxy.py (.../test_ui_proxy.py) (revision e193e10da7d6c16158592c1aae7ebe1221dd0cde) @@ -1,6 +1,6 @@ ########################################################################### # -# Copyright (c) 2019-2022 Diality Inc. - All Rights Reserved. +# Copyright (c) 2020-2022 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.