Index: sources/gui/qml/pages/Diagnostics.qml =================================================================== diff -u -r255df1f61af0193b8f2f9630bdf3ce68be0f5e29 -rcbea4224ad67eecc2e7c4c66df9a7db711c72832 --- sources/gui/qml/pages/Diagnostics.qml (.../Diagnostics.qml) (revision 255df1f61af0193b8f2f9630bdf3ce68be0f5e29) +++ sources/gui/qml/pages/Diagnostics.qml (.../Diagnostics.qml) (revision cbea4224ad67eecc2e7c4c66df9a7db711c72832) @@ -28,148 +28,268 @@ */ ScreenItem { id: _root - BackButton { id: _backButton - onClicked: { - pop(); - } - - } - USBButton { id: _usbButton - anchors { - top : parent.top - right : _exportButton.left - topMargin : (Variables.headerHeight - Variables.logoHeight) / 2 - rightMargin : (Variables.headerHeight - Variables.logoHeight) / 2 + anchors { + top : parent.top + right : _exportButton.left + topMargin : (Variables.headerHeight - Variables.logoHeight) / 2 + rightMargin : (Variables.headerHeight - Variables.logoHeight) / 2 + } } - } - ExportButton { id: _exportButton - width: 150 - height: 50 - anchors { - top : parent.top - right : _poweroffButton.left - topMargin : (Variables.headerHeight - Variables.logoHeight) / 2 - rightMargin : (Variables.headerHeight - Variables.logoHeight) / 2 + ExportButton { id: _exportButton + width: 150 + height: 50 + anchors { + top : parent.top + right : _poweroffButton.left + topMargin : (Variables.headerHeight - Variables.logoHeight) / 2 + rightMargin : (Variables.headerHeight - Variables.logoHeight) / 2 + } } - } - TouchRect { id : _poweroffButton - width: 150 - height: Variables.logoHeight - animated: true - anchors { - top : parent.top - right : parent.right - topMargin : (Variables.headerHeight - Variables.logoHeight) / 2 - rightMargin : (Variables.headerHeight - Variables.logoHeight) / 2 + TouchRect { id : _poweroffButton + width: 150 + height: Variables.logoHeight + animated: true + anchors { + top : parent.top + right : parent.right + topMargin : (Variables.headerHeight - Variables.logoHeight) / 2 + rightMargin : (Variables.headerHeight - Variables.logoHeight) / 2 + } + text.text: qsTr("Shutdown") + button.onPressed: { + _GuiView.doActionTransmit(GuiActions.PowerOff, GuiActions.NoData) + } } - text.text: qsTr("Shutdown") - button.onPressed: { - _GuiView.doActionTransmit(GuiActions.PowerOff, GuiActions.NoData) - } - } - Column { id: _BloodFlowColumn - width: 150 - spacing: 20 - topPadding: 100 - leftPadding: 10 - Text { - id: _BloodFlow_Title - text: qsTr(" Blood ") - width: _BloodFlowColumn.width - horizontalAlignment: Text.AlignHCenter + Text { id : _canbusFaultCountText + property int count: 0 + visible: true + anchors { + top : parent.top + left : parent.left + topMargin : (Variables.headerHeight - Variables.logoHeight) / 2 + leftMargin : (Variables.headerHeight - Variables.logoHeight) / 2 + } + text: qsTr("CAN Faults : %1").arg(count) + horizontalAlignment: Text.AlignLeft color: Colors.textMain font.pixelSize: Fonts.fontPixelTitle - font.underline: true } - Repeater { - model: [ - vTreatmentBloodFlow.bloodFlow_FlowSetPoint , - vTreatmentBloodFlow.bloodFlow_MeasuredFlow .toFixed(2) , - vTreatmentBloodFlow.bloodFlow_RotorSpeed .toFixed(2) , - vTreatmentBloodFlow.bloodFlow_MotorSpeed .toFixed(2) , - vTreatmentBloodFlow.bloodFlow_MotorCtlSpeed .toFixed(2) , - vTreatmentBloodFlow.bloodFlow_MotorCtlCurrent .toFixed(2) , - "%" + vTreatmentBloodFlow.bloodFlow_PWMDutyCycle .toFixed(2) - ] + + Connections { target: _GuiView + onDidActionReceive: { + if (vAction === GuiActions.CanBUSFaultCount ) { + _canbusFaultCountText.count = vData[0] + } + } + } + + Column { id: _BloodFlowColumn + width: 150 + spacing: 20 + topPadding: 100 + leftPadding: 10 Text { - text: modelData + id: _BloodFlow_Title + text: qsTr(" Blood ") width: _BloodFlowColumn.width horizontalAlignment: Text.AlignRight color: Colors.textMain font.pixelSize: Fonts.fontPixelTitle + font.underline: true } + Repeater { + model: [ + vTreatmentBloodFlow.bloodFlow_FlowSetPoint , + vTreatmentBloodFlow.bloodFlow_MeasuredFlow .toFixed(2) , + vTreatmentBloodFlow.bloodFlow_RotorSpeed .toFixed(2) , + vTreatmentBloodFlow.bloodFlow_MotorSpeed .toFixed(2) , + vTreatmentBloodFlow.bloodFlow_MotorCtlSpeed .toFixed(2) , + vTreatmentBloodFlow.bloodFlow_MotorCtlCurrent .toFixed(2) , + "%" + vTreatmentBloodFlow.bloodFlow_PWMDutyCycle .toFixed(2) + ] + Text { + text: modelData + width: _BloodFlowColumn.width + horizontalAlignment: Text.AlignRight + color: Colors.textMain + font.pixelSize: Fonts.fontPixelTitle + } + } } - } - Column { id: _DialysateInletFlowColumn - width: 150 - spacing: 20 - topPadding: 100 - leftPadding: 180 - Text { - id: _DialysateInletFlow_Title - text: qsTr(" Dialysate I ") - width: _DialysateInletFlowColumn.width - horizontalAlignment: Text.AlignLeft - color: Colors.textMain - font.pixelSize: Fonts.fontPixelTitle - font.underline: true - } - Repeater { - model: [ - vTreatmentDialysateFlow.dialysateFlow_FlowSetPoint .toFixed(2) , - vTreatmentDialysateFlow.dialysateFlow_MeasuredFlow .toFixed(2) , - vTreatmentDialysateFlow.dialysateFlow_RotorSpeed .toFixed(2) , - vTreatmentDialysateFlow.dialysateFlow_MotorSpeed .toFixed(2) , - vTreatmentDialysateFlow.dialysateFlow_MotorCtlSpeed .toFixed(2) , - vTreatmentDialysateFlow.dialysateFlow_MotorCtlCurrent.toFixed(2) , - "%" + vTreatmentDialysateFlow.dialysateFlow_PWMDutyCycle .toFixed(2) - ] + Column { id: _DialysateInletFlowColumn + width : 150 + spacing : 20 + topPadding : 100 + leftPadding : 200 Text { - text: modelData + id: _DialysateInletFlow_Title + text: qsTr(" Dlyst I ") width: _DialysateInletFlowColumn.width horizontalAlignment: Text.AlignRight color: Colors.textMain font.pixelSize: Fonts.fontPixelTitle + font.underline: true } + Repeater { + model: [ + vTreatmentDialysateFlow.dialysateFlow_FlowSetPoint .toFixed(2) , + vTreatmentDialysateFlow.dialysateFlow_MeasuredFlow .toFixed(2) , + vTreatmentDialysateFlow.dialysateFlow_RotorSpeed .toFixed(2) , + vTreatmentDialysateFlow.dialysateFlow_MotorSpeed .toFixed(2) , + vTreatmentDialysateFlow.dialysateFlow_MotorCtlSpeed .toFixed(2) , + vTreatmentDialysateFlow.dialysateFlow_MotorCtlCurrent.toFixed(2) , + "%" + vTreatmentDialysateFlow.dialysateFlow_PWMDutyCycle .toFixed(2) + ] + Text { + text: modelData + width: _DialysateInletFlowColumn.width + horizontalAlignment: Text.AlignRight + color: Colors.textMain + font.pixelSize: Fonts.fontPixelTitle + } + } } - } - Column { id: _DialysateOutletFlowColumn - width: 150 - spacing: 20 - topPadding: 100 - leftPadding: 400 - Text { - id: _DialysateOutletFlow_Title - text: qsTr(" Dialysate O ") - width: _DialysateOutletFlowColumn.width - horizontalAlignment: Text.AlignLeft - color: Colors.textMain - font.pixelSize: Fonts.fontPixelTitle - font.underline: true - } - Repeater { - model: [ - vTreatmentUltrafiltration.ultrafiltration_RefUFVol .toFixed(2) , - vTreatmentUltrafiltration.ultrafiltration_MeasUFVol .toFixed(2) , - vTreatmentUltrafiltration.ultrafiltration_RotorSpeed .toFixed(2) , - vTreatmentUltrafiltration.ultrafiltration_MotorSpeed .toFixed(2) , - vTreatmentUltrafiltration.ultrafiltration_MotorCtlSpeed .toFixed(2) , - vTreatmentUltrafiltration.ultrafiltration_MotorCtlCurrent.toFixed(2) , - "%" + vTreatmentUltrafiltration.ultrafiltration_PWMDtCycle .toFixed(2) - ] + Column { id: _DialysateOutletFlowColumn + width : 150 + spacing : 20 + topPadding : 100 + leftPadding : 400 Text { - text: modelData + id: _DialysateOutletFlow_Title + text: qsTr(" Dlyst O ") width: _DialysateOutletFlowColumn.width horizontalAlignment: Text.AlignRight color: Colors.textMain font.pixelSize: Fonts.fontPixelTitle + font.underline: true } + Repeater { + model: [ + vTreatmentUltrafiltration.ultrafiltration_RefUFVol .toFixed(2) , + vTreatmentUltrafiltration.ultrafiltration_MeasUFVol .toFixed(2) , + vTreatmentUltrafiltration.ultrafiltration_RotorSpeed .toFixed(2) , + vTreatmentUltrafiltration.ultrafiltration_MotorSpeed .toFixed(2) , + vTreatmentUltrafiltration.ultrafiltration_MotorCtlSpeed .toFixed(2) , + vTreatmentUltrafiltration.ultrafiltration_MotorCtlCurrent.toFixed(2) , + "%" + vTreatmentUltrafiltration.ultrafiltration_PWMDtCycle .toFixed(2) + ] + Text { + text: modelData + width: _DialysateOutletFlowColumn.width + horizontalAlignment: Text.AlignRight + color: Colors.textMain + font.pixelSize: Fonts.fontPixelTitle + } + } } - } + + Column { id: _PressureOcclusionColumn + width : 150 + spacing : 20 + topPadding : 100 + leftPadding : 600 + Text { + id: _PressureOcclusion_Title + text: qsTr(" Prsr Oc ") + width: _PressureOcclusionColumn.width + horizontalAlignment: Text.AlignRight + color: Colors.textMain + font.pixelSize: Fonts.fontPixelTitle + font.underline: true + } + Repeater { + model: [ + vTreatmentPressureOcclusion.pressureocclusion_ArterialPressure .toFixed(2) , + vTreatmentPressureOcclusion.pressureocclusion_VenousPressure .toFixed(2) , + vTreatmentPressureOcclusion.pressureocclusion_BloodPumpOcclusion .toFixed(2) , + vTreatmentPressureOcclusion.pressureocclusion_DialysateInletPumpOcclusion .toFixed(2) , + vTreatmentPressureOcclusion.pressureocclusion_DialysateOutletPumpOcclusion .toFixed(2) + ] + Text { + text: modelData + width: _PressureOcclusionColumn.width + horizontalAlignment: Text.AlignRight + color: Colors.textMain + font.pixelSize: Fonts.fontPixelTitle + } + } + } + + Column { id: _LoadCellReadingsColumn + width : 150 + spacing : 20 + topPadding : 100 + leftPadding : 800 + Text { + id: _LoadCellReading_Title + text: qsTr(" LoadCl ") + width: _LoadCellReadingsColumn.width + horizontalAlignment: Text.AlignRight + color: Colors.textMain + font.pixelSize: Fonts.fontPixelTitle + font.underline: true + } + Repeater { + model: [ + vLoadCellReadings.reservoir1Prim .toFixed(2) , + vLoadCellReadings.reservoir1Bkup .toFixed(2) , + vLoadCellReadings.reservoir2Prim .toFixed(2) , + vLoadCellReadings.reservoir2Bkup .toFixed(2) + ] + Text { + objectName: "_LoadCellReadings" + index + text: modelData + width: _LoadCellReadingsColumn.width + horizontalAlignment: Text.AlignRight + color: Colors.textMain + font.pixelSize: Fonts.fontPixelTitle + } + } + } + + Column { id: _TemperatureSensorsColumn + width : 150 + spacing : -5 + topPadding : 100 + leftPadding : 1000 + Text { + id: _TemperatureSensors_Title + text: qsTr(" Temp ") + width: _TemperatureSensorsColumn.width + horizontalAlignment: Text.AlignRight + color: Colors.textMain + font.pixelSize: Fonts.fontPixelTitle + font.underline: true + } + Repeater { + model: [ + vTemperatureSensors.inletPrimaryHeater .toFixed(2) , + vTemperatureSensors.outletPrimaryHeater .toFixed(2) , + vTemperatureSensors.conductivitySensor1 .toFixed(2) , + vTemperatureSensors.conductivitySensor2 .toFixed(2) , + vTemperatureSensors.outletRedundancy .toFixed(2) , + vTemperatureSensors.inletDialysate .toFixed(2) , + vTemperatureSensors.primaryHeaterThermoCouple .toFixed(2) , + vTemperatureSensors.trimmerHeaterThermoCouple .toFixed(2) , + vTemperatureSensors.primaryHeaterColdJunction .toFixed(2) , + vTemperatureSensors.trimmerHeaterColdJunction .toFixed(2) , + vTemperatureSensors.primaryHeaterInternal .toFixed(2) , + vTemperatureSensors.trimmerHeaterInternal .toFixed(2) + ] + Text { + objectName: "_TemperatureSensors" + index + text: modelData + width: _TemperatureSensorsColumn.width + horizontalAlignment: Text.AlignRight + color: Colors.textMain + font.pixelSize: Fonts.fontPixelTitle + } + } + } }