Index: DD_Conductivity/interface.ui
===================================================================
diff -u
--- DD_Conductivity/interface.ui (revision 0)
+++ DD_Conductivity/interface.ui (revision 5e32491166e1ccf47a90c9d2db5d0b37ecf249bb)
@@ -0,0 +1,152 @@
+
+
+ ui_interface
+
+
+
+ 0
+ 0
+ 605
+ 283
+
+
+
+
+ 0
+ 0
+
+
+
+
+ 476
+ 250
+
+
+
+ &6 DD info/&1 Conductivity
+
+
+ -
+
+
+ 2
+
+
-
+
+
+
+ 0
+ 0
+
+
+
+
+ 352
+ 0
+
+
+
+
+ 10
+
+
+
+ color: rgb(238, 238, 236);
+background-color: rgb(206, 92, 0);
+
+
+ 31 : [0x1F00] : DD Conductivity
+
+
+ Qt::AlignCenter
+
+
+
+ -
+
+
+ Send
+
+
+
+ -
+
+
+ reset
+
+
+
+
+
+ -
+
+
-
+
+
+ CD1 (D17)
+
+
+
+ -
+
+
+ -
+
+
+ CD2 (D27)
+
+
+
+ -
+
+
+ -
+
+
+ CD3 (D29)
+
+
+
+ -
+
+
+ -
+
+
+ CD4 (D43)
+
+
+
+ -
+
+
+ -
+
+
+ CD5 (D74)
+
+
+
+ -
+
+
+
+
+ -
+
+
+ Qt::Vertical
+
+
+
+ 20
+ 40
+
+
+
+
+
+
+
+
+
Index: DD_Conductivity/loader.py
===================================================================
diff -u
--- DD_Conductivity/loader.py (revision 0)
+++ DD_Conductivity/loader.py (revision 5e32491166e1ccf47a90c9d2db5d0b37ecf249bb)
@@ -0,0 +1,86 @@
+"""
+ The TD Air Trap Mode ui loader
+"""
+# Python
+import os
+
+# Qt
+from PySide2 import QtCore, QtWidgets
+from PySide2.QtCore import Slot
+
+# parent
+from engine.dynamicloader import DynamicLoader
+
+# plugin specific
+from leahi_dialin.common.td_defs import TDOpModes
+from leahi_dialin.common.td_defs import TDStandbyStates
+
+# dd Simulator
+from leahi_dialin.ui.dd_messaging import DD_Messaging
+
+
+class Loader(DynamicLoader):
+ """
+ The DD Conductivity
+ """
+
+ def __init__(self):
+ self.dd_interface = DD_Messaging()
+ super().__init__(os.path.dirname(__file__))
+
+
+ def _init_loader(self):
+ """
+ finds and creates widgets
+ :return: none
+ """
+ self.tbReset = self.find_widget(QtWidgets.QToolButton , 'tbReset' )
+ self.tbSend = self.find_widget(QtWidgets.QToolButton , 'tbSend' )
+
+ self.CD1 = self.find_widget(QtWidgets.QDoubleSpinBox , 'CD1DoubleSpinBox' )
+ self.CD2 = self.find_widget(QtWidgets.QDoubleSpinBox , 'CD2DoubleSpinBox' )
+ self.CD3 = self.find_widget(QtWidgets.QDoubleSpinBox , 'CD3DoubleSpinBox' )
+ self.CD4 = self.find_widget(QtWidgets.QDoubleSpinBox , 'CD4DoubleSpinBox' )
+ self.CD5 = self.find_widget(QtWidgets.QDoubleSpinBox , 'CD5DoubleSpinBox' )
+
+ def _init_connections(self):
+ """
+ initializes the widgets connections
+ :return: none
+ """
+ self.tbReset.clicked.connect(self._init_widgets)
+ self.tbSend.clicked.connect(self.do_conductivity)
+ # self.tblOpMode.currentCellChanged.connect(self.do_treatment_states)
+ # self.tblSubMode.currentCellChanged.connect(self.do_treatment_states)
+
+ @Slot()
+ def _init_widgets(self):
+ """
+ initializes the widgets' properties
+ :return: none
+ """
+ self.CD1 .setValue(0)
+ self.CD2 .setValue(0)
+ self.CD3 .setValue(0)
+ self.CD4 .setValue(0)
+ self.CD5 .setValue(0)
+
+ @Slot()
+ def do_conductivity(self):
+ """
+ the slot for air trap change
+ :return: none
+ """
+ D17 = self.CD1.value()
+ D27 = self.CD2.value()
+ D29 = self.CD3.value()
+ D43 = self.CD4.value()
+ D74 = self.CD5.value()
+
+ self.dd_interface.dd_conductivity(
+ D17,
+ D27,
+ D29,
+ D43,
+ D74
+ )
\ No newline at end of file
Index: DD_GenDialysate/interface.ui
===================================================================
diff -u
--- DD_GenDialysate/interface.ui (revision 0)
+++ DD_GenDialysate/interface.ui (revision 5e32491166e1ccf47a90c9d2db5d0b37ecf249bb)
@@ -0,0 +1,300 @@
+
+
+ ui_interface
+
+
+
+ 0
+ 0
+ 741
+ 158
+
+
+
+
+ 0
+ 0
+
+
+
+
+ 476
+ 250
+
+
+
+ &6 DD info/&2 Gen Dialysate
+
+
+ -
+
+
-
+
+
-
+
+
+
+ 125
+ 0
+
+
+
+ Execution State
+
+
+
+ -
+
+
+ 100
+
+
+
+
+
+ -
+
+
-
+
+
+
+ 125
+ 0
+
+
+
+ Bicarb Level (D63)
+
+
+
+ -
+
+
+
+
+ -
+
+
-
+
+
+
+ 205
+ 0
+
+
+
+ Hydraulics Positive Pres(D18)
+
+
+
+ -
+
+
+
+
+ -
+
+
-
+
+
+
+ 205
+ 0
+
+
+
+ Hydraulics Negative Pres (D9)
+
+
+
+ -
+
+
+
+
+ -
+
+
-
+
+
+
+ 125
+ 0
+
+
+
+ DD in Progress
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
-
+
+
+
+ 205
+ 0
+
+
+
+ Spent Pressure (D51)
+
+
+
+ -
+
+
+
+
+ -
+
+
-
+
+
+
+ 125
+ 0
+
+
+
+ Dialysate Good?
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
-
+
+
+
+ 125
+ 0
+
+
+
+ Spent Level (D46)
+
+
+
+ -
+
+
+
+
+ -
+
+
-
+
+
+
+ 125
+ 0
+
+
+
+
+ 16777215
+ 16777215
+
+
+
+ Float Level (D6)
+
+
+
+ -
+
+
+
+
+
+
+ -
+
+
+ 2
+
+
-
+
+
+
+ 0
+ 0
+
+
+
+
+ 352
+ 0
+
+
+
+
+ 10
+
+
+
+ color: rgb(238, 238, 236);
+background-color: rgb(165, 74, 8);
+
+
+ 47 : [0x2F00] : DD Gen Dialysate
+
+
+ Qt::AlignCenter
+
+
+
+ -
+
+
+ Send
+
+
+
+ -
+
+
+ reset
+
+
+
+
+
+ -
+
+
+ Qt::Vertical
+
+
+
+ 20
+ 40
+
+
+
+
+
+
+
+
+
Index: DD_GenDialysate/loader.py
===================================================================
diff -u
--- DD_GenDialysate/loader.py (revision 0)
+++ DD_GenDialysate/loader.py (revision 5e32491166e1ccf47a90c9d2db5d0b37ecf249bb)
@@ -0,0 +1,98 @@
+"""
+ The DD Generate Dialysate ui loader
+"""
+# Python
+import os
+
+# Qt
+from PySide2 import QtCore, QtWidgets
+from PySide2.QtCore import Slot
+
+# parent
+from engine.dynamicloader import DynamicLoader
+
+# dd Simulator
+from leahi_dialin.ui.dd_messaging import DD_Messaging
+
+
+class Loader(DynamicLoader):
+ """
+ The DD Conductivity
+ """
+
+ def __init__(self):
+ self.dd_interface = DD_Messaging()
+ super().__init__(os.path.dirname(__file__))
+
+
+ def _init_loader(self):
+ """
+ finds and creates widgets
+ :return: none
+ """
+ self.tbReset = self.find_widget(QtWidgets.QToolButton , 'tbReset' )
+ self.tbSend = self.find_widget(QtWidgets.QToolButton , 'tbSend' )
+
+ self.execution_state = self.find_widget(QtWidgets.QSpinBox , 'ExecStateSpinBox')
+ self.dd_progess = self.find_widget(QtWidgets.QCheckBox , 'DDProgCheckBox' )
+ self.float_level = self.find_widget(QtWidgets.QSpinBox , 'D6spinBox' )
+ self.bicarb_level = self.find_widget(QtWidgets.QSpinBox , 'D63spinBox' )
+ self.spent_level = self.find_widget(QtWidgets.QSpinBox , 'D46SpinBox' )
+ self.hydraulics_neg_pressure = self.find_widget(QtWidgets.QDoubleSpinBox , 'D9DoubleSpinBox' )
+ self.hydraulics_pos_pressure = self.find_widget(QtWidgets.QDoubleSpinBox , 'D18DoubleSpinBox')
+ self.spent_pressure = self.find_widget(QtWidgets.QDoubleSpinBox , 'D51DoubleSpinBox')
+ self.dial_good = self.find_widget(QtWidgets.QCheckBox , 'dialGoodCheckBox')
+
+ def _init_connections(self):
+ """
+ initializes the widgets connections
+ :return: none
+ """
+ self.tbReset.clicked.connect(self._init_widgets)
+ self.tbSend.clicked.connect(self.do_gen_dialysate)
+ # self.tblOpMode.currentCellChanged.connect(self.do_treatment_states)
+ # self.tblSubMode.currentCellChanged.connect(self.do_treatment_states)
+
+ @Slot()
+ def _init_widgets(self):
+ """
+ initializes the widgets' properties
+ :return: none
+ """
+ self.execution_state .setValue(0)
+ self.dd_progess .setChecked(False)
+ self.float_level .setValue(0)
+ self.bicarb_level .setValue(0)
+ self.spent_level .setValue(0)
+ self.hydraulics_neg_pressure .setValue(0)
+ self.hydraulics_pos_pressure .setValue(0)
+ self.spent_pressure .setValue(0)
+ self.dial_good .setChecked(False)
+
+ @Slot()
+ def do_gen_dialysate(self):
+ """
+ the slot for dd generate dialysate data
+ :return: none
+ """
+ GenDExec = self.execution_state .value()
+ isDDInPrg = int(self.dd_progess .isChecked())
+ FltLevel1 = self.float_level .value()
+ BiCarbLvl = self.bicarb_level .value()
+ SpentLvl = self.spent_level .value()
+ HydNegPres = self.hydraulics_neg_pressure .value()
+ HydPosPres = self.hydraulics_pos_pressure .value()
+ SpentPress = self.spent_pressure .value()
+ IsDialGood = int(self.dial_good .isChecked())
+
+ self.dd_interface.dd_gen_dialysate(
+ GenDExec ,
+ isDDInPrg ,
+ FltLevel1 ,
+ BiCarbLvl ,
+ SpentLvl ,
+ HydNegPres ,
+ HydPosPres ,
+ SpentPress ,
+ IsDialGood
+ )
\ No newline at end of file
Index: DD_Versions/interface.ui
===================================================================
diff -u -r4e2342ccd6104d0cb1f5321c24c9955c2cae69c8 -r5e32491166e1ccf47a90c9d2db5d0b37ecf249bb
--- DD_Versions/interface.ui (.../interface.ui) (revision 4e2342ccd6104d0cb1f5321c24c9955c2cae69c8)
+++ DD_Versions/interface.ui (.../interface.ui) (revision 5e32491166e1ccf47a90c9d2db5d0b37ecf249bb)
@@ -67,7 +67,7 @@
color: rgb(238, 238, 236);
-background-color: rgb(52, 105, 2);
+background-color: rgb(200, 115, 15);
136 : [0x8800] : DD Serial #
@@ -154,7 +154,7 @@
color: rgb(238, 238, 236);
-background-color: rgb(52, 105, 2);
+background-color: rgb(200, 115, 15);
15 : [0x0F00] : DD Versions
Index: MainTreatmentData/interface.ui
===================================================================
diff -u
--- MainTreatmentData/interface.ui (revision 0)
+++ MainTreatmentData/interface.ui (revision 5e32491166e1ccf47a90c9d2db5d0b37ecf249bb)
@@ -0,0 +1,846 @@
+
+
+ ui_interface
+
+
+
+ 0
+ 0
+ 732
+ 296
+
+
+
+
+ 732
+ 296
+
+
+
+ &2 Treatment/&1 Main treatment
+
+
+ -
+
+
-
+
+
+
+ 0
+ 0
+
+
+
+
+ 352
+ 0
+
+
+
+
+ 10
+
+
+
+ false
+
+
+ color: rgb(238, 238, 236);
+background-color: rgb(92, 53, 102);
+
+
+ 61 : [0x3D00] : Saline Bolus
+
+
+ Qt::AlignCenter
+
+
+
+ -
+
+
-
+
+
+
+ 180
+ 0
+
+
+
+ Target Volume
+
+
+
+ -
+
+
+ 10000
+
+
+ Qt::Horizontal
+
+
+
+ -
+
+
+
+ 50
+ 0
+
+
+
+ 0
+
+
+
+
+
+ -
+
+
-
+
+
+
+ 180
+ 0
+
+
+
+
+ 180
+ 16777215
+
+
+
+ Cumulative Volume
+
+
+
+ -
+
+
+ 10000
+
+
+ Qt::Horizontal
+
+
+
+ -
+
+
+
+ 50
+ 0
+
+
+
+ 0
+
+
+
+
+
+ -
+
+
-
+
+
+
+ 180
+ 0
+
+
+
+
+ 180
+ 16777215
+
+
+
+ Current Delivered Volume
+
+
+
+ -
+
+
+ 10000
+
+
+ Qt::Horizontal
+
+
+
+ -
+
+
+
+ 50
+ 0
+
+
+
+ 0
+
+
+
+
+
+ -
+
+
-
+
+
+
+ 50
+ 16777215
+
+
+
+ State
+
+
+ Qt::AlignJustify|Qt::AlignVCenter
+
+
+
+ -
+
+
+
+ 50
+ 16777215
+
+
+
+ 1000
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+
+
+ -
+
+
+ Qt::Vertical
+
+
+
+ 20
+ 40
+
+
+
+
+
+
+ -
+
+
-
+
+
+
+ 0
+ 0
+
+
+
+
+ 352
+ 0
+
+
+
+
+ 16777215
+ 16777215
+
+
+
+
+ 10
+
+
+
+ color: rgb(238, 238, 236);
+background-color: rgb(92, 53, 102);
+
+
+
+ 59 : [0x3B00] : Treament Time
+
+
+ Qt::AlignCenter
+
+
+
+ -
+
+
-
+
+
+
+ 180
+ 0
+
+
+
+ TX Duration
+
+
+
+ -
+
+
+ 480
+
+
+ 15
+
+
+ Qt::Horizontal
+
+
+
+ -
+
+
+
+ 50
+ 0
+
+
+
+ 0
+
+
+
+
+
+ -
+
+
-
+
+
+
+ 180
+ 0
+
+
+
+ Elapsed Time
+
+
+
+ -
+
+
+ 480
+
+
+ Qt::Horizontal
+
+
+
+ -
+
+
+
+ 50
+ 0
+
+
+
+ 0
+
+
+
+
+
+ -
+
+
+ Qt::Vertical
+
+
+
+ 20
+ 60
+
+
+
+
+
+
+ -
+
+
-
+
+
+
+ 0
+ 0
+
+
+
+
+ 352
+ 0
+
+
+
+
+ 10
+
+
+
+ color: rgb(238, 238, 236);
+background-color: rgb(92, 53, 102);
+
+
+ 62 : [0x3E00] : Ultrafiltration
+
+
+ Qt::AlignCenter
+
+
+
+ -
+
+
-
+
+
+
+ 180
+ 0
+
+
+
+ Set Volume L
+
+
+
+ -
+
+
+ 10000
+
+
+ Qt::Horizontal
+
+
+
+ -
+
+
+
+ 50
+ 0
+
+
+
+ 0
+
+
+
+
+
+ -
+
+
-
+
+
+
+ 180
+ 0
+
+
+
+ Target Rate L/Hr
+
+
+
+ -
+
+
+ 10000
+
+
+ Qt::Horizontal
+
+
+
+ -
+
+
+
+ 50
+ 0
+
+
+
+ 0
+
+
+
+
+
+ -
+
+
-
+
+
+
+ 180
+ 0
+
+
+
+ Volume Delivered L
+
+
+
+ -
+
+
+ 10000
+
+
+ Qt::Horizontal
+
+
+
+ -
+
+
+
+ 50
+ 0
+
+
+
+ 0
+
+
+
+
+
+ -
+
+
-
+
+
+ State
+
+
+
+ -
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+
+
+ -
+
+
+ Qt::Vertical
+
+
+
+ 20
+ 40
+
+
+
+
+
+
+ -
+
+
-
+
+
+
+ 0
+ 0
+
+
+
+
+ 352
+ 0
+
+
+
+
+ 16777215
+ 16777215
+
+
+
+
+ 10
+
+
+
+ color: rgb(238, 238, 236);
+background-color: rgb(92, 53, 102);
+
+
+
+ 79 : [0x4F00] : Set Point Data
+
+
+ Qt::AlignCenter
+
+
+
+ -
+
+
-
+
+
+
+ 180
+ 0
+
+
+
+ Blood Flow
+
+
+
+ -
+
+
+
+
+ -
+
+
-
+
+
+
+ 180
+ 0
+
+
+
+ Dial Flow
+
+
+
+ -
+
+
+
+
+ -
+
+
-
+
+
+
+ 180
+ 0
+
+
+
+ Dial Temp
+
+
+
+ -
+
+
+
+
+ -
+
+
+ Qt::Vertical
+
+
+
+ 20
+ 10
+
+
+
+
+
+
+ -
+
+
+ Qt::Vertical
+
+
+
+ 20
+ 40
+
+
+
+
+
+
+
+
+
+ TargetVolumeSlider
+ valueChanged(int)
+ label_8
+ setNum(int)
+
+
+ 305
+ 44
+
+
+ 526
+ 42
+
+
+
+
+ CumulativeVolumeSlider
+ valueChanged(int)
+ label_9
+ setNum(int)
+
+
+ 305
+ 71
+
+
+ 525
+ 71
+
+
+
+
+ SalineCurrDeliveredVolumeSlider
+ valueChanged(int)
+ label_10
+ setNum(int)
+
+
+ 305
+ 92
+
+
+ 532
+ 101
+
+
+
+
+ UFSetVolSlider
+ valueChanged(int)
+ label_16
+ setNum(int)
+
+
+ 283
+ 180
+
+
+ 530
+ 185
+
+
+
+
+ UFRateSlider
+ valueChanged(int)
+ label_17
+ setNum(int)
+
+
+ 269
+ 201
+
+
+ 531
+ 201
+
+
+
+
+ UFVolDelSlider
+ valueChanged(int)
+ label_18
+ setNum(int)
+
+
+ 269
+ 234
+
+
+ 536
+ 237
+
+
+
+
+ DurationSlider
+ valueChanged(int)
+ label_14
+ setNum(int)
+
+
+ 288
+ 313
+
+
+ 543
+ 315
+
+
+
+
+ ElapsedSlider
+ valueChanged(int)
+ label_15
+ setNum(int)
+
+
+ 283
+ 343
+
+
+ 528
+ 343
+
+
+
+
+
Index: MainTreatmentData/loader.py
===================================================================
diff -u
--- MainTreatmentData/loader.py (revision 0)
+++ MainTreatmentData/loader.py (revision 5e32491166e1ccf47a90c9d2db5d0b37ecf249bb)
@@ -0,0 +1,162 @@
+"""
+ The TD Air Trap Mode ui loader
+"""
+# Python
+import os
+
+# Qt
+from PySide2 import QtCore, QtWidgets
+from PySide2.QtCore import Slot
+
+# parent
+from engine.dynamicloader import DynamicLoader
+
+# plugin specific
+from leahi_dialin.common.td_defs import TDOpModes
+from leahi_dialin.common.td_defs import TDStandbyStates
+
+# hd Simulator
+from leahi_dialin.ui.td_messaging import TD_Messaging
+
+
+class Loader(DynamicLoader):
+ """
+ The TD Air Trap ui loader
+ """
+
+ def __init__(self):
+ self.td_interface = TD_Messaging()
+ super().__init__(os.path.dirname(__file__))
+
+
+ def _init_loader(self):
+ """
+ finds and creates widgets
+ :return: none
+ """
+ self.saline_tgt_vol = self.find_widget(QtWidgets.QSlider , 'TargetVolumeSlider' )
+ self.saline_cum_vol = self.find_widget(QtWidgets.QSlider , 'CumulativeVolumeSlider' )
+ self.saline_bol_del = self.find_widget(QtWidgets.QSlider , 'SalineCurrDeliveredVolumeSlider' )
+ self.saline_state = self.find_widget(QtWidgets.QSpinBox , 'SalineStatespinBox' )
+
+ self.UF_set_vol = self.find_widget(QtWidgets.QSlider , 'UFSetVolSlider' )
+ self.UF_tgt_rate = self.find_widget(QtWidgets.QSlider , 'UFRateSlider' )
+ self.UF_vol_del = self.find_widget(QtWidgets.QSlider , 'UFVolDelSlider' )
+ self.UF_State = self.find_widget(QtWidgets.QSpinBox , 'UFStatespinBox' )
+
+ self.tx_duration = self.find_widget(QtWidgets.QSlider , 'DurationSlider' )
+ self.tx_elapsed = self.find_widget(QtWidgets.QSlider , 'ElapsedSlider' )
+
+ self.blood_flow_st_pt = self.find_widget(QtWidgets.QSpinBox , 'BloodFlowSpinBox' )
+ self.dial_flow_st_pt = self.find_widget(QtWidgets.QSpinBox , 'DialFlowDpinBox' )
+ self.dial_temp_st_pt = self.find_widget(QtWidgets.QDoubleSpinBox , 'DialTempDoubleSpinBox' )
+
+ def _init_connections(self):
+ """
+ initializes the widgets connections
+ :return: none
+ """
+ self.saline_tgt_vol .valueChanged.connect(self.do_saline_data)
+ self.saline_cum_vol .valueChanged.connect(self.do_saline_data)
+ self.saline_bol_del .valueChanged.connect(self.do_saline_data)
+ self.saline_state .valueChanged.connect(self.do_saline_data)
+
+ self.UF_set_vol .valueChanged.connect(self.do_uf_data)
+ self.UF_tgt_rate .valueChanged.connect(self.do_uf_data)
+ self.UF_vol_del .valueChanged.connect(self.do_uf_data)
+ self.UF_State .valueChanged.connect(self.do_uf_data)
+
+ self.tx_duration .valueChanged.connect(self.do_tx_time_data)
+ self.tx_elapsed .valueChanged.connect(self.do_tx_time_data)
+
+ self.blood_flow_st_pt.valueChanged.connect(self.do_tx_set_point_data)
+ self.dial_flow_st_pt .valueChanged.connect(self.do_tx_set_point_data)
+ self.dial_temp_st_pt .valueChanged.connect(self.do_tx_set_point_data)
+
+ @Slot()
+ def _init_widgets(self):
+ """
+ initializes the widgets' properties
+ :return: none
+ """
+
+ self.saline_tgt_vol .setValue(0)
+ self.saline_cum_vol .setValue(0)
+ self.saline_bol_del .setValue(0)
+ self.saline_state .setValue(0)
+
+ self.UF_set_vol .setValue(0)
+ self.UF_tgt_rate .setValue(0)
+ self.UF_vol_del .setValue(0)
+ self.UF_State .setValue(0)
+
+ self.tx_duration .setValue(0)
+ self.tx_elapsed .setValue(0)
+
+ @Slot()
+ def do_saline_data(self):
+ """
+ the slot for Saline Data
+ :return: none
+ """
+ target_volume = self.saline_tgt_vol.value()
+ cumulative_volume = self.saline_cum_vol.value()
+ bolus_volume = self.saline_bol_del.value()
+ state = self.saline_state .value()
+
+ self.td_interface.td_saline(
+ target_volume ,
+ cumulative_volume ,
+ bolus_volume ,
+ state
+ )
+
+ @Slot()
+ def do_uf_data(self):
+ """
+ the slot for UF Data
+ :return: none
+ """
+ set_volume = self.UF_set_vol .value()
+ target_rate = self.UF_tgt_rate .value()
+ volume_delivered = self.UF_vol_del .value()
+ state = self.UF_State .value()
+
+ self.td_interface.td_ultrafiltration(
+ set_volume ,
+ target_rate ,
+ volume_delivered ,
+ state
+ )
+
+ @Slot()
+ def do_tx_time_data(self):
+ """
+ the slot for treatment time Data
+ :return: none
+ """
+ tx_duration_s = self.tx_duration.value()
+ tx_elapsed_s = self.tx_elapsed.value()
+ tx_remaining_s = 0 if tx_duration_s-tx_elapsed_s <= 0 else tx_duration_s-tx_elapsed_s
+
+ self.td_interface.td_treatment_time(
+ tx_duration_s ,
+ tx_elapsed_s ,
+ tx_remaining_s
+ )
+
+ @Slot()
+ def do_tx_set_point_data(self):
+ """
+ the slot for treatment set point Data
+ :return: none
+ """
+ blood_flow = self.blood_flow_st_pt.value()
+ dialysate_flow = self.dial_flow_st_pt .value()
+ dialysate_temp = self.dial_temp_st_pt .value()
+
+ self.td_interface.td_treatment_set_points(
+ blood_flow ,
+ dialysate_flow ,
+ dialysate_temp
+ )
\ No newline at end of file
Index: TD_AirTrap/interface.ui
===================================================================
diff -u -r4b4fedc07e2f374ff7618f47d00aa2db2323f91d -r5e32491166e1ccf47a90c9d2db5d0b37ecf249bb
--- TD_AirTrap/interface.ui (.../interface.ui) (revision 4b4fedc07e2f374ff7618f47d00aa2db2323f91d)
+++ TD_AirTrap/interface.ui (.../interface.ui) (revision 5e32491166e1ccf47a90c9d2db5d0b37ecf249bb)
@@ -7,7 +7,7 @@
0
0
476
- 250
+ 265
@@ -23,172 +23,156 @@
- &1 States/&2 TD Air Trap
+ &5 TD info/&1 TD Air Trap
-
-
- 4
-
-
- 0
-
- -
-
+
+
-
+
+
+ 2
+
-
-
-
- 2
+
+
+
+ 0
+ 0
+
-
-
-
-
-
- 0
- 0
-
-
-
-
- 352
- 0
-
-
-
-
- 10
-
-
-
- color: rgb(238, 238, 236);
-background-color: rgb(52, 105, 2);
-
-
- 42 : [0x2A00] : TD Air Trap
-
-
- Qt::AlignCenter
-
-
-
- -
-
-
- Send
-
-
-
- -
-
-
- reset
-
-
-
-
+
+
+ 352
+ 0
+
+
+
+
+ 10
+
+
+
+ color: rgb(238, 238, 236);
+background-color: rgb(114, 159, 240);
+
+
+ 42 : [0x2A00] : TD Air Trap
+
+
+ Qt::AlignCenter
+
+
-
-
-
-
-
-
- QLayout::SetMaximumSize
-
-
- 10
-
-
- 10
-
-
- 0
-
-
-
-
-
- low Level
-
-
-
- -
-
-
- 1000
-
-
-
- -
-
-
- upper Level
-
-
-
- -
-
-
- 1000
-
-
-
- -
-
-
- low Level Raw
-
-
-
- -
-
-
- 1000
-
-
-
- -
-
-
- upper Level Raw
-
-
-
- -
-
-
- 1000
-
-
-
- -
-
-
- valve State
-
-
-
- -
-
-
- 1000
-
-
-
- -
-
-
- Control
-
-
-
- -
-
-
-
-
-
+
+
+ Send
+
+
+ -
+
+
+ reset
+
+
+
-
+
+
+ low Level
+
+
+
+ -
+
+
+ 1000
+
+
+
+ -
+
+
+ upper Level
+
+
+
+ -
+
+
+ 1000
+
+
+
+ -
+
+
+ low Level Raw
+
+
+
+ -
+
+
+ 1000
+
+
+
+ -
+
+
+ upper Level Raw
+
+
+
+ -
+
+
+ 1000
+
+
+
+ -
+
+
+ valve State H13
+
+
+
+ -
+
+
+ 1000
+
+
+
+ -
+
+
+ valve State H20
+
+
+
+ -
+
+
+ 1000
+
+
+
+ -
+
+
+ Control
+
+
+
+ -
+
+
+ -
Qt::Vertical
Index: TD_AirTrap/loader.py
===================================================================
diff -u -rf05537cca2e7e054a5124d4f5f9ed3ad26264458 -r5e32491166e1ccf47a90c9d2db5d0b37ecf249bb
--- TD_AirTrap/loader.py (.../loader.py) (revision f05537cca2e7e054a5124d4f5f9ed3ad26264458)
+++ TD_AirTrap/loader.py (.../loader.py) (revision 5e32491166e1ccf47a90c9d2db5d0b37ecf249bb)
@@ -41,7 +41,8 @@
self.upper_level = self.find_widget(QtWidgets.QSpinBox , 'upperLevelSpinBox' )
self.low_level_raw = self.find_widget(QtWidgets.QSpinBox , 'lowLevelRawSpinBox' )
self.upper_level_raw = self.find_widget(QtWidgets.QSpinBox , 'upperLevelRawSpinBox')
- self.valve_state = self.find_widget(QtWidgets.QSpinBox , 'valveStateSpinBox' )
+ self.valve_state_H13 = self.find_widget(QtWidgets.QSpinBox , 'valveStateH13SpinBox')
+ self.valve_state_H20 = self.find_widget(QtWidgets.QSpinBox , 'valveStateH20SpinBox')
self.control = self.find_widget(QtWidgets.QCheckBox , 'controlCheckBox' )
def _init_connections(self):
@@ -64,7 +65,8 @@
self.upper_level.setValue(0)
self.low_level_raw.setValue(0)
self.upper_level_raw.setValue(0)
- self.valve_state.setValue(0)
+ self.valve_state_H13.setValue(0)
+ self.valve_state_H20.setValue(0)
self.control.setChecked(False)
@@ -78,15 +80,17 @@
upper_level = self.upper_level.value()
lower_level_raw = self.low_level_raw.value()
upper_level_raw = self.upper_level_raw.value()
- valve_state = self.valve_state.value()
+ valve_state_h13 = self.valve_state_H13.value()
+ valve_state_h20 = self.valve_state_H20.value()
- controlling = self.control.isChecked()
+ controlling = int(self.control.isChecked())
# print(f"{low_level}\n{upper_level}\n{lower_level_raw}\n{upper_level_raw}\n{valve_state}\n{controlling}")
self.td_interface.td_air_trap(
low_level,
upper_level,
lower_level_raw,
upper_level_raw,
- valve_state,
+ valve_state_h13,
+ valve_state_h20,
controlling
)
\ No newline at end of file
Index: TD_Battery/interface.ui
===================================================================
diff -u -rf05537cca2e7e054a5124d4f5f9ed3ad26264458 -r5e32491166e1ccf47a90c9d2db5d0b37ecf249bb
--- TD_Battery/interface.ui (.../interface.ui) (revision f05537cca2e7e054a5124d4f5f9ed3ad26264458)
+++ TD_Battery/interface.ui (.../interface.ui) (revision 5e32491166e1ccf47a90c9d2db5d0b37ecf249bb)
@@ -11,7 +11,7 @@
- &1 States/&3 TD Battery
+ &5 TD info/&2 TD Battery
-
@@ -41,7 +41,7 @@
color: rgb(238, 238, 236);
-background-color: rgb(52, 105, 2);
+background-color: rgb(44, 159, 251);
148 : [0x9400] : TD Battery
Index: TD_Battery/loader.py
===================================================================
diff -u -r4e2342ccd6104d0cb1f5321c24c9955c2cae69c8 -r5e32491166e1ccf47a90c9d2db5d0b37ecf249bb
--- TD_Battery/loader.py (.../loader.py) (revision 4e2342ccd6104d0cb1f5321c24c9955c2cae69c8)
+++ TD_Battery/loader.py (.../loader.py) (revision 5e32491166e1ccf47a90c9d2db5d0b37ecf249bb)
@@ -66,7 +66,7 @@
:return: none
"""
capacity = self.capacity.value()
- ac_power = self.acpower.isChecked()
+ ac_power = int(self.acpower.isChecked())
self.td_interface.td_battery(
capacity,
Index: TD_BloodPump/interface.ui
===================================================================
diff -u -rfed26cc0ded3c0c08da0588bdb531143867fd1b3 -r5e32491166e1ccf47a90c9d2db5d0b37ecf249bb
--- TD_BloodPump/interface.ui (.../interface.ui) (revision fed26cc0ded3c0c08da0588bdb531143867fd1b3)
+++ TD_BloodPump/interface.ui (.../interface.ui) (revision 5e32491166e1ccf47a90c9d2db5d0b37ecf249bb)
@@ -7,11 +7,11 @@
0
0
596
- 346
+ 240
- &1 States/&4 TD Blood Pump
+ &2 Treatment/&3 TD Blood Pump
-
@@ -37,7 +37,7 @@
color: rgb(238, 238, 236);
-background-color: rgb(52, 105, 2);
+background-color: rgb(164, 0, 0);
17 : [0x1100] : TD Blood pump
@@ -90,7 +90,7 @@
-
- rot Count
+ rotor Count
@@ -153,7 +153,7 @@
-
- rot Speed
+ rotor Speed
@@ -167,7 +167,7 @@
-
- mot Speed
+ motor Speed
@@ -178,30 +178,30 @@
- -
+
-
RPM
- -
+
-
999.990000000000009
- -
-
-
- -
+
-
- Curr Motor
+ current Motor
+ -
+
+
Index: TD_Ejector/interface.ui
===================================================================
diff -u -rfed26cc0ded3c0c08da0588bdb531143867fd1b3 -r5e32491166e1ccf47a90c9d2db5d0b37ecf249bb
--- TD_Ejector/interface.ui (.../interface.ui) (revision fed26cc0ded3c0c08da0588bdb531143867fd1b3)
+++ TD_Ejector/interface.ui (.../interface.ui) (revision 5e32491166e1ccf47a90c9d2db5d0b37ecf249bb)
@@ -11,7 +11,7 @@
- &1 States/&9 TD Ejector
+ &5 TD info/&3 TD Ejector
@@ -35,14 +35,20 @@
0
+
+
+ 0
+ 3
+
+
10
color: rgb(238, 238, 236);
-background-color: rgb(52, 105, 2);
+background-color: rgb(52, 101, 164);
78 : [0x4E00] : TD Ejector
Index: TD_OpMode/interface.ui
===================================================================
diff -u -rc81cc70c3e01faf81396c4c891509471eb4fffb5 -r5e32491166e1ccf47a90c9d2db5d0b37ecf249bb
--- TD_OpMode/interface.ui (.../interface.ui) (revision c81cc70c3e01faf81396c4c891509471eb4fffb5)
+++ TD_OpMode/interface.ui (.../interface.ui) (revision 5e32491166e1ccf47a90c9d2db5d0b37ecf249bb)
@@ -11,7 +11,7 @@
- &1 States/&1 HD Op Mode
+ &1 States/&1 TD Op Mode
-
Index: TD_Pressures/interface.ui
===================================================================
diff -u
--- TD_Pressures/interface.ui (revision 0)
+++ TD_Pressures/interface.ui (revision 5e32491166e1ccf47a90c9d2db5d0b37ecf249bb)
@@ -0,0 +1,1066 @@
+
+
+ ui_interface
+
+
+
+ 0
+ 0
+ 761
+ 338
+
+
+
+
+ 0
+ 0
+
+
+
+
+ 476
+ 250
+
+
+
+ &2 Treatment/&2 Pressures
+
+
+
-
+
+
+ 2
+
+
-
+
+
+
+ 0
+ 0
+
+
+
+
+ 352
+ 0
+
+
+
+
+ 10
+
+
+
+ color: rgb(238, 238, 236);
+background-color: rgb(139, 59, 59);
+
+
+ 36 : [0x2400] : TD Pressures
+
+
+ Qt::AlignCenter
+
+
+
+ -
+
+
+ Send
+
+
+
+ -
+
+
+ reset
+
+
+
+
+
+ -
+
+
-
+
+
+ QLayout::SetFixedSize
+
+
-
+
+
-
+
+
+
+ 0
+ 0
+
+
+
+
+ 30
+ 0
+
+
+
+
+ 10
+
+
+
+ Low
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 30
+ 0
+
+
+
+ Value
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+ sldArterialValue
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 30
+ 0
+
+
+
+
+ 10
+
+
+
+ High
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 30
+ 0
+
+
+
+
+ 10
+
+
+
+ 0
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 10
+
+
+
+ -300
+
+
+ 0
+
+
+ 10
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 10
+
+
+
+ -300
+
+
+ 0
+
+
+ 10
+
+
+ -300
+
+
+
+ -
+
+
+ -400
+
+
+ 600
+
+
+ -300
+
+
+ Qt::Horizontal
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 30
+ 0
+
+
+
+
+ 10
+
+
+
+ 0
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+ -
+
+
+
+ 30
+ 0
+
+
+
+ 0
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 30
+ 0
+
+
+
+ Avg
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+ sldArterialValue
+
+
+
+ -
+
+
+ -400
+
+
+ 600
+
+
+ -300
+
+
+ Qt::Horizontal
+
+
+
+ -
+
+
+
+ 30
+ 0
+
+
+
+ 0
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 10
+
+
+
+ background-color: rgb(229, 156, 156);
+
+
+ TMP Limit (mmHg)
+
+
+ Qt::AlignCenter
+
+
+
+ -
+
+
+
+ 10
+
+
+
+ Qt::Vertical
+
+
+
+ -
+
+
+ QLayout::SetFixedSize
+
+
-
+
+
+
+ 0
+ 0
+
+
+
+
+ 30
+ 0
+
+
+
+
+ 10
+
+
+
+ Low
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 10
+
+
+
+ -100
+
+
+ 400
+
+
+ 10
+
+
+ 20
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 30
+ 0
+
+
+
+
+ 10
+
+
+
+ 0
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 10
+
+
+
+ -100
+
+
+ 400
+
+
+ 10
+
+
+ 200
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 30
+ 0
+
+
+
+
+ 10
+
+
+
+ 0
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 30
+ 0
+
+
+
+
+ 10
+
+
+
+ High
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+ -
+
+
+
+ 30
+ 0
+
+
+
+ Value
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+ sldVenousValue
+
+
+
+ -
+
+
+ -100
+
+
+ 700
+
+
+ Qt::Horizontal
+
+
+
+ -
+
+
+
+ 30
+ 0
+
+
+
+ 0
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+
+
+ -
+
+
-
+
+
+
+ 0
+ 0
+
+
+
+
+ 30
+ 0
+
+
+
+
+ 10
+
+
+
+ 0
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 10
+
+
+
+ 20
+
+
+ 600
+
+
+ 10
+
+
+
+ -
+
+
+
+ 30
+ 0
+
+
+
+ Value
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+ sldVenousValue
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 30
+ 0
+
+
+
+
+ 10
+
+
+
+ 0
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+ -
+
+
+
+ 30
+ 0
+
+
+
+ 0
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 30
+ 0
+
+
+
+
+ 10
+
+
+
+ High
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+ -
+
+
+ -100
+
+
+ 700
+
+
+ Qt::Horizontal
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 30
+ 0
+
+
+
+
+ 10
+
+
+
+ Low
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 10
+
+
+
+ 20
+
+
+ 600
+
+
+ 10
+
+
+ 400
+
+
+
+ -
+
+
+
+ 30
+ 0
+
+
+
+ Avg
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+ sldVenousValue
+
+
+
+ -
+
+
+ -100
+
+
+ 700
+
+
+ Qt::Horizontal
+
+
+
+ -
+
+
+
+ 30
+ 0
+
+
+
+ 0
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+
+
+ -
+
+
+
+ 10
+
+
+
+ Qt::Vertical
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 10
+
+
+
+ background-color: rgb(229, 156, 156);
+
+
+ Venous Limit (mmHg)
+
+
+ Qt::AlignCenter
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 10
+
+
+
+ background-color: rgb(229, 156, 156);
+
+
+ Arterial Limit (mmHg)
+
+
+ Qt::AlignCenter
+
+
+
+
+
+ -
+
+
-
+
+
+ Limit State
+
+
+
+ -
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+
+
+
+
+ -
+
+
+ Qt::Vertical
+
+
+
+ 20
+ 115
+
+
+
+
+
+
+
+
+
+ sldArterialValue
+ valueChanged(int)
+ lblArterialValue
+ setNum(int)
+
+
+ 129
+ 131
+
+
+ 235
+ 140
+
+
+
+
+ sldVenousValue
+ valueChanged(int)
+ lblVenousValue
+ setNum(int)
+
+
+ 360
+ 136
+
+
+ 491
+ 139
+
+
+
+
+ sldTMPValue
+ valueChanged(int)
+ lblVenousValue_2
+ setNum(int)
+
+
+ 608
+ 152
+
+
+ 741
+ 154
+
+
+
+
+ sldArterialValueLong
+ valueChanged(int)
+ lblArterialValue_2
+ setNum(int)
+
+
+ 185
+ 156
+
+
+ 235
+ 160
+
+
+
+
+ sldVenousValueLong
+ valueChanged(int)
+ lblVenousValue_3
+ setNum(int)
+
+
+ 435
+ 157
+
+
+ 485
+ 160
+
+
+
+
+
Index: TD_Pressures/loader.py
===================================================================
diff -u
--- TD_Pressures/loader.py (revision 0)
+++ TD_Pressures/loader.py (revision 5e32491166e1ccf47a90c9d2db5d0b37ecf249bb)
@@ -0,0 +1,183 @@
+"""
+ The TD Pressures Mode ui loader
+"""
+# Python
+import os
+
+# Qt
+from PySide2 import QtCore, QtWidgets
+from PySide2.QtCore import Slot
+
+# parent
+from engine.dynamicloader import DynamicLoader
+
+# Plugin specific
+from leahi_dialin.ui.common import Ranges
+
+# hd Simulator
+from leahi_dialin.ui.td_messaging import TD_Messaging
+
+
+class Loader(DynamicLoader):
+ """
+ The TD Pressures ui loader
+ """
+
+ def __init__(self):
+ self.td_interface = TD_Messaging()
+ super().__init__(os.path.dirname(__file__))
+
+ def _init_loader(self):
+ """
+ finds and creates widgets
+ :return: none
+ """
+ self.lblArterialTitle = self.find_widget(QtWidgets.QLabel ,'lblArterialTitle')
+ self.lblVenousTitle = self.find_widget(QtWidgets.QLabel ,'lblVenousTitle')
+ self.lblTMPTitle = self.find_widget(QtWidgets.QLabel ,'lblTMPTitle')
+
+ self.lblArterialLimitLow = self.find_widget(QtWidgets.QLabel ,'lblArterialLimitLow')
+ self.lblArterialLimitHigh = self.find_widget(QtWidgets.QLabel ,'lblArterialLimitHigh')
+ self.lblVenousLimitLow = self.find_widget(QtWidgets.QLabel ,'lblVenousLimitLow')
+ self.lblVenousLimitHigh = self.find_widget(QtWidgets.QLabel ,'lblVenousLimitHigh')
+ self.lblTMPLimitLow = self.find_widget(QtWidgets.QLabel ,'lblTMPLimitLow')
+ self.lblTMPLimitHigh = self.find_widget(QtWidgets.QLabel ,'lblTMPLimitHigh')
+ # self.lblAVPressuresAction = self.find_widget(QtWidgets.QLabel ,'lblAVPressuresAction')
+
+ self.spnArterialLimitLow = self.find_widget(QtWidgets.QSpinBox ,'spnArterialLimitLow')
+ self.spnArterialLimitHigh = self.find_widget(QtWidgets.QSpinBox ,'spnArterialLimitHigh')
+ self.spnVenousLimitLow = self.find_widget(QtWidgets.QSpinBox ,'spnVenousLimitLow')
+ self.spnVenousLimitHigh = self.find_widget(QtWidgets.QSpinBox ,'spnVenousLimitHigh')
+ self.spnTMPLimitLow = self.find_widget(QtWidgets.QSpinBox ,'spnTMPLimitLow')
+ self.spnTMPLimitHigh = self.find_widget(QtWidgets.QSpinBox ,'spnTMPLimitHigh')
+ # self.spnAVPressuresRejectReason = self.find_spinbox('spnAVPressuresRejectReason')
+
+ self.sldArterialValue = self.find_widget(QtWidgets.QSlider ,'sldArterialValue')
+ self.sldArterialValueLong = self.find_widget(QtWidgets.QSlider ,'sldArterialValueLong')
+ self.sldVenousValue = self.find_widget(QtWidgets.QSlider ,'sldVenousValue')
+ self.sldVenousValueLong = self.find_widget(QtWidgets.QSlider ,'sldVenousValueLong')
+ self.sldTMPValue = self.find_widget(QtWidgets.QSlider ,'sldTMPValue')
+
+ self.spnLimitState = self.find_widget(QtWidgets.QSpinBox ,'spnLimitState')
+
+ def _init_widgets(self):
+ """
+ initializes the widgets' properties
+ :return: none
+ """
+ self.lblArterialTitle.setText(
+ f"{self.lblArterialTitle.text()} [{Ranges.ARTERIAL_PRESSURE_MINIMUM},{Ranges.ARTERIAL_PRESSURE_MAXIMUM}]"
+ )
+ self.lblVenousTitle.setText(
+ f"{self.lblVenousTitle.text()} [{Ranges.VENOUS_PRESSURE_MINIMUM},{Ranges.VENOUS_PRESSURE_MAXIMUM}]"
+ )
+ self.lblTMPTitle.setText(
+ f"{self.lblTMPTitle.text()} [{Ranges.TMP_PRESSURE_MINIMUM},{Ranges.TMP_PRESSURE_MAXIMUM}]"
+ )
+
+ self.lblArterialLimitLow.setText(f"{Ranges.ARTERIAL_PRESSURE_LOW_MIN}\n{Ranges.ARTERIAL_PRESSURE_LOW_MAX}")
+ self.lblArterialLimitHigh.setText(f"{Ranges.ARTERIAL_PRESSURE_HIGH_MIN}\n{Ranges.ARTERIAL_PRESSURE_HIGH_MAX}")
+ self.lblVenousLimitLow.setText(f"{Ranges.VENOUS_PRESSURE_LOW_MIN}\n{Ranges.VENOUS_PRESSURE_LOW_MAX}")
+ self.lblVenousLimitHigh.setText(f"{Ranges.VENOUS_PRESSURE_HIGH_MIN}\n{Ranges.VENOUS_PRESSURE_HIGH_MAX}")
+ self.lblTMPLimitLow.setText(f"{Ranges.TMP_PRESSURE_LOW_MIN}\n{Ranges.TMP_PRESSURE_LOW_MAX}")
+ self.lblTMPLimitHigh.setText(f"{Ranges.TMP_PRESSURE_HIGH_MIN}\n{Ranges.TMP_PRESSURE_HIGH_MAX}")
+
+ self.sldArterialValue.setMinimum(Ranges.ARTERIAL_PRESSURE_MINIMUM)
+ self.sldArterialValue.setMaximum(Ranges.ARTERIAL_PRESSURE_MAXIMUM)
+ self.sldArterialValue.setValue(0)
+ self.sldArterialValueLong.setMinimum(Ranges.ARTERIAL_PRESSURE_MINIMUM)
+ self.sldArterialValueLong.setMaximum(Ranges.ARTERIAL_PRESSURE_MAXIMUM)
+ self.sldArterialValueLong.setValue(0)
+ self.sldVenousValue.setMinimum(Ranges.VENOUS_PRESSURE_MINIMUM)
+ self.sldVenousValue.setMaximum(Ranges.VENOUS_PRESSURE_MAXIMUM)
+ self.sldVenousValue.setValue(0)
+ self.sldVenousValueLong.setMinimum(Ranges.VENOUS_PRESSURE_MINIMUM)
+ self.sldVenousValueLong.setMaximum(Ranges.VENOUS_PRESSURE_MAXIMUM)
+ self.sldVenousValueLong.setValue(0)
+ self.sldTMPValue.setMinimum(Ranges.TMP_PRESSURE_MINIMUM)
+ self.sldTMPValue.setMaximum(Ranges.TMP_PRESSURE_MAXIMUM)
+ self.sldTMPValue.setValue(0)
+
+ self.spnArterialLimitLow.setMinimum(Ranges.ARTERIAL_PRESSURE_LOW_MIN)
+ self.spnArterialLimitLow.setMaximum(Ranges.ARTERIAL_PRESSURE_LOW_MAX)
+ self.spnArterialLimitLow.setValue(Ranges.ARTERIAL_PRESSURE_LOW_DEF)
+
+ self.spnArterialLimitHigh.setMinimum(Ranges.ARTERIAL_PRESSURE_HIGH_MIN)
+ self.spnArterialLimitHigh.setMaximum(Ranges.ARTERIAL_PRESSURE_HIGH_MAX)
+ self.spnArterialLimitHigh.setValue(Ranges.ARTERIAL_PRESSURE_HIGH_DEF)
+
+ self.spnVenousLimitLow.setMinimum(Ranges.VENOUS_PRESSURE_LOW_MIN)
+ self.spnVenousLimitLow.setMaximum(Ranges.VENOUS_PRESSURE_LOW_MAX)
+ self.spnVenousLimitLow.setValue(Ranges.VENOUS_PRESSURE_LOW_DEF)
+
+ self.spnVenousLimitHigh.setMinimum(Ranges.VENOUS_PRESSURE_HIGH_MIN)
+ self.spnVenousLimitHigh.setMaximum(Ranges.VENOUS_PRESSURE_HIGH_MAX)
+ self.spnVenousLimitHigh.setValue(Ranges.VENOUS_PRESSURE_HIGH_DEF)
+
+ self.spnTMPLimitLow.setMinimum(Ranges.TMP_PRESSURE_LOW_MIN)
+ self.spnTMPLimitLow.setMaximum(Ranges.TMP_PRESSURE_LOW_MAX)
+ self.spnTMPLimitLow.setValue(Ranges.TMP_PRESSURE_LOW_DEF)
+
+ self.spnTMPLimitHigh.setMinimum(Ranges.TMP_PRESSURE_HIGH_MIN)
+ self.spnTMPLimitHigh.setMaximum(Ranges.TMP_PRESSURE_HIGH_MAX)
+ self.spnTMPLimitHigh.setValue(Ranges.TMP_PRESSURE_HIGH_DEF)
+
+ self.spnLimitState.setValue(0)
+
+
+ def _init_connections(self):
+ """
+ initializes the widgets connections
+ :return: none
+ """
+
+ # sending the CANBus message when slider value changed
+ self.sldArterialValue .valueChanged.connect(self.do_pressures_data)
+ self.sldArterialValueLong .valueChanged.connect(self.do_pressures_data)
+ self.sldVenousValue .valueChanged.connect(self.do_pressures_data)
+ self.sldVenousValueLong .valueChanged.connect(self.do_pressures_data)
+ self.sldTMPValue .valueChanged.connect(self.do_pressures_data)
+
+ self.spnArterialLimitLow .valueChanged.connect(self.do_pressures_data)
+ self.spnArterialLimitHigh .valueChanged.connect(self.do_pressures_data)
+ self.spnVenousLimitLow .valueChanged.connect(self.do_pressures_data)
+ self.spnVenousLimitHigh .valueChanged.connect(self.do_pressures_data)
+ self.spnTMPLimitLow .valueChanged.connect(self.do_pressures_data)
+ self.spnTMPLimitHigh .valueChanged.connect(self.do_pressures_data)
+
+ self.spnLimitState .valueChanged.connect(self.do_pressures_data)
+
+
+ @Slot()
+ def do_pressures_data(self):
+ """
+ sends the pressures values message with given value on the screen
+ :return: none
+ """
+ arterial_pressure = self.sldArterialValue .value()
+ venous_pressure = self.sldVenousValue .value()
+ limit_state = self.spnLimitState .value()
+ arterial_min = self.spnArterialLimitLow .value()
+ arterial_max = self.spnArterialLimitHigh .value()
+ venous_min = self.spnVenousLimitLow .value()
+ venous_max = self.spnVenousLimitHigh .value()
+ arterial_long = self.sldArterialValueLong .value()
+ venous_long = self.sldVenousValueLong .value()
+ tmp_pressure = self.sldTMPValue .value()
+ tmp_min = self.spnTMPLimitLow .value()
+ tmp_max = self.spnTMPLimitHigh .value()
+
+ self.td_interface.td_pressure(
+ arterial_pressure ,
+ venous_pressure ,
+ limit_state ,
+ arterial_min ,
+ arterial_max ,
+ venous_min ,
+ venous_max ,
+ arterial_long ,
+ venous_long ,
+ tmp_pressure ,
+ tmp_min ,
+ tmp_max
+ )
\ No newline at end of file
Index: TD_Switches/interface.ui
===================================================================
diff -u -rfed26cc0ded3c0c08da0588bdb531143867fd1b3 -r5e32491166e1ccf47a90c9d2db5d0b37ecf249bb
--- TD_Switches/interface.ui (.../interface.ui) (revision fed26cc0ded3c0c08da0588bdb531143867fd1b3)
+++ TD_Switches/interface.ui (.../interface.ui) (revision 5e32491166e1ccf47a90c9d2db5d0b37ecf249bb)
@@ -11,7 +11,7 @@
- &1 States/&5 TD Switches
+ &5 TD info/&4 TD Switches
-
@@ -41,7 +41,7 @@
color: rgb(238, 238, 236);
-background-color: rgb(52, 105, 2);
+background-color: rgb(9, 16, 94);
33 : [0x2100] : TD Switches
Index: TD_Temperatures/interface.ui
===================================================================
diff -u -rf05537cca2e7e054a5124d4f5f9ed3ad26264458 -r5e32491166e1ccf47a90c9d2db5d0b37ecf249bb
--- TD_Temperatures/interface.ui (.../interface.ui) (revision f05537cca2e7e054a5124d4f5f9ed3ad26264458)
+++ TD_Temperatures/interface.ui (.../interface.ui) (revision 5e32491166e1ccf47a90c9d2db5d0b37ecf249bb)
@@ -11,7 +11,7 @@
- &1 States/&6 TD Temperatures
+ &5 TD info/&5 TD Temperatures
-
@@ -39,7 +39,7 @@
color: rgb(238, 238, 236);
-background-color: rgb(52, 105, 2);
+background-color: rgb(30, 50, 155);
145 : [0x9100] : TD Temperatures
Index: TD_Valves/interface.ui
===================================================================
diff -u -rfed26cc0ded3c0c08da0588bdb531143867fd1b3 -r5e32491166e1ccf47a90c9d2db5d0b37ecf249bb
--- TD_Valves/interface.ui (.../interface.ui) (revision fed26cc0ded3c0c08da0588bdb531143867fd1b3)
+++ TD_Valves/interface.ui (.../interface.ui) (revision 5e32491166e1ccf47a90c9d2db5d0b37ecf249bb)
@@ -11,7 +11,7 @@
- &1 States/&7 TD Valves
+ &5 TD info/&6 TD Valves
-
@@ -37,7 +37,7 @@
color: rgb(238, 238, 236);
-background-color: rgb(52, 105, 2);
+background-color: rgb(100, 1, 250);
43 : [0x2B00] : TD Valves
Index: TD_Versions/interface.ui
===================================================================
diff -u -r4e2342ccd6104d0cb1f5321c24c9955c2cae69c8 -r5e32491166e1ccf47a90c9d2db5d0b37ecf249bb
--- TD_Versions/interface.ui (.../interface.ui) (revision 4e2342ccd6104d0cb1f5321c24c9955c2cae69c8)
+++ TD_Versions/interface.ui (.../interface.ui) (revision 5e32491166e1ccf47a90c9d2db5d0b37ecf249bb)
@@ -67,7 +67,7 @@
color: rgb(238, 238, 236);
-background-color: rgb(52, 105, 2);
+background-color: rgb(15, 84, 8);
153 : [0x9900] : TD Serial #
@@ -154,7 +154,7 @@
color: rgb(238, 238, 236);
-background-color: rgb(52, 105, 2);
+background-color: rgb(15, 84, 8);
14 : [0x0E00] : TD Versions
Index: TD_Voltages/interface.ui
===================================================================
diff -u -rf05537cca2e7e054a5124d4f5f9ed3ad26264458 -r5e32491166e1ccf47a90c9d2db5d0b37ecf249bb
--- TD_Voltages/interface.ui (.../interface.ui) (revision f05537cca2e7e054a5124d4f5f9ed3ad26264458)
+++ TD_Voltages/interface.ui (.../interface.ui) (revision 5e32491166e1ccf47a90c9d2db5d0b37ecf249bb)
@@ -11,7 +11,7 @@
- &1 States/&8 TD Voltages
+ &5 TD info/&7 TD Voltages
-
@@ -39,7 +39,7 @@
color: rgb(238, 238, 236);
-background-color: rgb(52, 105, 2);
+background-color: rgb(100, 49, 180);
29 : [0x1D00] : TD Voltages