Index: sources/view/hd/data/VHDOperationModeData.cpp =================================================================== diff -u -r371ebfbad6c230e8415c12f85935910fbca46612 -r1da89b0452b8ef9448847618e75c118f3f58bd0c --- sources/view/hd/data/VHDOperationModeData.cpp (.../VHDOperationModeData.cpp) (revision 371ebfbad6c230e8415c12f85935910fbca46612) +++ sources/view/hd/data/VHDOperationModeData.cpp (.../VHDOperationModeData.cpp) (revision 1da89b0452b8ef9448847618e75c118f3f58bd0c) @@ -1,15 +1,15 @@ /*! * - * Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. + * Copyright (c) 2020-2023 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 VHDOperationModeData.cpp * \author (last) Behrouz NematiPour - * \date (last) 19-Apr-2021 + * \date (last) 28-Sep-2022 * \author (original) Behrouz NematiPour - * \date (original) 19-Apr-2021 + * \date (original) 13-Aug-2020 * */ #include "VHDOperationModeData.h" @@ -38,11 +38,12 @@ standbyStart ( vData.mSubMode == GuiHDStandbyStates ::STANDBY_START_STATE ); standbyWaitTreatment ( vData.mSubMode == GuiHDStandbyStates ::STANDBY_WAIT_FOR_TREATMENT_STATE ); standbyWaitDisinfect ( vData.mSubMode == GuiHDStandbyStates ::STANDBY_WAIT_FOR_DISINFECT_STATE ); - standbyDGFlush ( vData.mSubMode == GuiHDStandbyStates ::STANDBY_DG_FLUSH_IN_PROGRESS_STATE ); - standbyDGDisinfectHeat ( vData.mSubMode == GuiHDStandbyStates ::STANDBY_DG_HEAT_DISINFECT_IN_PROGRESS_STATE ); - standbyDGDisinfectChemical ( vData.mSubMode == GuiHDStandbyStates ::STANDBY_DG_CHEM_DISINFECT_IN_PROGRESS_STATE ); } + // isTreatment ( ! _service ); // if enabled goes to home, fault from service, which shouldn't since the service is dead end. Maybe later investigate more when fault enabled. + isSettings ( _service ); + // isManager ( false ); // Always false, not used/implemented for now. + // Go to home is kind of tricky and needs to be managed here in the backend. // It seems we need more states. // It can be handled in the QML but two things will happen that none of which are good. @@ -60,7 +61,12 @@ // Final Solution: # - The solution though is to have a special state in backend C++ that checks if opMode is standby and subMode is state/waitTreatment // and if these conditions changed since the last time then signal emits. // Brief : *** So actually we have a mixed condition property *** - home ( _standby && ( _standbyStart || _standbyWaitTreatment ) ); + home ( _standby && + ( // op_mode of standby is a must for the home screen + ( _standbyStart || _standbyWaitTreatment ) // actual standby and ready to start a treatment + // disinfection state but getting to home screen to do what allowed in disinfection + ) + ); } QString View::VHDOperationMode::text()