Index: leahi_dialin/common/msg_ids.py =================================================================== diff -u -r29476a4a7b58c6d6decee115ac9bcadb0aa262ca -rc169bd25120b664de7c55dff93951f48d21a8552 --- leahi_dialin/common/msg_ids.py (.../msg_ids.py) (revision 29476a4a7b58c6d6decee115ac9bcadb0aa262ca) +++ leahi_dialin/common/msg_ids.py (.../msg_ids.py) (revision c169bd25120b664de7c55dff93951f48d21a8552) @@ -125,6 +125,8 @@ MSG_ID_USER_UF_SETTINGS_CHANGE_CONFIRMATION_RESPONSE = 0x67 MSG_ID_DD_VOLTAGES_DATA = 0x68 MSG_ID_DD_RINSE_PUMP_DATA = 0x69 + MSG_ID_UI_PRESSURE_LIMITS_CHANGE_REQUEST = 0x78 + MSG_ID_TD_PRESSURE_LIMITS_CHANGE_RESPONSE = 0x79 MSG_ID_DD_PISTON_PUMP_CONTROL_DATA = 0xF0 MSG_ID_TD_TESTER_LOGIN_REQUEST = 0x8000 @@ -340,4 +342,4 @@ MSG_ID_FP_DEBUG_EVENT = 0xFFF3 - MSG_ID_ACK_MESSAGE_THAT_REQUIRES_ACK = 0xFFFF \ No newline at end of file + MSG_ID_ACK_MESSAGE_THAT_REQUIRES_ACK = 0xFFFF Index: leahi_dialin/ui/td_messaging.py =================================================================== diff -u -reb3e8ec85b8c2cfd7215d762117c617b8084be45 -rc169bd25120b664de7c55dff93951f48d21a8552 --- leahi_dialin/ui/td_messaging.py (.../td_messaging.py) (revision eb3e8ec85b8c2cfd7215d762117c617b8084be45) +++ leahi_dialin/ui/td_messaging.py (.../td_messaging.py) (revision c169bd25120b664de7c55dff93951f48d21a8552) @@ -647,6 +647,35 @@ self.can_interface.send(message, 0) + + def td_pressure_limits_adjustment_response(self, vRejectionReason: int, + vArterialWindow: int, vVenousWindow: int, vVenousAsymmetricWindow: int, vTmpWindow: int): + """ + the pressure limits adjustment response message method(Msg ID: 0x79, 121) + Args: + @param vRejectionReason (int) : response rejection reason, + if rejection reason is 0, then accepted (0) will be sent, + otherwise rejected (1) + @param vArterialWindow (int) : arterial limit window (mmHg) + @param vVenousWindow (int) : venous limit window (mmHg) + @param vVenousAsymmetricWindow (int) : venous asymmetric window (mmHg) + @param vTmpWindow (int) : tmp limit window (mmHg) + @return: None + """ + payload = conversions.integer_to_bytearray(1 if vRejectionReason == 0 else 0 ) + payload += conversions.integer_to_bytearray(vRejectionReason ) + payload += conversions.integer_to_bytearray(vArterialWindow ) + payload += conversions.integer_to_bytearray(vVenousWindow ) + payload += conversions.integer_to_bytearray(vVenousAsymmetricWindow ) + payload += conversions.integer_to_bytearray(vTmpWindow ) + + message = CAN.DenaliMessage.build_message( + channel_id=CAN.DenaliChannels.td_to_ui_ch_id, + message_id=msg_ids.MsgIds.MSG_ID_TD_PRESSURE_LIMITS_CHANGE_RESPONSE .value, + payload=payload) + self.can_interface.send(message, 0) + + def td_vitals_adjustment_response(self,vRejectionReason: int): """ the vitals adjustment response message method(Msg ID: 0x64, 100)