Index: sources/canbus/MessageGlobals.h =================================================================== diff -u -r4910e731017ba575e1f56c04dec0bf0589538f89 -rbbb970aff112f09c189986f026055bec794afbd6 --- sources/canbus/MessageGlobals.h (.../MessageGlobals.h) (revision 4910e731017ba575e1f56c04dec0bf0589538f89) +++ sources/canbus/MessageGlobals.h (.../MessageGlobals.h) (revision bbb970aff112f09c189986f026055bec794afbd6) @@ -87,7 +87,7 @@ // ---- {Gui::GuiActionType::ID_HDOperationModeData , 2 * 4 }, // 2 parameter each 4bytes {Gui::GuiActionType::ID_PreTreatmentStates , 11 * 4 }, //11 parameters each 4bytes - {Gui::GuiActionType::ID_TreatmentStates , 10 * 4 }, // 9 parameters each 4bytes + {Gui::GuiActionType::ID_TreatmentStates , 10 * 4 }, //10 parameters each 4bytes {Gui::GuiActionType::ID_PostTreatmentStates , 2 * 4 }, // 2 parameter each 4bytes // DG Data Messages Index: sources/gui/GuiGlobals.h =================================================================== diff -u -rc9f8f8cf3c6c37fc6460d8675c62c9442c4d4263 -rbbb970aff112f09c189986f026055bec794afbd6 --- sources/gui/GuiGlobals.h (.../GuiGlobals.h) (revision c9f8f8cf3c6c37fc6460d8675c62c9442c4d4263) +++ sources/gui/GuiGlobals.h (.../GuiGlobals.h) (revision bbb970aff112f09c189986f026055bec794afbd6) @@ -309,6 +309,8 @@ Q_ENUM(HD_Standby_States) // Treatment Q_ENUM(Treatment_States) + // Dialysis + Q_ENUM(Dialysis_States) // Ultrafiltration Q_ENUM(UF_Adjustments) Q_ENUM(UF_Commands) @@ -384,6 +386,8 @@ typedef GuiActions::HD_Standby_States GuiHDStandbyStates; // Treatment States typedef GuiActions::Treatment_States GuiTreatmentStates; + // Dialysis + typedef GuiActions::Dialysis_States GuiDialysisState; // Ultrafiltration typedef GuiActions::UF_States GuiUFStates; typedef GuiActions::UF_Commands GuiUFCommands; Index: sources/gui/qml/pages/endtreatment/EndTreatmentRinsebackStack.qml =================================================================== diff -u -rc9f8f8cf3c6c37fc6460d8675c62c9442c4d4263 -rbbb970aff112f09c189986f026055bec794afbd6 --- sources/gui/qml/pages/endtreatment/EndTreatmentRinsebackStack.qml (.../EndTreatmentRinsebackStack.qml) (revision c9f8f8cf3c6c37fc6460d8675c62c9442c4d4263) +++ sources/gui/qml/pages/endtreatment/EndTreatmentRinsebackStack.qml (.../EndTreatmentRinsebackStack.qml) (revision bbb970aff112f09c189986f026055bec794afbd6) @@ -78,30 +78,30 @@ } } -/* TODO : stackView manual performance enhanced. - // an idea that is being worked on for later performance imporovement - // if the stackview becomes slow this idea is a manual transition with animation to be replacecd with stackView - PropertyAnimation { id: _rbInitAnimation - target: _endTreatmentRinsebackInit - property: "opacity" - duration: 1000 - to: vHDTreatmentStates.rbInit ? 1 : 0 - } - PropertyAnimation { id: _rbStopAnimation - target: _endTreatmentRinsebackComplete - property: "opacity" - duration: 1000 - to: vHDTreatmentStates.rbStop ? 1 : 0 - } - Connections { target: vHDTreatmentStates - onStateTriggered : { // this property is a TRIGGER and shall be set at the end of the property setters functions list - _endTreatmentRinsebackInit .visible = vHDTreatmentStates.rbInit - _endTreatmentRinseback .visible = vHDTreatmentStates.rbRun || vHDTreatmentStates.rbPaused - _endTreatmentRinsebackComplete .visible = vHDTreatmentStates.rbStop - _endTreatmentAdditional .visible = vHDTreatmentStates.rbAdditional - - } - onRbInitChanged: _rbInitAnimation.running = true - onRbStopChanged: _rbStopAnimation.running = true - } -*/ +// TODO : stackView manual performance enhanced. +// // an idea that is being worked on for later performance imporovement +// // if the stackview becomes slow this idea is a manual transition with animation to be replacecd with stackView +// PropertyAnimation { id: _rbInitAnimation +// target: _endTreatmentRinsebackInit +// property: "opacity" +// duration: 1000 +// to: vHDTreatmentStates.rbInit ? 1 : 0 +// } +// PropertyAnimation { id: _rbStopAnimation +// target: _endTreatmentRinsebackComplete +// property: "opacity" +// duration: 1000 +// to: vHDTreatmentStates.rbStop ? 1 : 0 +// } +// Connections { target: vHDTreatmentStates +// onStateTriggered : { // this property is a TRIGGER and shall be set at the end of the property setters functions list +// _endTreatmentRinsebackInit .visible = vHDTreatmentStates.rbInit +// _endTreatmentRinseback .visible = vHDTreatmentStates.rbRun || vHDTreatmentStates.rbPaused +// _endTreatmentRinsebackComplete .visible = vHDTreatmentStates.rbStop +// _endTreatmentAdditional .visible = vHDTreatmentStates.rbAdditional +// +// } +// onRbInitChanged: _rbInitAnimation.running = true +// onRbStopChanged: _rbStopAnimation.running = true +// } +// Index: sources/model/hd/data/pretreatment/MPreTreatmentStatesData.h =================================================================== diff -u -raf8d98b36b427e2b5f4d6659fcf3b58ee79eab6a -rbbb970aff112f09c189986f026055bec794afbd6 --- sources/model/hd/data/pretreatment/MPreTreatmentStatesData.h (.../MPreTreatmentStatesData.h) (revision af8d98b36b427e2b5f4d6659fcf3b58ee79eab6a) +++ sources/model/hd/data/pretreatment/MPreTreatmentStatesData.h (.../MPreTreatmentStatesData.h) (revision bbb970aff112f09c189986f026055bec794afbd6) @@ -27,7 +27,7 @@ namespace Model { /*! - * \brief The MTreatmentStates class + * \brief The MPreTreatmentStates class * \details The treatment states data model * These are states of the current treatment. * It also includes the ultrafiltration states, saline bolus states. Index: sources/model/hd/data/treatment/MTreatmentStatesData.h =================================================================== diff -u -rc9f8f8cf3c6c37fc6460d8675c62c9442c4d4263 -rbbb970aff112f09c189986f026055bec794afbd6 --- sources/model/hd/data/treatment/MTreatmentStatesData.h (.../MTreatmentStatesData.h) (revision c9f8f8cf3c6c37fc6460d8675c62c9442c4d4263) +++ sources/model/hd/data/treatment/MTreatmentStatesData.h (.../MTreatmentStatesData.h) (revision bbb970aff112f09c189986f026055bec794afbd6) @@ -38,15 +38,16 @@ * * | Payload || * | || - * | #1:(U32) | \ref Data::mSubMode | - * | #2:(U32) | \ref Data::mUFState | - * | #3:(U32) | \ref Data::mSalineState | - * | #4:(U32) | \ref Data::mHeparinState | - * | #5:(U32) | \ref Data::mRinsebackState | - * | #6:(U32) | \ref Data::mRecirculateState | - * | #6:(U32) | \ref Data::mBloodPrimeState | - * | #6:(U32) | \ref Data::mTreatmentEndState | - * | #6:(U32) | \ref Data::mTreatmentStopState | + * | #01:(U32) | \ref Data::mSubMode | + * | #02:(U32) | \ref Data::mUFState | + * | #03:(U32) | \ref Data::mSalineState | + * | #04:(U32) | \ref Data::mHeparinState | + * | #05:(U32) | \ref Data::mRinsebackState | + * | #06:(U32) | \ref Data::mRecirculateState | + * | #07:(U32) | \ref Data::mBloodPrimeState | + * | #08:(U32) | \ref Data::mTreatmentEndState | + * | #09:(U32) | \ref Data::mTreatmentStopState | + * | #10:(U32) | \ref Data::mDialysisState | * * \sa Data * \sa Treatment_States Index: sources/view/hd/data/treatment/VHDTreatmentStatesData.cpp =================================================================== diff -u -r8172c6aa4187be26aa9c0e73a130bc6183ad10dd -rbbb970aff112f09c189986f026055bec794afbd6 --- sources/view/hd/data/treatment/VHDTreatmentStatesData.cpp (.../VHDTreatmentStatesData.cpp) (revision 8172c6aa4187be26aa9c0e73a130bc6183ad10dd) +++ sources/view/hd/data/treatment/VHDTreatmentStatesData.cpp (.../VHDTreatmentStatesData.cpp) (revision bbb970aff112f09c189986f026055bec794afbd6) @@ -114,8 +114,20 @@ ENUM_READ ( GuiTreatmentStates, TREATMENT_START_STATE , txStart ); // Treatment states - Dialysis - ENUM_READ ( GuiTreatmentStates, TREATMENT_DIALYSIS_STATE , txDialysis ); + bool mDialysis = vData.mSubMode == GuiTreatmentStates ::TREATMENT_DIALYSIS_STATE ; + if ( mDialysis ) { + ENUM_CHECK_O( GuiDialysisState, vData.mDialysisState ) { + ENUM_CHECK ( GuiDialysisState, DIALYSIS_START_STATE ) + ENUM_CHECK ( GuiDialysisState, DIALYSIS_UF_STATE ) + ENUM_CHECK ( GuiDialysisState, DIALYSIS_SALINE_BOLUS_STATE ) + ENUM_CHECK_C( GuiDialysisState, NUM_OF_DIALYSIS_STATES ) } + ENUM_READ ( GuiDialysisState, DIALYSIS_START_STATE , dyStart ); + ENUM_READ ( GuiDialysisState, DIALYSIS_UF_STATE , dyUltrafiltration ); + ENUM_READ ( GuiDialysisState, DIALYSIS_SALINE_BOLUS_STATE , dySalineBolus ); + } + txDialysis ( mDialysis ); // it's the main dialysis event so moved last to have all the sub-dialysis-states updated prior to. + // TODO : Check with Qt.5.15.10 // NOTE : For Rinseback and Recirculate // 1 - it seems we may never need the txRinseback @@ -145,7 +157,7 @@ ENUM_READ ( GuiRinsebackStates, RINSEBACK_STOP_STATE , rbStop ); ENUM_READ ( GuiRinsebackStates, RINSEBACK_RUN_ADDITIONAL_STATE , rbAdditional ); } - txRinseback ( mRinseback ); // it's the main rinseback even so moved last to have all the sub-rinseback-states updated prior to. + txRinseback ( mRinseback ); // it's the main rinseback event so moved last to have all the sub-rinseback-states updated prior to. // Recirculate states bool mRecirculate = vData.mSubMode == GuiTreatmentStates ::TREATMENT_RECIRC_STATE ; Index: sources/view/hd/data/treatment/VHDTreatmentStatesData.h =================================================================== diff -u -r8172c6aa4187be26aa9c0e73a130bc6183ad10dd -rbbb970aff112f09c189986f026055bec794afbd6 --- sources/view/hd/data/treatment/VHDTreatmentStatesData.h (.../VHDTreatmentStatesData.h) (revision 8172c6aa4187be26aa9c0e73a130bc6183ad10dd) +++ sources/view/hd/data/treatment/VHDTreatmentStatesData.h (.../VHDTreatmentStatesData.h) (revision bbb970aff112f09c189986f026055bec794afbd6) @@ -90,6 +90,11 @@ PROPERTY( bool , hpEmpty , false) ///< HEPARIN_STATE_EMPTY = 6 # Heparin Syringe empty PROPERTY( bool , heparin , false) ///< The heparin state is an asynchronous state + // Dialysis States + PROPERTY( bool , dyStart , true ) ///< Start state of the dialysis sub-mode state machine + PROPERTY( bool , dyUltrafiltration , false) ///< Ultrafiltration state of the dialysis sub-mode state machine + PROPERTY( bool , dySalineBolus , false) ///< Saline bolus state of the dialysis sub-mode state machine + // Rinseback States PROPERTY( bool , rbInit , true ) ///< RINSEBACK_STOP_INIT_STATE = 0 # Start state (stopped) of the rinseback sub-mode state machine PROPERTY( bool , rbRun , false) ///< RINSEBACK_RUN_STATE = 1 # Rinseback running state of the rinseback sub-mode state machine