Index: TD_Vitals/interface.ui =================================================================== diff -u -r976a9362e2aaa083b5ed1926edee03be28bf2b58 -r3106c9d27f114fa3e7e435b3eeba9cfcfe178bf7 --- TD_Vitals/interface.ui (.../interface.ui) (revision 976a9362e2aaa083b5ed1926edee03be28bf2b58) +++ TD_Vitals/interface.ui (.../interface.ui) (revision 3106c9d27f114fa3e7e435b3eeba9cfcfe178bf7) @@ -6,8 +6,8 @@ 0 0 - 439 - 193 + 330 + 224 @@ -21,172 +21,361 @@ - - - - - - - - 0 - 0 - - - - - 352 - 0 - - - - - 16777215 - 16777215 - - - - - 10 - - - - color: rgb(238, 238, 236); + + + QFrame::StyledPanel + + + QFrame::Raised + + + + 2 + + + 2 + + + 2 + + + 2 + + + + + + + + 250 + 0 + + + + + 10 + + + + color: rgb(238, 238, 236); background-color: rgb(92, 53, 102); - - - 101 : [0x6500] : Treatment Vitals - - - Qt::AlignCenter - - - - - - - send - - - - - - - - - - - - 180 - 0 - - - - Systolic - - - - - - - 60 - - - 250 - - - 120 - - - - - - - - - - - - 180 - 0 - - - - Diastolic - - - - - - - 40 - - - 200 - - - 80 - - - - - - - - - - - - 180 - 0 - - - - Heart Rate - - - - - - - 40 - - - 180 - - - 100 - - - - - - - - - - - - 180 - 0 - - - - Reason - - - - - - - 900 - - - - - - + + + 100 : [0x6400] : Vitals Response + + + Qt::AlignCenter + + + + + + + Send + + + + + + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + 2 + + + 2 + + + + + + 0 + 0 + + + + + 0 + 0 + + + + Reason + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 0 + 0 + + + + Qt::AlignCenter + + + 900 + + + + + + + + + Qt::Vertical + + + + 0 + 0 + + + + + + + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + 2 + + + 2 + + + 2 + + + 2 + + + + + + + + 0 + 0 + + + + + 250 + 0 + + + + + 16777215 + 16777215 + + + + + 10 + + + + color: rgb(238, 238, 236); +background-color: rgb(92, 53, 102); + + + + 101 : [0x6500] : Treatment Vitals + + + Qt::AlignCenter + + + + + + + Send + + + + + + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + 2 + + + 2 + + + + + + 0 + 0 + + + + + 0 + 0 + + + + Systolic + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 0 + 0 + + + + Qt::AlignCenter + + + 60 + + + 250 + + + 120 + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + Diastolic + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 0 + 0 + + + + Qt::AlignCenter + + + 40 + + + 200 + + + 80 + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + Heart Rate + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 0 + 0 + + + + Qt::AlignCenter + + + 40 + + + 180 + + + 100 + + + + + + + + + Qt::Vertical + + + + 0 + 0 + + + + + + + Index: TD_Vitals/loader.py =================================================================== diff -u -r976a9362e2aaa083b5ed1926edee03be28bf2b58 -r3106c9d27f114fa3e7e435b3eeba9cfcfe178bf7 --- TD_Vitals/loader.py (.../loader.py) (revision 976a9362e2aaa083b5ed1926edee03be28bf2b58) +++ TD_Vitals/loader.py (.../loader.py) (revision 3106c9d27f114fa3e7e435b3eeba9cfcfe178bf7) @@ -30,54 +30,44 @@ self.can_interface = self.td_interface.can_interface super().__init__(os.path.dirname(__file__)) - if self.can_interface is not None: - channel_id = CAN.DenaliChannels.ui_to_td_ch_id - vitals_request_message_id = MsgIds.MSG_ID_UI_BLOOD_PRESSURE_REQUEST.value - self.can_interface.register_receiving_publication_function(channel_id, - vitals_request_message_id, - self.handle_vitals_request) def _init_loader(self): """ finds and creates widgets :return: none """ - self.tbSend = self.find_widget(QtWidgets.QToolButton , 'tbSend' ) + self.tbVitalsRspSend = self.find_widget(QtWidgets.QToolButton , 'tbVitalsRspSend' ) + self.sbVitalsReason = self.find_widget(QtWidgets.QSpinBox , 'VitalsReasonSpinBox' ) + self.tbVitalsSend = self.find_widget(QtWidgets.QToolButton , 'tbVitalsSend' ) self.sbSystolic = self.find_widget(QtWidgets.QSpinBox , 'SystolicSpinBox' ) self.sbDiastolic = self.find_widget(QtWidgets.QSpinBox , 'DiastolicSpinBox' ) self.sbHeartRate = self.find_widget(QtWidgets.QSpinBox , 'HeartRateSpinBox' ) - self.sbVitalsReason = self.find_widget(QtWidgets.QSpinBox , 'VitalsReasonSpinBox' ) def _init_connections(self): """ initializes the widgets connections :return: none """ - self.tbSend .clicked .connect(self.do_send) - self.sbSystolic .valueChanged.connect(self.do_vitals_data) - self.sbDiastolic .valueChanged.connect(self.do_vitals_data) - self.sbHeartRate .valueChanged.connect(self.do_vitals_data) + self.tbVitalsRspSend.clicked .connect(self.do_vitals_rsp ) + self.tbVitalsSend .clicked .connect(self.do_vitals_data ) + def _init_widgets(self): """ initializes the widgets' properties :return: none """ - + self.sbVitalsReason .setValue(0) self.sbSystolic .setValue(120) self.sbDiastolic .setValue(80) self.sbHeartRate .setValue(100) - self.sbVitalsReason .setValue(0) + @Slot() - def handle_vitals_request(self, message, timestamp = 0.0): - """ - Called when the user requests to firmware from UI - @return: None - """ - reason = self.sbVitalsReason.value() - self.td_interface.td_vitals_adjustment_response(reason) + def do_vitals_rsp(self): + self.td_interface.td_vitals_adjustment_response(self.sbVitalsReason.value()) + @Slot() def do_vitals_data(self): """ @@ -93,11 +83,3 @@ diastolic , heartRate ) - - @Slot() - def do_send(self): - """ - the slot for treatment set point Data - :return: none - """ - self.do_vitals_data() Index: Trends/interface.ui =================================================================== diff -u -r1d6d102bd22f94e88ad8a45f0d673a20b3254cdb -r3106c9d27f114fa3e7e435b3eeba9cfcfe178bf7 --- Trends/interface.ui (.../interface.ui) (revision 1d6d102bd22f94e88ad8a45f0d673a20b3254cdb) +++ Trends/interface.ui (.../interface.ui) (revision 3106c9d27f114fa3e7e435b3eeba9cfcfe178bf7) @@ -71,14 +71,14 @@ - + Send - + Reset @@ -123,7 +123,7 @@ 2 - + 10 @@ -138,7 +138,7 @@ - + 10 @@ -173,7 +173,7 @@ - + Qt::AlignCenter @@ -187,7 +187,7 @@ - + QFrame::Box @@ -266,7 +266,7 @@ background-color: rgb(92, 53, 102); - 101 : [0x6500] : Blood Pressure Data + 101 : [0x6500] : Vitals Data Qt::AlignCenter @@ -900,7 +900,7 @@ - 352 + 0 0 Index: Trends/loader.py =================================================================== diff -u -r1d6d102bd22f94e88ad8a45f0d673a20b3254cdb -r3106c9d27f114fa3e7e435b3eeba9cfcfe178bf7 --- Trends/loader.py (.../loader.py) (revision 1d6d102bd22f94e88ad8a45f0d673a20b3254cdb) +++ Trends/loader.py (.../loader.py) (revision 3106c9d27f114fa3e7e435b3eeba9cfcfe178bf7) @@ -50,12 +50,12 @@ finds and creates widgets :return: none """ - self.vitalsRspSend = self.find_widget(QtWidgets.QToolButton , 'tbVitalsRspSend' ) - self.vitalsRspReset = self.find_widget(QtWidgets.QToolButton , 'tbVitalsRspReset' ) - self.vitalsReqTime = self.find_widget(QtWidgets.QLabel , 'lbVitalsReqTime' ) - self.vitalsRspAccept = self.find_widget(QtWidgets.QRadioButton , 'rbVitalsRspAccept' ) - self.vitalsRspReject = self.find_widget(QtWidgets.QRadioButton , 'rbVitalsRspReject' ) - self.vitalsRspRejectReason = self.find_widget(QtWidgets.QSpinBox , 'sbVitalsRspRejectReason' ) + self.vitalsRspSend = self.find_widget(QtWidgets.QToolButton , 'tbTrendsVitalsRspSend' ) + self.vitalsRspReset = self.find_widget(QtWidgets.QToolButton , 'tbTrendsVitalsRspReset' ) + self.vitalsReqTime = self.find_widget(QtWidgets.QLabel , 'lbTrendsVitalsReqTime' ) + self.vitalsRspAccept = self.find_widget(QtWidgets.QRadioButton , 'rbTrendsVitalsRspAccept' ) + self.vitalsRspReject = self.find_widget(QtWidgets.QRadioButton , 'rbTrendsVitalsRspReject' ) + self.vitalsRspRejectReason = self.find_widget(QtWidgets.QSpinBox , 'sbTrendsVitalsRspRejectReason' ) self.trendsSend = self.find_widget(QtWidgets.QToolButton, 'tbTrendsDataSend' ) self.trendsBpSend = self.find_widget(QtWidgets.QToolButton, 'tbTrendsDataBpSend' ) @@ -185,7 +185,7 @@ @return: None """ message = message['message'] - self.prRequestLabel.setText(QTime.currentTime().toString("hh:mm:ss")) + self.vitalsReqTime.setText(QTime.currentTime().toString("hh:mm:ss")) @Slot()