Index: leahi.pro =================================================================== diff -u -r43ae56f762e6f3e1416d39e3d16f9103fc597e41 -r9143dd9055ada50b3ec13e7ce0671727a784f38f --- leahi.pro (.../leahi.pro) (revision 43ae56f762e6f3e1416d39e3d16f9103fc597e41) +++ leahi.pro (.../leahi.pro) (revision 9143dd9055ada50b3ec13e7ce0671727a784f38f) @@ -295,6 +295,7 @@ sources/model/dg/data/MDGTemperaturesData.h \ sources/model/dg/data/MDGValvesStatesData.h \ sources/model/dg/data/MDGAccelerometerData.h \ + sources/model/dg/data/MDDLevelData.h \ \ # CANBus sources/canbus/CanInterface.h \ sources/canbus/FrameInterface.h \ @@ -402,6 +403,7 @@ sources/view/dg/data/VDGTemperaturesData.h \ sources/view/dg/data/VDGValvesStatesData.h \ sources/view/dg/data/VDGAccelerometerData.h \ + sources/view/dg/data/VDDLevelData.h \ \ # Storage sources/storage/StorageGlobals.h \ sources/storage/Logger.h \ @@ -576,6 +578,7 @@ sources/model/dg/data/MDGTemperaturesData.cpp \ sources/model/dg/data/MDGValvesStatesData.cpp \ sources/model/dg/data/MDGAccelerometerData.cpp \ + sources/model/dg/data/MDDLevelData.cpp \ \ # CANBus sources/canbus/CanInterface.cpp \ sources/canbus/FrameInterface.cpp \ @@ -688,6 +691,7 @@ sources/view/dg/data/VDGTemperaturesData.cpp \ sources/view/dg/data/VDGValvesStatesData.cpp \ sources/view/dg/data/VDGAccelerometerData.cpp \ + sources/view/dg/data/VDDLevelData.cpp \ \ # Storage sources/storage/StorageGlobals.cpp \ sources/storage/FileHandler.cpp \ Index: leahi.qrc =================================================================== diff -u -r4e521c1a06ac5ba8fa125f9efba8a1b3c91c525a -r9143dd9055ada50b3ec13e7ce0671727a784f38f --- leahi.qrc (.../leahi.qrc) (revision 4e521c1a06ac5ba8fa125f9efba8a1b3c91c525a) +++ leahi.qrc (.../leahi.qrc) (revision 9143dd9055ada50b3ec13e7ce0671727a784f38f) @@ -77,13 +77,24 @@ resources/images/chevron-left.png resources/images/chevron-right.png resources/images/DenaliDevice.png + resources/images/edit.png + resources/images/edit-disabled.png + resources/images/Lock.png + resources/images/Prescription.png + resources/images/Settings.png + resources/images/Unlock.png + resources/images/Wifi.png + resources/images/PauseOrange.png + resources/images/arrowsExpanding.png + resources/images/HomeBackground.png sources/gui/qml/components/MainMenu.qml sources/gui/qml/components/TouchRect.qml sources/gui/qml/components/TitleText.qml sources/gui/qml/components/ImageLogoD.qml sources/gui/qml/components/ScreenItem.qml + sources/gui/qml/components/IconButton.qml sources/gui/qml/components/StackItem.qml sources/gui/qml/components/ModalDialog.qml sources/gui/qml/components/BackButton.qml @@ -118,7 +129,7 @@ sources/gui/qml/components/UltrafiltrationButton.qml sources/gui/qml/components/ImageWave.qml sources/gui/qml/components/ImageClock.qml - sources/gui/qml/components/ImageLogoDDarkTransparent.qml + sources/gui/qml/components/ImageLogoDDarkTransparent.qml sources/gui/qml/components/ConfirmTreatmentTableEntry.qml sources/gui/qml/components/DebugDataColumn.qml sources/gui/qml/components/RangeSlider.qml @@ -137,6 +148,9 @@ sources/gui/qml/components/EntryDialog.qml sources/gui/qml/components/SliderArrows.qml sources/gui/qml/components/QRCode.qml + sources/gui/qml/components/ContentArea.qml + sources/gui/qml/components/LabelValue.qml + sources/gui/qml/components/ArrowButton.qml sources/gui/qml/compounds/PressureRangeSlider.qml @@ -220,6 +234,8 @@ sources/gui/qml/pages/treatment/TreatmentHome.qml sources/gui/qml/pages/treatment/TreatmentBloodPrime.qml sources/gui/qml/pages/treatment/TreatmentUltrafiltrationItem.qml + sources/gui/qml/pages/treatment/TreatmentSection.qml + sources/gui/qml/pages/treatment/TreatmentSectionHeader.qml sources/gui/qml/pages/treatment/sections/TreatmentFlows.qml @@ -230,6 +246,8 @@ sources/gui/qml/pages/treatment/sections/TreatmentTime.qml sources/gui/qml/pages/treatment/sections/TreatmentSaline.qml sources/gui/qml/pages/treatment/sections/TreatmentHeparin.qml + sources/gui/qml/pages/treatment/sections/TreatmentPressureComponent.qml + sources/gui/qml/pages/treatment/sections/TreatmentFlowsComponent.qml sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentFlow.qml Index: sources/canbus/MessageGlobals.h =================================================================== diff -u -re88cc4de6dae78dd9412e4935f77af478125f407 -r9143dd9055ada50b3ec13e7ce0671727a784f38f --- sources/canbus/MessageGlobals.h (.../MessageGlobals.h) (revision e88cc4de6dae78dd9412e4935f77af478125f407) +++ sources/canbus/MessageGlobals.h (.../MessageGlobals.h) (revision 9143dd9055ada50b3ec13e7ce0671727a784f38f) @@ -105,6 +105,7 @@ {Gui::GuiActionType::ID_DGAccelerometerData , 9 * 4 }, // 9 parameters each 4bytes {Gui::GuiActionType::ID_DDConductivityData , 5 * 4 }, // 5 parameters each 4bytes {Gui::GuiActionType::ID_DDGenDialysateData , 9 * 4 }, // 9 parameters each 4bytes + {Gui::GuiActionType::ID_DDLevelData , 3 * 4 }, // 3 parameters each 4bytes // HD Data Messages {Gui::GuiActionType::ID_HDAccelerometerData , 9 * 4 }, // 9 parameters each 4bytes {Gui::GuiActionType::ID_HDSyringePumpData , 9 * 4 }, // 9 parameters each 4bytes Index: sources/canbus/MessageInterpreter.cpp =================================================================== diff -u -r94c3fb6bbcf932b1f50a2d616dc600e3c449afe4 -r9143dd9055ada50b3ec13e7ce0671727a784f38f --- sources/canbus/MessageInterpreter.cpp (.../MessageInterpreter.cpp) (revision 94c3fb6bbcf932b1f50a2d616dc600e3c449afe4) +++ sources/canbus/MessageInterpreter.cpp (.../MessageInterpreter.cpp) (revision 9143dd9055ada50b3ec13e7ce0671727a784f38f) @@ -600,6 +600,7 @@ case Gui::GuiActionType::ID_DGAccelerometerData : ok = notify(vMessage, vData, Gui::GuiActionType::ID_DGAccelerometerData ); break; case Gui::GuiActionType::ID_DDConductivityData : ok = notify(vMessage, vData, Gui::GuiActionType::ID_DDConductivityData ); break; case Gui::GuiActionType::ID_DDGenDialysateData : ok = notify(vMessage, vData, Gui::GuiActionType::ID_DDGenDialysateData ); break; + case Gui::GuiActionType::ID_DDLevelData : ok = notify(vMessage, vData, Gui::GuiActionType::ID_DDLevelData ); break; // ----- Datum - Pre-Treatment progress case Gui::GuiActionType::ID_DGFilterFlushData : ok = notify(vMessage, vData, Gui::GuiActionType::ID_DGFilterFlushData ); break; // DG Response Messages Index: sources/gui/GuiGlobals.cpp =================================================================== diff -u -r43ae56f762e6f3e1416d39e3d16f9103fc597e41 -r9143dd9055ada50b3ec13e7ce0671727a784f38f --- sources/gui/GuiGlobals.cpp (.../GuiGlobals.cpp) (revision 43ae56f762e6f3e1416d39e3d16f9103fc597e41) +++ sources/gui/GuiGlobals.cpp (.../GuiGlobals.cpp) (revision 9143dd9055ada50b3ec13e7ce0671727a784f38f) @@ -110,6 +110,7 @@ #include "VDGAccelerometerData.h" #include "VDDConductivityData.h" #include "VDDGenDialysateData.h" +#include "VDDLevelData.h" // ----- #include "VTreatmentCreate.h" // ----- In-Treatment Adjustments Index: sources/gui/GuiGlobals.h =================================================================== diff -u -r7b7d5478285cfb78793a96d327e9f0a064d9d0d7 -r9143dd9055ada50b3ec13e7ce0671727a784f38f --- sources/gui/GuiGlobals.h (.../GuiGlobals.h) (revision 7b7d5478285cfb78793a96d327e9f0a064d9d0d7) +++ sources/gui/GuiGlobals.h (.../GuiGlobals.h) (revision 9143dd9055ada50b3ec13e7ce0671727a784f38f) @@ -201,6 +201,7 @@ ID_DGHeatersData = 0x2C00, // 44 ID_DGLoadCellReadingsData = 0x0C00, // 12 ID_DGTemperaturesData = 0x2D00, // 45 + ID_DDLevelData = 0x2900, // 41 //// ----- @LEAHIZED ID_DGAccelerometerData = 0x3400, // 52 ID_DDConductivityData = 0x1F00, // 31 //// ----- @LEAHIZED ID_DDGenDialysateData = 0x2F00, // 47 //// ----- @LEAHIZED Index: sources/gui/qml/components/DebugDataColumn.qml =================================================================== diff -u -r86274f18e9356126c41d848bc78bfba318638aee -r9143dd9055ada50b3ec13e7ce0671727a784f38f --- sources/gui/qml/components/DebugDataColumn.qml (.../DebugDataColumn.qml) (revision 86274f18e9356126c41d848bc78bfba318638aee) +++ sources/gui/qml/components/DebugDataColumn.qml (.../DebugDataColumn.qml) (revision 9143dd9055ada50b3ec13e7ce0671727a784f38f) @@ -37,7 +37,7 @@ property int horizontalAlignmentText : Text.AlignRight width : 150 - spacing : -15 + spacing : -10 Text { id: _title text : _root.title @@ -49,6 +49,7 @@ bottomPadding: 5 font.family: Fonts.fontFamilyFixed } + Repeater { id: _repeater model: _root.model Text { id: _text @@ -68,6 +69,7 @@ font.pixelSize : fontPixelSizeLabel anchors.baseline: parent.baseline anchors.left : parent.right + anchors.leftMargin: 10 horizontalAlignment: Text.AlignLeft font.family: Fonts.fontFamilyFixed } Index: sources/gui/qml/dialogs/diagnostics/DiagnosticsTD.qml =================================================================== diff -u --- sources/gui/qml/dialogs/diagnostics/DiagnosticsTD.qml (revision 0) +++ sources/gui/qml/dialogs/diagnostics/DiagnosticsTD.qml (revision 9143dd9055ada50b3ec13e7ce0671727a784f38f) @@ -0,0 +1,280 @@ +/*! + * + * Copyright (c) 2021-2024 Diality Inc. - All Rights Reserved. + * \copyright + * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN + * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. + * + * \file DiagnosticsDialog.qml + * \author (last) Dara Navaei + * \date (last) 05-Mar-2024 + * \author (original) Behrouz NematiPour + * \date (original) 11-May-2021 + * + */ + +// Qt +import QtQuick 2.12 + +// Project +// 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" + + 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 , + + ] + label: [ + "sFLow (H4) ", + "mFlow (H4) ", + "rSpd (H4) ", + "mSpd (H4) ", + "mCurr (H4) ", + "RPM (H4) ", + "rCnt (H4) ", + "pFlow (H4) ", + "rHall (H6) ", + ] + } + + 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 ", + ] + } + + 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 , + + ] + label: [ + "ID ", + "state ", + "Name ", + "Cnt ", + "nPos ", + ] + } + + DebugDataColumn { id: _TDEjectorColumn + textObjectName :"_TDEjectorData" + title : qsTr(" Ejt ") + x: col(4.5) + y: row(0) + model: [ + vTDEjector.state , + vTDEjector.setSpeed .toFixed(2) , + + ] + label: [ + "State (H5) ", + "Spd (H5) " , + ] + } + + DebugDataColumn { id: _TDSwitchesColumn + textObjectName :"_TDSwitchesData" + title : qsTr(" Switches ") + x: col(6) + y: row(0) + model: [ + vTDSwitches.door , + + ] + label: [ + "door (H9) ", + ] + } + + + 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: _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: _TDTemperatureCoulumn + textObjectName :"_TDTemperatureData" + title : qsTr(" Temp ") + x: col(3) + y: row(3.5) + model: [ + vTDTemperature.boardTemp .toFixed(2) + ] + label: [ + "board", + ] + } + + + DebugDataColumn { id: _TDTXStatesColumn + textObjectName :"_TDTxStatesData" + title : qsTr(" TXStates ") + x: col(0) + y: row(7) + model: [ + vTDTreatmentStates.subMode , + vTDTreatmentStates.txBloodPrime , + vTDTreatmentStates.txDialysis , + vTDTreatmentStates.ufState , + vTDTreatmentStates.txStop , + vTDTreatmentStates.txRinseback , + vTDTreatmentStates.txRecirculate, + vTDTreatmentStates.txEnd , + vTDTreatmentStates.salineState , + 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/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 + + spacing: -30 + DebugDataColumn { id: _TDVersionsColumn + textObjectName :"_TDVersionsData" + title : "" + horizontalAlignmentText: Text.AlignLeft + fontPixelSizeText: Fonts.fontPixelDebugTitle + model: [ "TD: v%1.%2.%3-%4 v%5.%6.%7-%8 c%9\nTD Serial#: %10" + .arg(vAdjustmentVersions.tdVerMajor ) + .arg(vAdjustmentVersions.tdVerMinor ) + .arg(vAdjustmentVersions.tdVerMicro ) + .arg(vAdjustmentVersions.tdVerBuild ) + .arg(vAdjustmentVersions.tdVerFPGAMajor ) + .arg(vAdjustmentVersions.tdVerFPGAMinor ) + .arg(vAdjustmentVersions.tdVerFPGALab ) + .arg(vAdjustmentVersions.tdVerFPGAId ) + .arg(vAdjustmentVersions.tdVerCompatibilityRev ) + .arg(vAdjustmentVersions.tdSerial ) + ] + } + } + } + + + Connections { target: _GuiView + function onDidActionReceive( vAction, vData ) { + // DEBUG: console.debug("onDidActionReceive", vAction, vData) + if (vAction === GuiActions.ID_CANBusFaultCount ) { + _canbusFaultCountText.count = vData[0] + } + } + } +} Index: sources/gui/qml/main.qml =================================================================== diff -u -r77ba0083b790f7c1c851c60ecaeaa4f2e7eff7a8 -r9143dd9055ada50b3ec13e7ce0671727a784f38f --- sources/gui/qml/main.qml (.../main.qml) (revision 77ba0083b790f7c1c851c60ecaeaa4f2e7eff7a8) +++ sources/gui/qml/main.qml (.../main.qml) (revision 9143dd9055ada50b3ec13e7ce0671727a784f38f) @@ -102,6 +102,7 @@ import VDGAccelerometer 0.1 import VDDConductivity 0.1 import VDDGenDialysate 0.1 +import VDDLevel 0.1 // In-Treatment - Adjustemnt import VTreatmentAdjustmentDuration 0.1 import VTreatmentAdjustmentFlows 0.1 @@ -131,6 +132,7 @@ import "qrc:/pages/settings" import "qrc:/components" import "qrc:/dialogs" +import "qrc:/dialogs/diagnostics" /*! * \brief Initialization and start point of the QML @@ -220,6 +222,7 @@ VDGAccelerometer { id: vDGAccelerometer } VDDConductivity { id: vDDConductivity } VDDGenDialysate { id: vDDGenDialysate } + VDDLevel { id: vDDLevel } // --- Pre-Treatment Progress Data VPreTreatmentAdjustmentInitTreatment { id: vPreTreatmentAdjustmentInitTreatment } VDGFilterFlush { id: vDGFilterFlush } Index: sources/model/MModel.h =================================================================== diff -u -r53491f18249d31cec365d69e37355ceb61131e56 -r9143dd9055ada50b3ec13e7ce0671727a784f38f --- sources/model/MModel.h (.../MModel.h) (revision 53491f18249d31cec365d69e37355ceb61131e56) +++ sources/model/MModel.h (.../MModel.h) (revision 9143dd9055ada50b3ec13e7ce0671727a784f38f) @@ -109,6 +109,7 @@ #include "MDGAccelerometerData.h" #include "MDDConductivityData.h" #include "MDDGenDialysateData.h" +#include "MDDLevelData.h" // Pre-Treatment #include "MPreTreatmentAdjustRequests.h" @@ -372,6 +373,7 @@ REGISTER_METATYPE( DGAccelerometerData ) \ REGISTER_METATYPE( DDConductivityData ) \ REGISTER_METATYPE( DDGenDialysateData ) \ + REGISTER_METATYPE( DDLevelData ) \ \ REGISTER_METATYPE( HDDebugTextData ) \ REGISTER_METATYPE( DGDebugTextData ) \ @@ -560,6 +562,7 @@ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, DGAccelerometerData ) \ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, DDConductivityData ) \ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, DDGenDialysateData ) \ + ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, DDLevelData ) \ \ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, HDDebugTextData ) \ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, DGDebugTextData ) \ @@ -762,6 +765,7 @@ ACTION_RECEIVE_BRIDGE_DEFINITION( DGAccelerometerData ) \ ACTION_RECEIVE_BRIDGE_DEFINITION( DDConductivityData ) \ ACTION_RECEIVE_BRIDGE_DEFINITION( DDGenDialysateData ) \ + ACTION_RECEIVE_BRIDGE_DEFINITION( DDLevelData ) \ \ ACTION_RECEIVE_BRIDGE_DEFINITION( HDDebugTextData ) \ ACTION_RECEIVE_BRIDGE_DEFINITION( DGDebugTextData ) \ @@ -1069,6 +1073,7 @@ ACTION_RECEIVE_SIGNAL( DGAccelerometerData ) \ ACTION_RECEIVE_SIGNAL( DDConductivityData ) \ ACTION_RECEIVE_SIGNAL( DDGenDialysateData ) \ + ACTION_RECEIVE_SIGNAL( DDLevelData ) \ \ ACTION_RECEIVE_SIGNAL( HDDebugTextData ) \ ACTION_RECEIVE_SIGNAL( DGDebugTextData ) \ Index: sources/view/VView.h =================================================================== diff -u -r43ae56f762e6f3e1416d39e3d16f9103fc597e41 -r9143dd9055ada50b3ec13e7ce0671727a784f38f --- sources/view/VView.h (.../VView.h) (revision 43ae56f762e6f3e1416d39e3d16f9103fc597e41) +++ sources/view/VView.h (.../VView.h) (revision 9143dd9055ada50b3ec13e7ce0671727a784f38f) @@ -191,6 +191,7 @@ REGISTER_TYPE( VDGAccelerometer ) \ REGISTER_TYPE( VDDConductivity ) \ REGISTER_TYPE( VDDGenDialysate ) \ + REGISTER_TYPE( VDDLevel ) \ /* Pre-Treatment */ \ REGISTER_TYPE( VPreTreatmentAdjustmentInitTreatment ) \ REGISTER_TYPE( VDGFilterFlush ) \