Index: FP_RORejectionPercentage/interface.ui =================================================================== diff -u --- FP_RORejectionPercentage/interface.ui (revision 0) +++ FP_RORejectionPercentage/interface.ui (revision 4e3111e2b0ca213027dfd6c86546b97a1df1d81e) @@ -0,0 +1,165 @@ + + + ui_interface + + + + 0 + 0 + 504 + 230 + + + + + 0 + 0 + + + + + 476 + 250 + + + + &7 FP info/&9 RO Rejection Ratio + + + + + + 2 + + + + + + 0 + 0 + + + + + 352 + 0 + + + + + 10 + + + + color: rgb(238, 238, 236); +background-color: rgb(173, 127, 168) + + + 133 : [0x7100] : FP Ro Rejection + + + Qt::AlignCenter + + + + + + + Send + + + + + + + reset + + + + + + + + + + + 1000.000000000000000 + + + + + + + Raw Ro Rejection Ratio + + + + + + + Avg Ro Rejection Ratio + + + + + + + Avg Ro Rejection Ratio Tank Fill + + + + + + + 1000.000000000000000 + + + + + + + Raw Ro Rejection Ratio Tank Fill + + + + + + + Gen Permeate State + + + + + + + 1000.000000000000000 + + + + + + + 1000.000000000000000 + + + + + + + 1000.000000000000000 + + + + + + + + + dsbrawRORejectionRatio + dsbrawRORejectionRatioTankFill + tbSend + tbReset + + + + Index: FP_RORejectionPercentage/loader.py =================================================================== diff -u --- FP_RORejectionPercentage/loader.py (revision 0) +++ FP_RORejectionPercentage/loader.py (revision 4e3111e2b0ca213027dfd6c86546b97a1df1d81e) @@ -0,0 +1,74 @@ +""" + The FP Conductivity ui loader +""" +# Python +import os + +# Qt +from PySide2 import QtCore, QtWidgets +from PySide2.QtCore import Slot + +# parent +from engine.dynamicloader import DynamicLoader + +# fp Simulator +from leahi_dialin.ui.fp_messaging import FP_Messaging + + +class Loader(DynamicLoader): + """ + The FP Conductivity + """ + + def __init__(self): + self.fp_interface = FP_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.dsbrawRORejectionRatio = self.find_widget(QtWidgets.QDoubleSpinBox , 'dsbrawRORejectionRatio' ) + self.dsbrawRORejectionRatioTankFill = self.find_widget(QtWidgets.QDoubleSpinBox , 'dsbrawRORejectionRatioTankFill' ) + self.dsbavgRORejectionRatio = self.find_widget(QtWidgets.QDoubleSpinBox , 'dsbavgRORejectionRatio' ) + self.dsbavgRORejectionRatioTankFill = self.find_widget(QtWidgets.QDoubleSpinBox , 'dsbavgRORejectionRatioTankFill' ) + self.dsbgenPermeateState = self.find_widget(QtWidgets.QDoubleSpinBox , 'dsbgenPermeateState' ) + + def _init_connections(self): + """ + initializes the widgets connections + :return: none + """ + self.tbReset.clicked.connect(self._init_widgets) + self.tbSend.clicked.connect(self.do_RoRejectionPercentage) + + @Slot() + def _init_widgets(self): + """ + initializes the widgets' properties + :return: none + """ + self.dsbrawRORejectionRatio .setValue(0) + self.dsbrawRORejectionRatioTankFill.setValue(0) + self.dsbavgRORejectionRatio .setValue(0) + self.dsbavgRORejectionRatioTankFill.setValue(0) + self.dsbgenPermeateState .setValue(0) + + @Slot() + def do_RoRejectionPercentage(self): + """ + the slot for FP conductivity change + :return: none + """ + self.fp_interface.fp_roRejectionPercentage ( + self.dsbrawRORejectionRatio .value() , + self.dsbrawRORejectionRatioTankFill .value() , + self.dsbavgRORejectionRatio .value() , + self.dsbavgRORejectionRatioTankFill .value() , + self.dsbgenPermeateState .value() + ) \ No newline at end of file Index: TD_WaterSample/loader.py =================================================================== diff -u -rac2fffa76a2cd0bb25f25b98ccb7a1ee7758d335 -r4e3111e2b0ca213027dfd6c86546b97a1df1d81e --- TD_WaterSample/loader.py (.../loader.py) (revision ac2fffa76a2cd0bb25f25b98ccb7a1ee7758d335) +++ TD_WaterSample/loader.py (.../loader.py) (revision 4e3111e2b0ca213027dfd6c86546b97a1df1d81e) @@ -113,4 +113,4 @@ message = message['message'] index = MsgFieldPositions.START_POS_FIELD_1 val,index = conversions.bytearray_to_float( message, index) - self.lbWaterSampleResult.setText(f"{val:.1f}") + self.lbWaterSampleResult.setText(f"{val:.2f}")