Index: sources/gui/qml/dialogs/diagnostics/DiagnosticsTD.qml =================================================================== diff -u -rc253d3ca9ef234e04747565e500faf88b07fc04e -r91c381afa3a5a01579d47a603600f1a56c8ab5b6 --- sources/gui/qml/dialogs/diagnostics/DiagnosticsTD.qml (.../DiagnosticsTD.qml) (revision c253d3ca9ef234e04747565e500faf88b07fc04e) +++ sources/gui/qml/dialogs/diagnostics/DiagnosticsTD.qml (.../DiagnosticsTD.qml) (revision 91c381afa3a5a01579d47a603600f1a56c8ab5b6) @@ -15,208 +15,361 @@ // 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: "_DiagnosticsTD" - title: "Treatment Delivery & Blood Handling" + contentItem : Item { id: _content - DebugDataColumn { id: _TDBloodPumpColumn - textObjectName :"_TDBloodPumpData" - title : qsTr(" BP ") - x: col(0) - y: row(0) - model: [ - vTDBloodPump.setFlow , - vTDBloodPump.measFlow .toFixed(2) , - vTDBloodPump.rotorSpeed .toFixed(2) , - vTDBloodPump.motorSpeed .toFixed(2) , - vTDBloodPump.currMotor .toFixed(2) , - vTDBloodPump.setRPM .toFixed(2) , - vTDBloodPump.pressureFlow , - vTDBloodPump.rotationCount , - vTDBloodPump.rotorHallState , + DebugDataColumn { id: _TDBloodFlowColumn + textObjectName :"_TDBloodFlowData" + title : qsTr(" BP(H4)") + anchors { + top : parent.top + left : parent.left + } - ] - label: [ - "sFLow ", - "mFlow ", - "rSpd ", - "mSpd ", - "cMot ", - "RPM ", - "pFlow ", - "rCnt ", - "state ", - ] - } + model: [ + vTreatmentBloodFlow.setFlowRate , + vTreatmentBloodFlow.measFlow .toFixed(2) , + vTreatmentBloodFlow.measRotorSpd .toFixed(2) , + vTreatmentBloodFlow.measPumpSpd .toFixed(2) , + vTreatmentBloodFlow.measCurr .toFixed(2) , + vTreatmentBloodFlow.setRPM .toFixed(2) , + vTreatmentBloodFlow.rotorCount , + vTreatmentBloodFlow.presFlow , + vTreatmentBloodFlow.rotorHallState , - 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", - ] - } + ] + label: [ + "sFLow (H4) ", + "mFlow (H4) ", + "rSpd (H4) ", + "mSpd (H4) ", + "mCurr (H4) ", + "RPM (H4) ", + "rCnt (H4) ", + "pFlow (H4) ", + "rHall (H6) ", + ] + } - 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: _TDAirTrapCoulumn + textObjectName :"_TDAirTrapData" + title : qsTr(" Air Trap ") + anchors { + top : parent.top + left : _TDPressureOcclusionColumn.right + leftMargin : spacing + } - ] - label: [ - "ID ", - "state ", - "Name ", - "Cnt ", - "nPos ", - ] - } + model: [ + vTDAirTrap.lowLevel , + vTDAirTrap.upLevel , + vTDAirTrap.lowLevelRaw , + vTDAirTrap.upLevelRaw , + vTDAirTrap.valveIntakeState , + vTDAirTrap.valveOutletState , + vTDAirTrap.controlling , + ] + label: [ + "ATL (H17)", + "ATH (H16)", + "rARL (H17)", + "rATH (H16)", + "IState (H13)", + "OState (H20)", + "ctrl ", + ] + } - DebugDataColumn { id: _TDEjectorColumn - textObjectName :"_TDEjectorData" - title : qsTr(" Ejt ") - x: col(4.5) - y: row(0) - model: [ - vTDEjector.state , - vTDEjector.setSpeed .toFixed(2) , + DebugDataColumn { id: _TDAirPumpColumn + textObjectName :"_TDAirPumpData" + title : qsTr(" Air Pumps ") + anchors { + top : _TDAirTrapCoulumn.bottom + topMargin : spacing + left : _TDAirTrapCoulumn.left + } - ] - label: [ - "state ", - "Spd " , - ] - } + model: [ + vTDAirPump.airPumpState , + vTDAirPump.airPumpPower , - DebugDataColumn { id: _TDSwitchesColumn - textObjectName :"_TDSwitchesData" - title : qsTr(" Switches ") - x: col(6) - y: row(0) - model: [ - vTDSwitches.door , + ] + label: [ + "state (H12) ", + "power (H12) ", + ] + } - ] - label: [ - "door ", - ] - } + DebugDataColumn { id: _TDAirBubblesColumn + textObjectName :"_TDAirBubblesData" + title : qsTr(" Bubbles ") + anchors { + top : _TDPressureOcclusionColumn.bottom + topMargin : spacing + left : _TDPressureOcclusionColumn.left + } + model: [ + vTDAirBubble.venousAirBubbleStatus , + vTDAirBubble.venousAirBubbleState , - DebugDataColumn { id: _TDBatteryCoulumn - textObjectName :"_TDBatterypData" - title : qsTr(" Battery ") - x: col(0) - y: row(3.5) - model: [ - vTDBattery.aCPower , - vTDBattery.capacity , - ] - label: [ - "AC ", - "cap ", - ] - } + ] + label: [ + "status (H18) ", + "state (H18) ", + ] + } - 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: _TDValvesColumn + textObjectName :"_TDValvesData" + title : qsTr(" Valves ") + anchors { + top : parent.top + left : _TDAirTrapCoulumn.right + leftMargin : spacing + } + model: [ + vTDValves.valveId , + vTDValves.state , + vTDValves.posName , + vTDValves.posCount , + vTDValves.nextPos , - DebugDataColumn { id: _TDTemperatureCoulumn - textObjectName :"_TDTemperatureData" - title : qsTr(" Temp ") - x: col(3) - y: row(3.5) - model: [ - vTDTemperature.boardTemp .toFixed(2) - ] - label: [ - "board", - ] - } + ] + label: [ + "ID ", + "state ", + "Name ", + "Cnt ", + "nPos ", + ] + } - // 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: _TDEjectorColumn + textObjectName :"_TDEjectorData" + title : qsTr(" Ejector ") + anchors { + top : parent.top + left : _TDValvesColumn.right + leftMargin : spacing + } + model: [ + vTDEjector.state , + vTDEjector.setSpeed .toFixed(2) , - spacing: -30 + ] + label: [ + "State (H5) ", + "Spd (H5) " , + ] + } + + DebugDataColumn { id: _TDSwitchesColumn + textObjectName :"_TDSwitchesData" + title : qsTr(" Switches ") + anchors { + top : _TDVoltageCoulumn.bottom + topMargin : spacing + left : parent.left + } + model: [ + vTDSwitches.door , + ] + label: [ + "door (H9) ", + ] + } + + DebugDataColumn { id: _TDOpModeColumn + textObjectName :"_TDOpmodeData" + title : qsTr(" Opmode ") + anchors { + top : parent.top + left : _TDEjectorColumn.right + leftMargin : spacing + } + model: [ + vTDOpMode.opMode , + vTDOpMode.subMode + ] + label: [ + "opMode " , + "subMode " + ] + } + + DebugDataColumn { id: _TDTXStatesColumn + textObjectName :"_TDTxStatesData" + title : qsTr(" TXStates ") + + anchors { + top : _TDOpModeColumn.bottom + topMargin : spacing + left : _TDOpModeColumn.left + } + + model: [ + Number(vTDTreatmentStates.subMode ), + Number(vTDTreatmentStates.txBloodPrime ), + Number(vTDTreatmentStates.txDialysis ), + Number(vTDTreatmentStates.ufState ), + Number(vTDTreatmentStates.txStop ), + Number(vTDTreatmentStates.txRinseback ), + Number(vTDTreatmentStates.txRecirculate ), + Number(vTDTreatmentStates.txEnd ), + Number(vTDTreatmentStates.salineState ), + Number(vTDTreatmentStates.heparin ), + ] + label: [ + "subMode " , + "BPrime " , + "Dial " , + "UF " , + "Stop " , + "RB " , + "Recirc " , + "End " , + "Saline " , + "Hep " , + ] + } + + DebugDataColumn { id: _TDVoltageCoulumn + textObjectName :"_TDVoltageData" + title : qsTr(" Volume ") + anchors { + top : _TDBloodFlowColumn.bottom + topMargin : spacing + } + + 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: _TDPressureOcclusionColumn + textObjectName :"_TDPressureData" + title : qsTr(" Pressure ") + + anchors { + top : parent.top + left : _TDBloodFlowColumn.right + leftMargin : spacing + } + model: [ + vTreatmentPressureOcclusion.arterialPressure .toFixed(2), + vTreatmentPressureOcclusion.venousPressure , + vTreatmentPressureOcclusion.limitState , + vTreatmentPressureOcclusion.arterialMin , + vTreatmentPressureOcclusion.arterialMax , + vTreatmentPressureOcclusion.venousMin , + vTreatmentPressureOcclusion.venousMax , + vTreatmentPressureOcclusion.arterialLongFilter .toFixed(2), + vTreatmentPressureOcclusion.venousLongFilter .toFixed(2), + vTreatmentPressureOcclusion.tmpPressure .toFixed(2), + vTreatmentPressureOcclusion.tmpMin .toFixed(2), + vTreatmentPressureOcclusion.tmpMax .toFixed(2) + ] + label: [ + "Arterial (H12) " , + "Venous (H14) " , + "limit " , + "artMin (H12) " , + "artMax (H12) " , + "venMin (H14) " , + "venMax (H14) " , + "aLong (H12) " , + "vLong (H14) " , + "TMP " , + "tmpMin " , + "tmpMax " , + ] + } + + DebugDataColumn { id: _TDTemperatureCoulumn + textObjectName :"_TDTemperatureData" + title : qsTr(" Temp ") + anchors { + top : _TDValvesColumn.bottom + topMargin : spacing + left : _TDValvesColumn.left + } + model: [ + vTDTemperature.boardTemp .toFixed(2) + ] + label: [ + "board", + ] + } + + DebugDataColumn { id: _TDBatteryCoulumn + textObjectName :"_TDBatteryData" + title : qsTr(" Battery ") + anchors { + top : _TDEjectorColumn.bottom + topMargin : spacing + left : _TDEjectorColumn.left + } + model: [ + vTDBattery.acPower , + vTDBattery.capacity , + ] + label: [ + "AC ", + "cap ", + ] + } + + // // TODO: The TouchRect should be unnecessary since the first communication message with UI/TD is the version. + TouchRect { + width : _TDVersionsColumn.width + height : _TDVersionsColumn.height + onClicked : vAdjustmentVersions.doAdjustment() + radius : 5 + anchors { + bottom : parent.bottom + right : parent.right + } DebugDataColumn { id: _TDVersionsColumn - textObjectName :"_TDVersionsData" - title : "" - horizontalAlignmentText: Text.AlignLeft - fontPixelSizeText: Fonts.fontPixelDebugTitle + textObjectName :"_TDVersionsData" + horizontalAlignmentText : Text.AlignLeft + fontPixelSizeText : Fonts.fontPixelDebugTitle + isTouchRect : true model: [ "TD: v%1.%2.%3-%4 v%5.%6.%7-%8 c%9\nTD Serial#: %10" .arg(vAdjustmentVersions.tdVerMajor ) .arg(vAdjustmentVersions.tdVerMinor ) @@ -233,7 +386,6 @@ } } - Connections { target: _GuiView function onDidActionReceive( vAction, vData ) { // DEBUG: console.debug("onDidActionReceive", vAction, vData)