Index: TD_IsolatedUF/interface.ui =================================================================== diff -u -r4e52f6341607d9780adf49283b378413291faaf1 -r6dcc5954833f5b951d18c31bf260452f5592b84d --- TD_IsolatedUF/interface.ui (.../interface.ui) (revision 4e52f6341607d9780adf49283b378413291faaf1) +++ TD_IsolatedUF/interface.ui (.../interface.ui) (revision 6dcc5954833f5b951d18c31bf260452f5592b84d) @@ -54,7 +54,7 @@ background-color: rgb(92, 53, 102); - 144 [0x9000]: Isolated UF Data + 154 [0x9A00]: Isolated UF Data Qt::AlignCenter Index: TD_TreatmentAdjustmentsIsolatedUF/interface.ui =================================================================== diff -u -r4e52f6341607d9780adf49283b378413291faaf1 -r6dcc5954833f5b951d18c31bf260452f5592b84d --- TD_TreatmentAdjustmentsIsolatedUF/interface.ui (.../interface.ui) (revision 4e52f6341607d9780adf49283b378413291faaf1) +++ TD_TreatmentAdjustmentsIsolatedUF/interface.ui (.../interface.ui) (revision 6dcc5954833f5b951d18c31bf260452f5592b84d) @@ -99,7 +99,7 @@ background-color: rgb(92, 53, 102); - 146: [0x9200]: Duration Change Response + 156: [0x9C00]: Duration Change Response Qt::AlignCenter @@ -130,7 +130,7 @@ - Req [0x9100] + Req [0x9B00] Duration (min) @@ -278,7 +278,7 @@ background-color: rgb(92, 53, 102); - 148: [0x9400]: Volume Goal Change Response + 158: [0x9E00]: Volume Goal Change Response Qt::AlignCenter @@ -316,7 +316,7 @@ - Req [0x9300] + Req [0x9D00] Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter @@ -571,7 +571,7 @@ background-color: rgb(92, 53, 102); - 150: [0x9600]: Confirm Response + 160: [0xA000]: Confirm Response Qt::AlignCenter @@ -602,7 +602,7 @@ - Req [0x9500] + Req [0x9F00] Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter Index: TD_TreatmentAdjustmentsIsolatedUF/loader.py =================================================================== diff -u -r4e52f6341607d9780adf49283b378413291faaf1 -r6dcc5954833f5b951d18c31bf260452f5592b84d --- TD_TreatmentAdjustmentsIsolatedUF/loader.py (.../loader.py) (revision 4e52f6341607d9780adf49283b378413291faaf1) +++ TD_TreatmentAdjustmentsIsolatedUF/loader.py (.../loader.py) (revision 6dcc5954833f5b951d18c31bf260452f5592b84d) @@ -113,7 +113,7 @@ @Slot() def init_duration_response(self): """ - slot for initializing Isolated UF duration change + slot for initializing isolated UF duration change response :return: none """ self.lbDurationReq .setText("-- --") @@ -124,8 +124,8 @@ @Slot() def handle_duration_request(self, message, timestamp = 0.0): """ - Called when the user requests UF settings change to firmware from UI - @return: None + slot called when the user requests isolated UF duration change + :return: none """ message = message['message'] index = MsgFieldPositions.START_POS_FIELD_1 @@ -136,27 +136,19 @@ @Slot() def do_duration_response(self): """ - slot for UF settings change + slot for sending isolated UF duration change response :return: none """ - payload = conversions.integer_to_bytearray(1 if self.sbDurationRspRejectReason.value() == 0 else 0) - payload += conversions.integer_to_bytearray(self.sbDurationRspRejectReason.value()) - payload += conversions.integer_to_bytearray(self.slDurationRspVolumeGoalMax.value()) - - self.td_interface.cmd_send_general_response( - message_id = MsgIds.MSG_ID_TD_ISOLATED_UF_DURATION_CHANGE_RESPONSE.value, - accepted = 1 if self.sbDurationRspRejectReason.value() == 0 else 0, - reason = self.sbDurationRspRejectReason.value(), - is_pure_data = False, - has_parameters = True, - parameters_payload = payload + self.td_interface.td_isolated_uf_duration_change_response( + vRejectionReason = self.sbDurationRspRejectReason.value(), + vVolumeGoalMax = self.slDurationRspVolumeGoalMax.value() ) @Slot() def init_volume_goal_response(self): """ - slot for initializing Isolated UF duration change + slot for initializing isolated UF volume goal response :return: none """ self.lbVolumeGoalReqParams .setText("-- --") @@ -169,8 +161,8 @@ @Slot() def handle_volume_goal_request(self, message, timestamp = 0.0): """ - Called when the user requests UF settings change to firmware from UI - @return: None + slot called when the user requests isolated UF volume goal change + :return: none """ message = message['message'] index = MsgFieldPositions.START_POS_FIELD_1 @@ -181,14 +173,18 @@ @Slot() def copy_volume_goal_response(self): + """ + slot for copying the isolated UF volume goal from the request to the response + :return: none + """ self.slVolumeGoalRspVolumeGoal .setValue(self.reqVolumeGoal) self.slVolumeGoalRspDuration .setValue(self.reqDuration) @Slot() def do_volume_goal_response(self): """ - slot for UF settings change + slot for sending isolated UF volume goal change response :return: none """ payload = conversions.integer_to_bytearray(1 if self.sbVolumeGoalRspRejectReason.value() == 0 else 0) @@ -197,20 +193,18 @@ payload += conversions.integer_to_bytearray(self.slVolumeGoalRspDuration.value()) payload += conversions.integer_to_bytearray(self.slVolumeGoalRspRate.value()) - self.td_interface.cmd_send_general_response( - message_id = MsgIds.MSG_ID_TD_ISOLATED_UF_VOLUME_GOAL_CHANGE_RESPONSE.value, - accepted = 1 if self.sbVolumeGoalRspRejectReason.value() == 0 else 0, - reason = self.sbVolumeGoalRspRejectReason.value(), - is_pure_data = False, - has_parameters = True, - parameters_payload = payload + self.td_interface.td_isolated_uf_volume_goal_change_response( + vRejectionReason = self.sbVolumeGoalRspRejectReason.value(), + vVolumeGoal = self.slVolumeGoalRspVolumeGoal.value(), + vDuration = self.slVolumeGoalRspDuration.value(), + vRate = self.slVolumeGoalRspRate.value() ) @Slot() def init_confirm_response(self): """ - slot for initializing UF pause/resume + slot for initializing isolated UF confirm response :return: none """ self.lbConfirmReqTimestamp .setText("-- --") @@ -220,8 +214,8 @@ @Slot() def handle_confirm_request(self, message, timestamp = 0.0): """ - Called when the user requests pause/resume to firmware from UI - @return: None + slot called when the user requests isolated UF confirmation + :return: none """ message = message['message'] self.lbConfirmReqTimestamp.setText(f"{datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S.%f')}") @@ -230,11 +224,9 @@ @Slot() def do_confirm_response(self): """ - slot for UF pause/resume + slot for sending isolated UF confirm response :return: none """ - self.td_interface.cmd_send_general_response( - message_id = MsgIds.MSG_ID_TD_ISOLATED_UF_CONFIRM_RESPONSE.value, - accepted = 1 if self.sbConfirmRspRejectReason.value() == 0 else 0, - reason = self.sbConfirmRspRejectReason.value() + self.td_interface.td_isolated_uf_confirm_response( + vRejectionReason = self.sbConfirmRspRejectReason.value() )