Index: TD_IsolatedUF/interface.ui =================================================================== diff -u -r6dcc5954833f5b951d18c31bf260452f5592b84d -rae1930d3e2a41d3862a9e77e4607aaf6b896665e --- TD_IsolatedUF/interface.ui (.../interface.ui) (revision 6dcc5954833f5b951d18c31bf260452f5592b84d) +++ TD_IsolatedUF/interface.ui (.../interface.ui) (revision ae1930d3e2a41d3862a9e77e4607aaf6b896665e) @@ -134,7 +134,7 @@ - Volume Goal (mL) + Set Volume (mL) Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter @@ -162,7 +162,7 @@ 2 - + 250 @@ -178,7 +178,7 @@ - + 0 Index: TD_IsolatedUF/loader.py =================================================================== diff -u -r4e52f6341607d9780adf49283b378413291faaf1 -rae1930d3e2a41d3862a9e77e4607aaf6b896665e --- TD_IsolatedUF/loader.py (.../loader.py) (revision 4e52f6341607d9780adf49283b378413291faaf1) +++ TD_IsolatedUF/loader.py (.../loader.py) (revision ae1930d3e2a41d3862a9e77e4607aaf6b896665e) @@ -42,8 +42,8 @@ self.slDuration = self.find_widget(QtWidgets.QSlider , 'slDuration' ) self.lbDuration = self.find_widget(QtWidgets.QLabel , 'lbDuration' ) - self.slVolumeGoal = self.find_widget(QtWidgets.QSlider , 'slVolumeGoal' ) - self.lbVolumeGoal = self.find_widget(QtWidgets.QLabel , 'lbVolumeGoal' ) + self.slSetVolume = self.find_widget(QtWidgets.QSlider , 'slSetVolume' ) + self.lbSetVolume = self.find_widget(QtWidgets.QLabel , 'lbSetVolume' ) self.slVolumeDelivered = self.find_widget(QtWidgets.QSlider , 'slVolumeDelivered' ) self.lbVolumeDelivered = self.find_widget(QtWidgets.QLabel , 'lbVolumeDelivered' ) self.slRate = self.find_widget(QtWidgets.QSlider , 'slRate' ) @@ -59,8 +59,8 @@ self.tbReset .clicked .connect(self.do_reset) self.slDuration .valueChanged .connect(self.do_send) self.slDuration .valueChanged .connect(lambda value: self.lbDuration.setText(f"{value}")) - self.slVolumeGoal .valueChanged .connect(self.do_send) - self.slVolumeGoal .valueChanged .connect(lambda value: self.lbVolumeGoal.setText(f"{value}")) + self.slSetVolume .valueChanged .connect(self.do_send) + self.slSetVolume .valueChanged .connect(lambda value: self.lbSetVolume.setText(f"{value}")) self.slVolumeDelivered .valueChanged .connect(self.do_send) self.slVolumeDelivered .valueChanged .connect(lambda value: self.lbVolumeDelivered.setText(f"{value}")) self.slRate .valueChanged .connect(self.do_send) @@ -84,7 +84,7 @@ """ self.td_interface.td_isolated_uf( self.slDuration.value(), - self.slVolumeGoal.value(), + self.slSetVolume.value(), self.slVolumeDelivered.value(), self.slRate.value(), ) @@ -93,6 +93,6 @@ @Slot() def do_reset(self): self.slDuration .setValue(0) - self.slVolumeGoal .setValue(0) + self.slSetVolume .setValue(0) self.slVolumeDelivered .setValue(0) self.slRate .setValue(0) Index: TD_TreatmentAdjustmentsIsolatedUF/interface.ui =================================================================== diff -u -r6dcc5954833f5b951d18c31bf260452f5592b84d -rae1930d3e2a41d3862a9e77e4607aaf6b896665e --- TD_TreatmentAdjustmentsIsolatedUF/interface.ui (.../interface.ui) (revision 6dcc5954833f5b951d18c31bf260452f5592b84d) +++ TD_TreatmentAdjustmentsIsolatedUF/interface.ui (.../interface.ui) (revision ae1930d3e2a41d3862a9e77e4607aaf6b896665e) @@ -176,14 +176,14 @@ - Volume Goal Max (mL) + Volume Max (mL) - + 8000 @@ -193,7 +193,7 @@ - + 50 @@ -278,29 +278,29 @@ background-color: rgb(92, 53, 102); - 158: [0x9E00]: Volume Goal Change Response + 158: [0x9E00]: Volume Change Response Qt::AlignCenter - + Send - + Copy - + Reset @@ -331,7 +331,7 @@ - + Qt::AlignCenter @@ -340,14 +340,14 @@ - Volume Goal (mL) + Volume (mL) - + 250 @@ -363,7 +363,7 @@ - + 0 @@ -401,7 +401,7 @@ - + 250 @@ -417,7 +417,7 @@ - + 0 @@ -455,7 +455,7 @@ - + 2000 @@ -465,7 +465,7 @@ - + 0 @@ -494,7 +494,7 @@ - + QFrame::Box Index: TD_TreatmentAdjustmentsIsolatedUF/loader.py =================================================================== diff -u -r295370ef7e3c3b451d471a5749d3a70dfcf68432 -rae1930d3e2a41d3862a9e77e4607aaf6b896665e --- TD_TreatmentAdjustmentsIsolatedUF/loader.py (.../loader.py) (revision 295370ef7e3c3b451d471a5749d3a70dfcf68432) +++ TD_TreatmentAdjustmentsIsolatedUF/loader.py (.../loader.py) (revision ae1930d3e2a41d3862a9e77e4607aaf6b896665e) @@ -39,7 +39,7 @@ self.can_interface.register_receiving_publication_function( CAN.DenaliChannels.ui_to_td_ch_id, MsgIds.MSG_ID_UI_ISOLATED_UF_VOLUME_GOAL_CHANGE_REQUEST.value, - self.handle_volume_goal_request) + self.handle_volume_request) self.can_interface.register_receiving_publication_function( CAN.DenaliChannels.ui_to_td_ch_id, MsgIds.MSG_ID_UI_ISOLATED_UF_CONFIRM_REQUEST.value, @@ -51,46 +51,46 @@ finds and creates widgets :return: none """ - self.tbDurationRspSend = self.find_widget(QtWidgets.QToolButton , 'tbDurationRspSend' ) - self.tbDurationRspReset = self.find_widget(QtWidgets.QToolButton , 'tbDurationRspReset' ) - self.lbDurationReq = self.find_widget(QtWidgets.QLabel , 'lbDurationReq' ) - self.sbDurationRspRejectReason = self.find_widget(QtWidgets.QSpinBox , 'sbDurationRspRejectReason' ) - self.slDurationRspVolumeGoalMax = self.find_widget(QtWidgets.QSlider , 'slDurationRspVolumeGoalMax' ) - self.lbDurationRspVolumeGoalMax = self.find_widget(QtWidgets.QLabel , 'lbDurationRspVolumeGoalMax' ) + self.tbDurationRspSend = self.find_widget(QtWidgets.QToolButton , 'tbDurationRspSend' ) + self.tbDurationRspReset = self.find_widget(QtWidgets.QToolButton , 'tbDurationRspReset' ) + self.lbDurationReq = self.find_widget(QtWidgets.QLabel , 'lbDurationReq' ) + self.sbDurationRspRejectReason = self.find_widget(QtWidgets.QSpinBox , 'sbDurationRspRejectReason' ) + self.slDurationRspVolumeMax = self.find_widget(QtWidgets.QSlider , 'slDurationRspVolumeMax' ) + self.lbDurationRspVolumeMax = self.find_widget(QtWidgets.QLabel , 'lbDurationRspVolumeMax' ) - self.tbVolumeGoalRspSend = self.find_widget(QtWidgets.QToolButton , 'tbVolumeGoalRspSend' ) - self.tbVolumeGoalRspCopy = self.find_widget(QtWidgets.QToolButton , 'tbVolumeGoalRspCopy' ) - self.tbVolumeGoalRspReset = self.find_widget(QtWidgets.QToolButton , 'tbVolumeGoalRspReset' ) - self.lbVolumeGoalReqParams = self.find_widget(QtWidgets.QLabel , 'lbVolumeGoalReqParams' ) - self.sbVolumeGoalRspRejectReason = self.find_widget(QtWidgets.QSpinBox , 'sbVolumeGoalRspRejectReason' ) - self.slVolumeGoalRspVolumeGoal = self.find_widget(QtWidgets.QSlider , 'slVolumeGoalRspVolumeGoal' ) - self.lbVolumeGoalRspVolumeGoal = self.find_widget(QtWidgets.QLabel , 'lbVolumeGoalRspVolumeGoal' ) - self.slVolumeGoalRspDuration = self.find_widget(QtWidgets.QSlider , 'slVolumeGoalRspDuration' ) - self.lbVolumeGoalRspDuration = self.find_widget(QtWidgets.QLabel , 'lbVolumeGoalRspDuration' ) - self.slVolumeGoalRspRate = self.find_widget(QtWidgets.QSlider , 'slVolumeGoalRspRate' ) - self.lbVolumeGoalRspRate = self.find_widget(QtWidgets.QLabel , 'lbVolumeGoalRspRate' ) + self.tbVolumeRspSend = self.find_widget(QtWidgets.QToolButton , 'tbVolumeRspSend' ) + self.tbVolumeRspCopy = self.find_widget(QtWidgets.QToolButton , 'tbVolumeRspCopy' ) + self.tbVolumeRspReset = self.find_widget(QtWidgets.QToolButton , 'tbVolumeRspReset' ) + self.lbVolumeReqParams = self.find_widget(QtWidgets.QLabel , 'lbVolumeReqParams' ) + self.sbVolumeRspRejectReason = self.find_widget(QtWidgets.QSpinBox , 'sbVolumeRspRejectReason' ) + self.slVolumeRspVolume = self.find_widget(QtWidgets.QSlider , 'slVolumeRspVolume' ) + self.lbVolumeRspVolume = self.find_widget(QtWidgets.QLabel , 'lbVolumeRspVolume' ) + self.slVolumeRspDuration = self.find_widget(QtWidgets.QSlider , 'slVolumeRspDuration' ) + self.lbVolumeRspDuration = self.find_widget(QtWidgets.QLabel , 'lbVolumeRspDuration' ) + self.slVolumeRspRate = self.find_widget(QtWidgets.QSlider , 'slVolumeRspRate' ) + self.lbVolumeRspRate = self.find_widget(QtWidgets.QLabel , 'lbVolumeRspRate' ) - self.tbConfirmRspSend = self.find_widget(QtWidgets.QToolButton , 'tbConfirmRspSend' ) - self.tbConfirmRspReset = self.find_widget(QtWidgets.QToolButton , 'tbConfirmRspReset' ) - self.lbConfirmReqTimestamp = self.find_widget(QtWidgets.QLabel , 'lbConfirmReqTimestamp' ) - self.sbConfirmRspRejectReason = self.find_widget(QtWidgets.QSpinBox , 'sbConfirmRspRejectReason' ) + self.tbConfirmRspSend = self.find_widget(QtWidgets.QToolButton , 'tbConfirmRspSend' ) + self.tbConfirmRspReset = self.find_widget(QtWidgets.QToolButton , 'tbConfirmRspReset' ) + self.lbConfirmReqTimestamp = self.find_widget(QtWidgets.QLabel , 'lbConfirmReqTimestamp' ) + self.sbConfirmRspRejectReason = self.find_widget(QtWidgets.QSpinBox , 'sbConfirmRspRejectReason' ) def _init_connections(self): """ initializes the widgets connections :return: none """ - self.tbDurationRspSend .clicked .connect(self.do_duration_response) - self.tbDurationRspReset .clicked .connect(self.init_duration_response) - self.slDurationRspVolumeGoalMax .valueChanged .connect(lambda value: self.lbDurationRspVolumeGoalMax.setText(f"{value}")) + self.tbDurationRspSend .clicked .connect(self.do_duration_response) + self.tbDurationRspReset .clicked .connect(self.init_duration_response) + self.slDurationRspVolumeMax .valueChanged .connect(lambda value: self.lbDurationRspVolumeMax.setText(f"{value}")) - self.tbVolumeGoalRspSend .clicked .connect(self.do_volume_goal_response) - self.tbVolumeGoalRspCopy .clicked .connect(self.copy_volume_goal_response) - self.tbVolumeGoalRspReset .clicked .connect(self.init_volume_goal_response) - self.slVolumeGoalRspVolumeGoal .valueChanged .connect(lambda value: self.lbVolumeGoalRspVolumeGoal.setText(f"{value}")) - self.slVolumeGoalRspDuration .valueChanged .connect(lambda value: self.lbVolumeGoalRspDuration.setText(f"{value}")) - self.slVolumeGoalRspRate .valueChanged .connect(lambda value: self.lbVolumeGoalRspRate.setText(f"{value}")) + self.tbVolumeRspSend .clicked .connect(self.do_volume_response) + self.tbVolumeRspCopy .clicked .connect(self.copy_volume_response) + self.tbVolumeRspReset .clicked .connect(self.init_volume_response) + self.slVolumeRspVolume .valueChanged .connect(lambda value: self.lbVolumeRspVolume.setText(f"{value}")) + self.slVolumeRspDuration .valueChanged .connect(lambda value: self.lbVolumeRspDuration.setText(f"{value}")) + self.slVolumeRspRate .valueChanged .connect(lambda value: self.lbVolumeRspRate.setText(f"{value}")) self.tbConfirmRspSend .clicked .connect(self.do_confirm_response) self.tbConfirmRspReset .clicked .connect(self.init_confirm_response) @@ -103,7 +103,7 @@ :return: none """ self.init_duration_response() - self.init_volume_goal_response() + self.init_volume_response() self.init_confirm_response() @@ -115,7 +115,7 @@ """ self.lbDurationReq .setText("-- --") self.sbDurationRspRejectReason .setValue(0) - self.slDurationRspVolumeGoalMax .setValue(0) + self.slDurationRspVolumeMax .setValue(0) @Slot() @@ -138,63 +138,63 @@ """ self.td_interface.td_isolated_uf_duration_change_response( vRejectionReason = self.sbDurationRspRejectReason.value(), - vVolumeGoalMax = self.slDurationRspVolumeGoalMax.value() + vVolumeMax = self.slDurationRspVolumeMax.value() ) @Slot() - def init_volume_goal_response(self): + def init_volume_response(self): """ slot for initializing isolated UF volume goal response :return: none """ - self.lbVolumeGoalReqParams .setText("-- --") - self.sbVolumeGoalRspRejectReason .setValue(0) - self.slVolumeGoalRspVolumeGoal .setValue(0) - self.slVolumeGoalRspDuration .setValue(0) - self.slVolumeGoalRspRate .setValue(0) + self.lbVolumeReqParams .setText("-- --") + self.sbVolumeRspRejectReason .setValue(0) + self.slVolumeRspVolume .setValue(0) + self.slVolumeRspDuration .setValue(0) + self.slVolumeRspRate .setValue(0) @Slot() - def handle_volume_goal_request(self, message, timestamp = 0.0): + def handle_volume_request(self, message, timestamp = 0.0): """ slot called when the user requests isolated UF volume goal change :return: none """ message = message['message'] index = MsgFieldPositions.START_POS_FIELD_1 self.reqDuration,index = conversions.bytearray_to_integer(message, index, False) - self.reqVolumeGoal,index = conversions.bytearray_to_integer(message, index, False) - self.lbVolumeGoalReqParams.setText(f"Duration (min) = {self.reqDuration}, Volume Goal (mL) = {self.reqVolumeGoal}") + self.reqVolume,index = conversions.bytearray_to_integer(message, index, False) + self.lbVolumeReqParams.setText(f"Duration (min) = {self.reqDuration}, Volume (mL) = {self.reqVolume}") @Slot() - def copy_volume_goal_response(self): + def copy_volume_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) + self.slVolumeRspVolume .setValue(self.reqVolume) + self.slVolumeRspDuration .setValue(self.reqDuration) @Slot() - def do_volume_goal_response(self): + def do_volume_response(self): """ slot for sending isolated UF volume goal change response :return: none """ - payload = conversions.integer_to_bytearray(1 if self.sbVolumeGoalRspRejectReason.value() == 0 else 0) - payload += conversions.integer_to_bytearray(self.sbVolumeGoalRspRejectReason.value()) - payload += conversions.integer_to_bytearray(self.slVolumeGoalRspVolumeGoal.value()) - payload += conversions.integer_to_bytearray(self.slVolumeGoalRspDuration.value()) - payload += conversions.integer_to_bytearray(self.slVolumeGoalRspRate.value()) + payload = conversions.integer_to_bytearray(1 if self.sbVolumeRspRejectReason.value() == 0 else 0) + payload += conversions.integer_to_bytearray(self.sbVolumeRspRejectReason.value()) + payload += conversions.integer_to_bytearray(self.slVolumeRspVolume.value()) + payload += conversions.integer_to_bytearray(self.slVolumeRspDuration.value()) + payload += conversions.integer_to_bytearray(self.slVolumeRspRate.value()) - 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() + self.td_interface.td_isolated_uf_volume_change_response( + vRejectionReason = self.sbVolumeRspRejectReason.value(), + vVolume = self.slVolumeRspVolume.value(), + vDuration = self.slVolumeRspDuration.value(), + vRate = self.slVolumeRspRate.value() )