Index: sources/gui/qml/dialogs/diagnostics/DiagnosticsTD.qml =================================================================== diff -u -re18180f1f5fc7c8fbf76255f02f9898217db40a2 -r89be2d248cac3f748b704cd62408cf8911991039 --- sources/gui/qml/dialogs/diagnostics/DiagnosticsTD.qml (.../DiagnosticsTD.qml) (revision e18180f1f5fc7c8fbf76255f02f9898217db40a2) +++ sources/gui/qml/dialogs/diagnostics/DiagnosticsTD.qml (.../DiagnosticsTD.qml) (revision 89be2d248cac3f748b704cd62408cf8911991039) @@ -21,318 +21,359 @@ // Qml imports import "qrc:/globals" import "qrc:/components" -import "qrc:/compounds" /*! * \brief the post treatment prime stack screen */ DiagnosticsBase { id: _root objectName: "_DiagnosticsTD" - title: qsTr("Treatment Delivery & Blood Handling") + contentItem : Item { id: _content - DebugDataColumn { id: _TDBloodFlowColumn - textObjectName :"_TDBloodFlowData" - title : qsTr(" BP(H4)") - x: col(0) - y: row(0) - 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: _TDBloodFlowColumn + textObjectName :"_TDBloodFlowData" + title : qsTr(" BP(H4)") + anchors { + top : parent.top + left : parent.left + } - ] - label: [ - "sFLow (H4) ", - "mFlow (H4) ", - "rSpd (H4) ", - "mSpd (H4) ", - "mCurr (H4) ", - "RPM (H4) ", - "rCnt (H4) ", - "pFlow (H4) ", - "rHall (H6) ", - ] - } + 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.valveIntakeState , - vTDAirTrap.valveOutletState , - vTDAirTrap.controlling , - ] - label: [ - "ATL (H17)", - "ATH (H16)", - "rARL (H17)", - "rATH (H16)", - "IState (H13)", - "OState (H20)", - "ctrl ", - ] - } + ] + label: [ + "sFLow (H4) ", + "mFlow (H4) ", + "rSpd (H4) ", + "mSpd (H4) ", + "mCurr (H4) ", + "RPM (H4) ", + "rCnt (H4) ", + "pFlow (H4) ", + "rHall (H6) ", + ] + } - DebugDataColumn { id: _TDAirPumpColumn - textObjectName :"_TDAirPumpData" - title : qsTr(" Air Pumps ") - x: col(3) - y: row(0) - model: [ - vTDAirPump.airPumpState , - vTDAirPump.airPumpPower , + DebugDataColumn { id: _TDAirTrapCoulumn + textObjectName :"_TDAirTrapData" + title : qsTr(" Air Trap ") + anchors { + top : parent.top + left : _TDBloodFlowColumn.right + leftMargin : spacing + } - ] - label: [ - "state (H12) ", - "power (H12) ", - ] - } + 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: _TDAirBubblesColumn - textObjectName :"_TDAirBubblesData" - title : qsTr(" Bubbles ") - x: col(3) - y: row(1.5) - model: [ - vTDAirBubble.venousAirBubbleStatus , - vTDAirBubble.venousAirBubbleState , + DebugDataColumn { id: _TDAirPumpColumn + textObjectName :"_TDAirPumpData" + title : qsTr(" Air Pumps ") + anchors { + top : parent.top + left : _TDAirTrapCoulumn.right + leftMargin : spacing + } - ] - label: [ - "status (H18) ", - "state (H18) ", - ] - } + model: [ + vTDAirPump.airPumpState , + vTDAirPump.airPumpPower , - DebugDataColumn { id: _TDValvesColumn - textObjectName :"_TDValvesData" - title : qsTr(" Valves ") - x: col(4.5) - y: row(0) - model: [ - vTDValves.valveId , - vTDValves.state , - vTDValves.posName , - vTDValves.posCount , - vTDValves.nextPos , + ] + label: [ + "state (H12) ", + "power (H12) ", + ] + } - ] - label: [ - "ID ", - "state ", - "Name ", - "Cnt ", - "nPos ", - ] - } + DebugDataColumn { id: _TDAirBubblesColumn + textObjectName :"_TDAirBubblesData" + title : qsTr(" Bubbles ") + anchors { + top : _TDAirPumpColumn.bottom + topMargin : spacing + left : _TDAirPumpColumn.left + } - DebugDataColumn { id: _TDEjectorColumn - textObjectName :"_TDEjectorData" - title : qsTr(" Ejector ") - x: col(6) - y: row(0) - model: [ - vTDEjector.state , - vTDEjector.setSpeed .toFixed(2) , + model: [ + vTDAirBubble.venousAirBubbleStatus , + vTDAirBubble.venousAirBubbleState , - ] - label: [ - "State (H5) ", - "Spd (H5) " , - ] - } + ] + label: [ + "status (H18) ", + "state (H18) ", + ] + } - DebugDataColumn { id: _TDSwitchesColumn - textObjectName :"_TDSwitchesData" - title : qsTr(" Switches ") - x: col(7.5) - y: row(0) - model: [ - vTDSwitches.door , + DebugDataColumn { id: _TDValvesColumn + textObjectName :"_TDValvesData" + title : qsTr(" Valves ") + anchors { + top : parent.top + left : _TDAirBubblesColumn.right + leftMargin : spacing + } + model: [ + vTDValves.valveId , + vTDValves.state , + vTDValves.posName , + vTDValves.posCount , + vTDValves.nextPos , - ] - label: [ - "door (H9) ", - ] - } + ] + label: [ + "ID ", + "state ", + "Name ", + "Cnt ", + "nPos ", + ] + } - DebugDataColumn { id: _TDTXStatesColumn - textObjectName :"_TDTxStatesData" - title : qsTr(" TXStates ") - x: col(0) - y: row(3.5) - 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: _TDEjectorColumn + textObjectName :"_TDEjectorData" + title : qsTr(" Ejector ") + anchors { + top : parent.top + left : _TDValvesColumn.right + leftMargin : spacing + } + model: [ + vTDEjector.state , + vTDEjector.setSpeed .toFixed(2) , - DebugDataColumn { id: _TDOpModeColumn - textObjectName :"_TDOpmodeData" - title : qsTr(" Opmode ") - x: col(0) - y: row(7) - model: [ - vTDOpMode.opMode , - vTDOpMode.subMode - ] - label: [ - "opMode " , - "subMode " - ] - } + ] + label: [ + "State (H5) ", + "Spd (H5) " , + ] + } - DebugDataColumn { id: _TDVoltageCoulumn - textObjectName :"_TDVoltageData" - title : qsTr(" Volume ") - 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: _TDSwitchesColumn + textObjectName :"_TDSwitchesData" + title : qsTr(" Switches ") + anchors { + top : parent.top + left : _TDEjectorColumn.right + leftMargin : spacing + } + model: [ + vTDSwitches.door , + ] + label: [ + "door (H9) ", + ] + } - DebugDataColumn { id: _TDPressureOcclusionCoulumn - textObjectName :"_TDPressureData" - title : qsTr(" Pressure ") - x: col(3) - y: row(3.5) - 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: _TDOpModeColumn + textObjectName :"_TDOpmodeData" + title : qsTr(" Opmode ") + anchors { + top : parent.top + left : _TDSwitchesColumn.right + leftMargin : spacing + } + model: [ + vTDOpMode.opMode , + vTDOpMode.subMode + ] + label: [ + "opMode " , + "subMode " + ] + } - DebugDataColumn { id: _TDTemperatureCoulumn - textObjectName :"_TDTemperatureData" - title : qsTr(" Temp ") - x: col(4.5) - y: row(3.5) - model: [ - vTDTemperature.boardTemp .toFixed(2) - ] - label: [ - "board", - ] - } + DebugDataColumn { id: _TDTXStatesColumn + textObjectName :"_TDTxStatesData" + title : qsTr(" TXStates ") - DebugDataColumn { id: _TDBatteryCoulumn - textObjectName :"_TDBatteryData" - title : qsTr(" Battery ") - x: col(6) - y: row(3.5) - model: [ - vTDBattery.acPower , - vTDBattery.capacity , - ] - label: [ - "AC ", - "cap ", - ] - } + anchors { + top : _TDOpModeColumn.bottom + topMargin : spacing + left : _TDSwitchesColumn.right + leftMargin : spacing + } + 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 " , + ] + } - // TODO: The TouchRect should be unnecessary since the first communication message with UI/TD is the version. - TouchRect { - x : col(9.0) - y : row(8.0) - 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: _TDVoltageCoulumn + textObjectName :"_TDVoltageData" + title : qsTr(" Volume ") + anchors { + top : _TDBloodFlowColumn.bottom + topMargin : spacing + } - spacing: -30 + 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: _TDPressureOcclusionCoulumn + textObjectName :"_TDPressureData" + title : qsTr(" Pressure ") + + anchors { + top : _TDAirTrapCoulumn.bottom + topMargin : spacing + left : _TDAirTrapCoulumn.left + } + 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 : _TDAirBubblesColumn.bottom + topMargin : spacing + left : _TDPressureOcclusionCoulumn.right + leftMargin : spacing + } + model: [ + vTDTemperature.boardTemp .toFixed(2) + ] + label: [ + "board", + ] + } + + DebugDataColumn { id: _TDBatteryCoulumn + textObjectName :"_TDBatteryData" + title : qsTr(" Battery ") + anchors { + top : _TDTemperatureCoulumn.bottom + topMargin : spacing + left : _TDTemperatureCoulumn.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 : 10 + anchors { + bottom : parent.bottom + bottomMargin : spacing + right : parent.right + rightMargin : spacing + } 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 ) @@ -349,7 +390,6 @@ } } - Connections { target: _GuiView function onDidActionReceive( vAction, vData ) { // DEBUG: console.debug("onDidActionReceive", vAction, vData)