Index: sources/gui/qml/dialogs/diagnostics/DiagnosticsDD.qml =================================================================== diff -u -rc253d3ca9ef234e04747565e500faf88b07fc04e -r91c381afa3a5a01579d47a603600f1a56c8ab5b6 --- sources/gui/qml/dialogs/diagnostics/DiagnosticsDD.qml (.../DiagnosticsDD.qml) (revision c253d3ca9ef234e04747565e500faf88b07fc04e) +++ sources/gui/qml/dialogs/diagnostics/DiagnosticsDD.qml (.../DiagnosticsDD.qml) (revision 91c381afa3a5a01579d47a603600f1a56c8ab5b6) @@ -15,196 +15,532 @@ // Qt import QtQuick 2.12 - // Project +import Gui.Actions 0.1 + // Qml imports import "qrc:/globals" import "qrc:/components" -import "qrc:/compounds" /*! * \brief the post treatment prime stack screen */ DiagnosticsBase { id: _root - objectName: "_DiagnosticsDD" + objectName : "_DiagnosticsDD" - title: "Dialysate Delivery" + contentItem : Item { id: _content - DebugDataColumn { id: _DDLevelColumn - textObjectName :"_DDLevelData" - title : qsTr(" Levels ") - x: col(0) - y: row(0) - model: [ - vDDLevel.floaterLevel , - vDDLevel.bicarbLevel , - vDDLevel.spentDialysateLevel , - ] - label: [ - "float ", - "bicarb ", - "sptDial ", - ] - } + DebugDataColumn { id: _DDConcentratePumpColumn + textObjectName :"_DDConcentratePumpData" + title : qsTr(" Conc Pump ") + anchors { + top : parent.top + left : parent.left + } + model: [ + vDDConcentratePump.D10PumpCurrentSetSpeed .toFixed(2) , + vDDConcentratePump.D10PumpMeasuredSpeed .toFixed(2) , + vDDConcentratePump.D10PumpTargetRevCount , + vDDConcentratePump.D10PumpMeasuredRevCount , + vDDConcentratePump.D10PumpState , + vDDConcentratePump.D10PumpPulseUS .toFixed(2) , + vDDConcentratePump.D10PumpTargetSpeed .toFixed(2) , + vDDConcentratePump.D10PumpParked , + vDDConcentratePump.D10PumpParkFault , + vDDConcentratePump.D11PumpCurrentSetSpeed .toFixed(2) , + vDDConcentratePump.D11PumpMeasuredSpeed .toFixed(2) , + vDDConcentratePump.D11PumpTargetRevCount , + vDDConcentratePump.D11PumpMeasuredRevCount , + vDDConcentratePump.D11PumpState , + vDDConcentratePump.D11PumpPulseUS .toFixed(2) , + vDDConcentratePump.D11PumpTargetSpeed .toFixed(2) , + vDDConcentratePump.D11PumpParked , + vDDConcentratePump.D11PumpParkFault , + vDDConcentratePump.D76PumpCurrentSetSpeed .toFixed(2) , + vDDConcentratePump.D76PumpMeasuredSpeed .toFixed(2) , + vDDConcentratePump.D76PumpTargetRevCount , + vDDConcentratePump.D76PumpMeasuredRevCount , + vDDConcentratePump.D76PumpState , + vDDConcentratePump.D76PumpPulseUS .toFixed(2) , + vDDConcentratePump.D76PumpTargetSpeed .toFixed(2) , + ] + label: [ + "sSpd (D10) ", + "mSpd (D10) ", + "rCnt (D10) ", + "mCnt (D10) ", + "State (D10) ", + "Plse (D10) ", + "tSpd (D10) ", + "park (D10) ", + "pfault (D10) ", + "sSpd (D11) ", + "mSpd (D11) ", + "rCnt (D11) ", + "mCnt (D11) ", + "State (D11) ", + "Plse (D11) ", + "tSpd (D11) ", + "park (D11) ", + "pfault (D11) ", + "sSpd (D76) ", + "mSpd (D76) ", + "rCnt (D76) ", + "mCnt (D76) ", + "State (D76) ", + "Plse (D76) ", + "tSpd (D76) ", + ] + } -// DebugDataColumn { id: _TDAirTrapCoulumn -// textObjectName :"_TDAirTrapData" -// title : qsTr(" Air Trap ") -// x: col(1.5) -// y: row(0) -// model: [ -// vTDAirTrap.lowLevel , -// vTDAirTrap.upLevel , -// vTDAirTrap.lowLevelRaw , -// vTDAirTrap.upLevelRaw , -// vTDAirTrap.valveState , -// vTDAirTrap.controlling , -// ] -// label: [ -// "ATL", -// "ATU", -// "rATL", -// "rATU", -// "state", -// "ctrl", -// ] -// } + DebugDataColumn { id: _DDDialysatePumpColumn + textObjectName :"_DDDialysatePumpData" + title : qsTr(" Dial Pump ") + anchors { + top : parent.top + left : _DDConcentratePumpColumn.right + leftMargin : spacing + } + model: [ + vDDDialysatePump.D12PumpTargetRPM .toFixed(2) , + vDDDialysatePump.D12PumpMeasuredSpeed .toFixed(2) , + vDDDialysatePump.D12PumpCurrentSpeed .toFixed(2) , + vDDDialysatePump.D12PumpState , + vDDDialysatePump.D12PumpTargetPressure .toFixed(2) , + vDDDialysatePump.D12PumpMeasuredPressure .toFixed(2) , + vDDDialysatePump.D12PumpMeasuredCurrent .toFixed(2) , + vDDDialysatePump.D12PumpControl , + vDDDialysatePump.D12PumpDirErrCnt , + vDDDialysatePump.D12PumpMeasuredDir , + vDDDialysatePump.D48PumpTargetRPM .toFixed(2) , + vDDDialysatePump.D48PumpMeasuredSpeed .toFixed(2) , + vDDDialysatePump.D48PumpCurrentSpeed .toFixed(2) , + vDDDialysatePump.D48PumpState , + vDDDialysatePump.D48PumpTargetPressure .toFixed(2) , + vDDDialysatePump.D48PumpMeasuredPressure .toFixed(2) , + vDDDialysatePump.D48PumpMeasuredCurrent .toFixed(2) , + vDDDialysatePump.D48PumpControl , + vDDDialysatePump.D48PumpDirErrCnt , + vDDDialysatePump.D48PumpMeasuredDir , + ] + label: [ + "tRPM (D12) ", + "mSpd (D12) ", + "cSpd (D12) ", + "State (D12) ", + "tPres (D12) ", + "mPres (D12) ", + "Ctrl (D12) ", + "eCnt (D12) ", + "mCurr (D12) ", + "mDir (D12) ", + "tRPM (D48) ", + "mSpd (D48) ", + "cSpd (D48) ", + "State (D48) ", + "tPres (D48) ", + "mPres (D48) ", + "mCurr (D48) ", + "Ctrl (D48) ", + "eCnt (D48) ", + "mDir (D48) ", + ] + } -// DebugDataColumn { id: _TDValvesColumn -// textObjectName :"_TDValvesData" -// title : qsTr(" Vlv ") -// x: col(3) -// y: row(0) -// model: [ -// vTDValves.valveId , -// vTDValves.state , -// vTDValves.posName , -// vTDValves.posCount , -// vTDValves.nextPos , + DebugDataColumn { id: _DDHeatersColumn + textObjectName :"_DDHeatersData" + title : qsTr(" Heaters ") + anchors { + top : parent.top + left : _DDDialysatePumpColumn.right + leftMargin : spacing + } + model: [ + vDDHeaters.mainPrimayHeaterDC .toFixed(2) , + vDDHeaters.primaryTargetTemp .toFixed(2) , + vDDHeaters.primaryHeaterState , + vDDHeaters.primaryHeaterIntervalCount , + vDDHeaters.trimmerHeaterDC .toFixed(2) , + vDDHeaters.trimmerTargetTemp .toFixed(2) , + vDDHeaters.trimmerHeaterState , + vDDHeaters.trimmerHeaterIntervalCount , + vDDHeaters.dbg1 .toFixed(2) , + vDDHeaters.dbg2 .toFixed(2) , + vDDHeaters.dbg3 .toFixed(2) , + vDDHeaters.dbg4 .toFixed(2) , + vDDHeaters.dbg5 .toFixed(2) , + vDDHeaters.dbg6 .toFixed(2) , + vDDHeaters.dbg7 .toFixed(2) , + vDDHeaters.dbg8 .toFixed(2) , + vDDHeaters.dbg9 .toFixed(2) , + ] + label: [ + "pHeat (D5) ", + "pTemp (D5) ", + "pState (D5) ", + "pIC (D5) ", + "tHeat (D45) ", + "tTemp (D45) ", + "tstate (D45) ", + "tIC (D45) ", + "dbg1 ", + "dbg2 ", + "dbg3 ", + "dbg4 ", + "dbg5 ", + "dbg6 ", + "dbg7 ", + "dbg8 ", + "dbg9 ", + ] + } -// ] -// label: [ -// "ID ", -// "state ", -// "Name ", -// "Cnt ", -// "nPos ", -// ] -// } + DebugDataColumn { id: _DDTemperatureColumn + textObjectName :"_DDTemperatureData" + title : qsTr(" Temp ") + anchors { + top : parent.top + left : _DDHeatersColumn.right + leftMargin : spacing + } + model: [ + vDDTemperatures.inletHeatExchanger .toFixed(2) , + vDDTemperatures.outletHeatExchanger .toFixed(2) , + vDDTemperatures.hydraulicsPrimaryHeater .toFixed(2) , + vDDTemperatures.trimmerHeater .toFixed(2) , + vDDTemperatures.boardTemperature .toFixed(2) , + vDDTemperatures.barometricTemperature .toFixed(2) , + vDDTemperatures.D16Conductivity .toFixed(2) , + vDDTemperatures.D28Conductivity .toFixed(2) , + vDDTemperatures.D30Conductivity .toFixed(2) , + vDDTemperatures.D44Conductivity .toFixed(2) , + vDDTemperatures.D75Conductivity .toFixed(2) , + vDDTemperatures.D4MovingAverage .toFixed(2) , + vDDTemperatures.D50MovingAverage .toFixed(2) , + vDDTemperatures.D28MovingAverage .toFixed(2) , + vDDTemperatures.D30MovingAverage .toFixed(2) , + ] + label: [ + "inHE (D1) ", + "outHE (X6) ", + "hydr (D4) ", + "trim (D50) ", + "board ", + "baro ", + "Cond (D16) ", + "Cond (D28) ", + "Cond (D30) ", + "Cond (D44) ", + "Cond (D75) ", + "mAvg (D4) ", + "mAvg (D50) ", + "mAvg (D28) ", + "mAvg (D30) ", + ] + } -// DebugDataColumn { id: _TDEjectorColumn -// textObjectName :"_TDEjectorData" -// title : qsTr(" Ejt ") -// x: col(4.5) -// y: row(0) -// model: [ -// vTDEjector.state , -// vTDEjector.setSpeed .toFixed(2) , + DebugDataColumn { id: _DDPressureColumn + textObjectName :"_DDPressureData" + title : qsTr(" Pressure ") + anchors { + top : parent.top + left : _DDTemperatureColumn.right + leftMargin : spacing + } + model: [ + vDDPressures.waterInletPSI .toFixed(2), + vDDPressures.waterOutletPSI .toFixed(2), + vDDPressures.hydrolicOutletPSI .toFixed(2), + vDDPressures.bicarbBagPSI .toFixed(2), + vDDPressures.spentDialysatePSI .toFixed(2), + vDDPressures.freshDialysatePSI .toFixed(2), + vDDPressures.transmembranePSI .toFixed(2), + vDDPressures.waterInletTemp .toFixed(2), + vDDPressures.waterOutletTemp .toFixed(2), + vDDPressures.hydrolicOutletTemp .toFixed(2), + vDDPressures.bicarbBagTemp .toFixed(2), + vDDPressures.spentDialysateTemp .toFixed(2), + vDDPressures.freshDialysateTemp .toFixed(2), + vDDPressures.transmembraneTemp .toFixed(2), + ] + label: [ + "WInPSI (M1) ", + "WOutPSI (M3) ", + "HOutPSI (D9) ", + "BBagPSI (D66) ", + "SDialPSI (D51) ", + "FDialPSI (D18) ", + "TransPSI (D41) ", + "WInTmp (M1) ", + "WOutTmp (M3) ", + "HOutTmp (D9) ", + "BBagTmp (D66) ", + "SDialTmp (D51) ", + "FDialTmp (D18) ", + "TransTmp (D41) ", + ] + } -// ] -// label: [ -// "state ", -// "Spd " , -// ] -// } + DebugDataColumn { id: _DDGenDialColumn + textObjectName :"_DDGenDialData" + title : qsTr(" GenDial ") + anchors { + top : parent.top + left : _DDPressureColumn.right + leftMargin : spacing + } -// DebugDataColumn { id: _TDSwitchesColumn -// textObjectName :"_TDSwitchesData" -// title : qsTr(" Switches ") -// x: col(6) -// y: row(0) -// model: [ -// vTDSwitches.door , + model: [ + vDDGenDialysate.genDialysateExec , + vDDGenDialysate.ddInProgress , + vDDGenDialysate.isDialGood , + vDDGenDialysate.fltLevel1 , + vDDGenDialysate.bicarbLevel , + vDDGenDialysate.spentLevel , + vDDGenDialysate.hydNegativePressure .toFixed(2), + vDDGenDialysate.hydPositivePressure .toFixed(2), + vDDGenDialysate.spentPressure .toFixed(2), + ] + label: [ + "Exec ", + "inProg ", + "isGood ", + "fltLvL (D6) ", + "bicarbLvL (D63)", + "sptLvL (D46) ", + "hydNeg (D19) ", + "hydPos (D18) ", + "sptPres (D51) ", + ] + } -// ] -// label: [ -// "door ", -// ] -// } + DebugDataColumn { id: _DDHydraulicsValveColumn + textObjectName :"_DDHydraulicValveData" + title : qsTr(" Hyd Valve ") + anchors { + top : _DDGenDialColumn.bottom + topMargin : spacing + left : _DDGenDialColumn.left + } + model: [ + Number(vDDValvesStates.hydraulicsOutletValve ) , + Number(vDDValvesStates.thermalDisinfectValve ) , + Number(vDDValvesStates.HydraulicsBypassValve ) , + Number(vDDValvesStates.rinsePortValve ) , + Number(vDDValvesStates.drainValve ) , + Number(vDDValvesStates.dialyzerBypassValve ) , + Number(vDDValvesStates.purgeValve1 ) , + Number(vDDValvesStates.pressureTestValve ) , + Number(vDDValvesStates.dryBicarbInletValve ) , + Number(vDDValvesStates.dialyzerInletValve ) , + Number(vDDValvesStates.dialyzerOutletValve ) , + Number(vDDValvesStates.purgeValve2 ) , + Number(vDDValvesStates.hydraulicsInletValve ) , + Number(vDDValvesStates.dryBicarbValve ) , + Number(vDDValvesStates.deScalerValve ) , + ] + label: [ + "HydOut (D14) ", + "ThemD (D52) ", + "HydByP (D8) ", + "RinseP (D54) ", + "Drain (D53) ", + "DialByP (D34) ", + "PurgV1 (D64) ", + "PresT (D31) ", + "DryBic (D65) ", + "DialIn (D35) ", + "DialOut (D40) ", + "PurgV2 (D47) ", + "HydIn (D3) ", + "Dry Bicarb (D80) ", + "De-scaler (D81) ", + ] + } -// DebugDataColumn { id: _TDBatteryCoulumn -// textObjectName :"_TDBatterypData" -// title : qsTr(" Battery ") -// x: col(0) -// y: row(3.5) -// model: [ -// vTDBattery.aCPower , -// vTDBattery.capacity , -// ] -// label: [ -// "AC ", -// "cap ", -// ] -// } + DebugDataColumn { id: _DDCondColumn + textObjectName :"_DDCondlData" + title : qsTr(" Cond ") + anchors { + top : _DDDialysatePumpColumn.bottom + topMargin : spacing + left : _DDDialysatePumpColumn.left + } + model: [ + vDDConductivity.bicarbCondutivity1 .toFixed(2), + vDDConductivity.acidBicarbCondutivity1 .toFixed(2), + vDDConductivity.acidBicarbCondutivity2 .toFixed(2), + vDDConductivity.spentCondutivity1 .toFixed(2), + vDDConductivity.bicarbCondutivity2 .toFixed(2), + ] + label: [ + "bicarb1 (D17) ", + "acidb1 (D27) ", + "acidb1 (D29) ", + "spent (D43) ", + "bicarb2 (D74) ", + ] + } -// DebugDataColumn { id: _TDVoltageCoulumn -// textObjectName :"_TDVoltageData" -// title : qsTr(" Vol ") -// x: col(1.5) -// y: row(3.5) -// model: [ -// vTDVoltage.line_1_2V .toFixed(2) , -// vTDVoltage.line_3_3V .toFixed(2) , -// vTDVoltage.logic5V .toFixed(2) , -// vTDVoltage.sensors5V .toFixed(2) , -// vTDVoltage.line_24V .toFixed(2) , -// vTDVoltage.regen24V .toFixed(2) , -// vTDVoltage.fpgaAdcRef .toFixed(2) , -// vTDVoltage.presRef .toFixed(2) , -// vTDVoltage.fpgaVcc .toFixed(2) , -// vTDVoltage.fpgaVaux .toFixed(2) , -// vTDVoltage.fpgaVpvn .toFixed(2) -// ] -// label: [ -// "1.2V", -// "3.3V" , -// "L5V" , -// "S5V" , -// "24V" , -// "R24V" , -// "ADC" , -// "Ref" , -// "VCC" , -// "Vaux" , -// "VPN" -// ] -// } + DebugDataColumn { id: _DDLevelColumn + textObjectName :"_DDLevelData" + title : qsTr(" Levels ") + anchors { + top : _DDPressureColumn.bottom + topMargin : spacing + left : _DDPressureColumn.left + } + model: [ + vDDLevel.floaterLevel , + vDDLevel.bicarbLevel , + vDDLevel.spentDialysateLevel , + ] + label: [ + "floater (D6) ", + "bicarb (D63) ", + "sptDial (D46) ", + ] + } -// DebugDataColumn { id: _TDTemperatureCoulumn -// textObjectName :"_TDTemperatureData" -// title : qsTr(" Temp ") -// x: col(3) -// y: row(3.5) -// model: [ -// vTDTemperature.boardTemp .toFixed(2) -// ] -// label: [ -// "board", -// ] -// } + DebugDataColumn { id: _DDBCValvesColumn + textObjectName :"_DDBCValvesData" + title : qsTr(" BC Valves ") + anchors { + top : _DDTemperatureColumn.bottom + topMargin : spacing + left : _DDHeatersColumn.right + leftMargin : spacing + } + model: [ + Number(vDDValvesStates.balancingChamberValve1 ) , + Number(vDDValvesStates.balancingChamberValve2 ) , + Number(vDDValvesStates.balancingChamberValve3 ) , + Number(vDDValvesStates.balancingChamberValve4 ) , + Number(vDDValvesStates.balancingChamberValve5 ) , + Number(vDDValvesStates.balancingChamberValve6 ) , + Number(vDDValvesStates.balancingChamberValve7 ) , + Number(vDDValvesStates.balancingChamberValve8 ) , + ] + label: [ + "BC1 (D23) ", + "BC2 (D19) ", + "BC3 (D25) ", + "BC4 (D21) ", + "BC5 (D24) ", + "BC6 (D20) ", + "BC7 (D26) ", + "BC8 (D22) ", + ] + } - // TODO: The TouchRect should be unnecessary since the first communication message with UI/HD is the version. - TouchRect { - x : col(6.0) - y : row(6.4) - width : 425 - height : 80 - onClicked : vAdjustmentVersions.doAdjustment() - radius : 10 - Column { - anchors.top : parent.top - anchors.topMargin: -20 - anchors.left: parent.left - anchors.leftMargin: 5 + DebugDataColumn { id: _DDIOValvesColumn + textObjectName :"_DDIOValvesColumn" + title : qsTr(" IO Valves ") + anchors { + top : _DDBCValvesColumn.bottom + topMargin : spacing + left : _DDBCValvesColumn.left + } + model: [ + Number(vDDValvesStates.ioValve0 ) , + Number(vDDValvesStates.ioValve1 ) , + ] + label: [ + "IO0 (M4) ", + "IO1 (M12) ", + ] + } - spacing: -30 + DebugDataColumn { id: _DDSpareValvesColumn + textObjectName :"_DDSpareValvesColumn" + title : qsTr(" Spare Valves ") + anchors { + top : _DDHeatersColumn.bottom + topMargin : spacing + left : _DDHeatersColumn.left + } + model: [ + Number(vDDValvesStates.spareValve0 ) , + Number(vDDValvesStates.spareValve1 ) , + Number(vDDValvesStates.spareValve2 ) , + Number(vDDValvesStates.spareValve3 ) , + Number(vDDValvesStates.spareValve4 ) , + Number(vDDValvesStates.spareValve5 ) , + Number(vDDValvesStates.spareValve6 ) , + Number(vDDValvesStates.spareValve7 ) , + ] + label: [ + "D79 ", + "D82 ", + "D91 ", + "Spare Valve 3 ", + "Spare Valve 4 ", + "Spare Valve 5 ", + "D100 ", + "Spare Valve 7 ", + ] + } + DebugDataColumn { id: _DDFPValvesColumn + textObjectName :"_DDFPValvesColumn" + title : qsTr(" FP Valves ") + anchors { + top : _DDLevelColumn.bottom + topMargin : spacing + left : _DDPressureColumn.left + } + model: [ + Number(vDDValvesStates.fpValve0) , + Number(vDDValvesStates.fpValve1) , + Number(vDDValvesStates.fpValve2) , + Number(vDDValvesStates.fpValve3) , + Number(vDDValvesStates.fpValve4) , + Number(vDDValvesStates.fpValve5) , + ] + label: [ + "P11 ", + "P33 ", + "P34 ", + "P37 ", + "P39 ", + "P6 ", + ] + } + + DebugDataColumn { id: _DDBloodLeakColumn + textObjectName :"_DDBloodLeakData" + title : qsTr(" Blood Leak ") + anchors { + top : _DDConcentratePumpColumn.bottom + topMargin : spacing + left : parent.left + } + model: [ + vDDBloodLeak.bloodLeak , + ] + label: [ + "BL ", + ] + } + + // TODO: The TouchRect should be unnecessary since the first communication message with UI/TD is the version. + TouchRect { + width : _DDVersionsColumn.width + height : _DDVersionsColumn.height + onClicked : vAdjustmentVersions.doAdjustment() + radius : 5 + anchors { + bottom : parent.bottom + right : parent.right + } + DebugDataColumn { id: _DDVersionsColumn textObjectName :"_DDVersionsData" title : "" horizontalAlignmentText: Text.AlignLeft fontPixelSizeText: Fonts.fontPixelDebugTitle + isTouchRect : true model: [ "DD: v%1.%2.%3-%4 v%5.%6.%7-%8 c%9\nDD Serial#: %10" .arg(vAdjustmentVersions.ddVerMajor ) .arg(vAdjustmentVersions.ddVerMinor ) @@ -221,7 +557,6 @@ } } - Connections { target: _GuiView function onDidActionReceive( vAction, vData ) { // DEBUG: console.debug("onDidActionReceive", vAction, vData)