Index: sources/ApplicationController.cpp =================================================================== diff -u -r4fd6a7d7801d91ffbce9e8d4b54900224f6a0fac -r0eb3d05f90d7ed90eadfab6c0c1db76fa2a70fb6 --- sources/ApplicationController.cpp (.../ApplicationController.cpp) (revision 4fd6a7d7801d91ffbce9e8d4b54900224f6a0fac) +++ sources/ApplicationController.cpp (.../ApplicationController.cpp) (revision 0eb3d05f90d7ed90eadfab6c0c1db76fa2a70fb6) @@ -111,8 +111,8 @@ this , SLOT( onActionTransmit(GuiActionType, const QVariantList &))); connect(&_GuiController , SIGNAL(didQuitApplication()), this , SLOT( onQuitApplication())); - connect(&_GuiController , SIGNAL(didTreatmentRangesIncorrect()), - this , SLOT(onTreatmentRangesIncorrect())); + connect(&_GuiController , SIGNAL(didTreatmentRangesDone(bool)), + this , SLOT( onTreatmentRangesDone(bool))); // From HD/DG connect(&_MessageDispatcher, SIGNAL(didActionReceive(GuiActionType, const QVariantList &)), @@ -528,11 +528,10 @@ // which currently is Application_Thread, since the Settings is created in that thread. _Settings; - QFuture mFuture = QtConcurrent::run([=](){ // made the call a lambda to make sure there is no function to accidentally being called, out of thread [developer safety]. + QFuture mFuture = QtConcurrent::run( [=]() -> int { // made the call a lambda to make sure there is no function to accidentally being called, out of thread [developer safety]. //TODO The Settings shall be the Singleton SettingsController and modify the MSettings like the others. Storage::Settings settings; - int settingReadErr = settings.read(); - _settingsReadComplete = (settingReadErr == Storage::Settings::Settings_Error::eError_None); + return settings.read(); }); _settingsWatcher.setFuture(mFuture); } @@ -547,17 +546,21 @@ onActionReceive(SettingsData()); /// POST /// - // call initialization functions when setting's ready. - bool isPOSTComplete = _post.isDone() && _settingsReadComplete; - _Settings.datetimeFormat(); - emit didSettingsDone( ); // MessageDispatcher -> MessageInterpreter : updateUnhandledMessages - emit didPOSTPass (isPOSTComplete); // GuiController -> GuiView : didPOSTPass(bool) + //call initialization functions when setting's ready. + //TODO move the initSettig in the Application POST since it is part of the post. + _settingsError = _settingsWatcher.result(); + //DEBUG qDebug() << " ***** " << sender() << _settingsError; + _post.isDone( ! _settingsError ); + if ( _settingsError ) { + LOG_APPED_PO(QString("Settings read failed")); + onPOSTFail(Gui::GuiAlarmID::ALARM_ID_HD_UI_POST_FAILURE_SETTINGS_BAD); + } else { + _Settings.datetimeFormat(); + } - // HD POST request - postDoneRequest ( ); - versionsRequest (isPOSTComplete); - // UI is done, let's keep in touch - emit didKeepAliveBegin(); + // this singal can be emmited here [ others are postponed to the onTreatmentRangesDone ] + // here we know the CRC was fine with not empty configuration and all files can be read. + emit didSettingsDone( ); // MessageDispatcher -> MessageInterpreter : updateUnhandledMessages } /*! @@ -606,16 +609,27 @@ void ApplicationController::onPOSTCloudSync(bool vPass) { emit didPOSTCloudSync (vPass); - emit didPOSTCloudSyncData("000.000.000.000" /*_post.netCloudSync*/); // not needed and post is not getting it yet.[ApplicationController => DeviceController] + emit didPOSTCloudSyncData("" /*_post.netCloudSync*/); // not needed and post is not getting it yet.[ApplicationController => DeviceController] } /*! * \brief ApplicationController::onPOSTFail - * \details sends the Alarm Trigger message, used when the POST Failed. - * \param vAlarmID + * \details Sends the Alarm Trigger message, if the vSend is true, + * or + * Queues the alarms if vSend is false. + * \param vAlarmID - The alarm ID + * \param vSend - False to queue the ValarmID alarm ID, or True to send the list of the queued alarms. */ -void ApplicationController::onPOSTFail(GuiAlarmID vAlarmID) { - emit didActionTransmit(GuiActionType::ID_AlarmTriggered, {vAlarmID ,0,0,0,0,0,0,0}); +void ApplicationController::onPOSTFail(GuiAlarmID vAlarmID, bool vSend) { + static QVector failList; + if ( vSend ) { + for ( auto alarmID : failList ) { + emit didActionTransmit(Gui::GuiActionType::ID_AlarmTriggered, {alarmID ,0,0,0,0,0,0,0}); + } + } + else { + failList.append(vAlarmID); + } } /*! @@ -644,14 +658,11 @@ /*! * \brief ApplicationController::versionsRequest * \details Sends a version request - * \param vPass - condition to request for version if POST is done */ -void ApplicationController::versionsRequest(bool vPass) { - if (vPass) { - AdjustVersionsRequestData adjustVersionsRequestData; - emit didAdjustment(adjustVersionsRequestData); - LOG_DEBUG("POSTInfReq Sent"); - } +void ApplicationController::versionsRequest() { + AdjustVersionsRequestData adjustVersionsRequestData; + emit didAdjustment(adjustVersionsRequestData); + LOG_DEBUG("POSTVersionReq Sent"); } /*! @@ -673,8 +684,13 @@ * \details It is the slot to handle _DeviceController::didCryptSetupMount signal. * Tels the settings start initate. */ -void ApplicationController::onCryptSetupMount(bool /*vPass*/) +void ApplicationController::onCryptSetupMount(bool vPass) { + //DEBUG qDebug() << " ***** " << Q_FUNC_INFO << vPass; + if ( ! vPass ) { + _post.isDone(vPass); + onPOSTFail(Gui::GuiAlarmID::ALARM_ID_HD_UI_POST_FAILURE_SETTINGS_BAD); + } // if ( vPass ) // it needs more investigation initSettings(); } @@ -685,17 +701,29 @@ */ void ApplicationController::onLogIOFail() { - //DEBUG: qDebug()< GuiView : didPOSTPass(bool) } Index: sources/ApplicationController.h =================================================================== diff -u -rf1c4d7f7c9cd4422f6190a5b31c8f1e74e520c04 -r0eb3d05f90d7ed90eadfab6c0c1db76fa2a70fb6 --- sources/ApplicationController.h (.../ApplicationController.h) (revision f1c4d7f7c9cd4422f6190a5b31c8f1e74e520c04) +++ sources/ApplicationController.h (.../ApplicationController.h) (revision 0eb3d05f90d7ed90eadfab6c0c1db76fa2a70fb6) @@ -54,9 +54,9 @@ QThread *_thread = nullptr; bool _init = false; - bool _settingsReadComplete = false; - QFutureWatcher _settingsWatcher; + QFutureWatcher _settingsWatcher; + int _settingsError = 0; ApplicationPost _post; // I may need to be put in a concurrent. @@ -82,7 +82,7 @@ void createFakeSeqAtBeginLongMessage(QVariantList &vData, const int vFakeDataLen); void postDoneRequest(); - void versionsRequest(bool vPass); + void versionsRequest(); private slots: // Should be private for thread safety and is connected internally. void onActionReceive (GuiActionType vAction, const QVariantList &vData); // UI <= HD/DG @@ -116,14 +116,14 @@ void onPOSTBluetooth (bool vPass); void onPOSTCloudSync (bool vPass); - void onPOSTFail (Gui::GuiAlarmID vAlarmID); + void onPOSTFail (Gui::GuiAlarmID vAlarmID, bool vSend = false); void onPOSTDone (bool vPass); void onQuitApplication (); void onLogIOFail(); - void onTreatmentRangesIncorrect(); + void onTreatmentRangesDone(bool vPass); signals: void didPOSTEthernet (bool vPass); Index: sources/ApplicationPost.cpp =================================================================== diff -u -rf1c4d7f7c9cd4422f6190a5b31c8f1e74e520c04 -r0eb3d05f90d7ed90eadfab6c0c1db76fa2a70fb6 --- sources/ApplicationPost.cpp (.../ApplicationPost.cpp) (revision f1c4d7f7c9cd4422f6190a5b31c8f1e74e520c04) +++ sources/ApplicationPost.cpp (.../ApplicationPost.cpp) (revision 0eb3d05f90d7ed90eadfab6c0c1db76fa2a70fb6) @@ -50,7 +50,6 @@ _isEthernet = checkEthernet (); // this is not a Fault and not required the application to stop. No Alarm will be triggered. _isSound = checkSound (); // this is not a Fault and not required the application to stop. No Alarm will be triggered. _isYearCheck = checkYear (); - _isSettingsCRC = checkSettingsCRC (); // WARNING: // all of the checks have to be done, // although some are not failing the final result, @@ -67,8 +66,7 @@ isCloudSync () && // isEthernet () && // it is being executed to get the information but is not part of the POST failure. // isSound () && - isYearCheck () && - isSettingsCRCCheck() + isYearCheck () ; } else { @@ -270,16 +268,3 @@ emit didYearCheck(ok); return ok; } - -/*! - * \brief ApplicationPost::checkSettingsCRC - * \details Checks the Settings CRC - * \return true if check passed, otherwise false - */ -bool ApplicationPost::checkSettingsCRC() -{ - bool ok = _content.contains(_postmsg_settingscrc + _postmsg_postfix_passed); - if (! ok) emit didFail(Gui::GuiAlarmID::ALARM_ID_HD_UI_POST_FAILURE_SETTINGS_BAD); - emit didSettingsCRCCheck(ok); - return ok; -} Index: sources/ApplicationPost.h =================================================================== diff -u -rf1c4d7f7c9cd4422f6190a5b31c8f1e74e520c04 -r0eb3d05f90d7ed90eadfab6c0c1db76fa2a70fb6 --- sources/ApplicationPost.h (.../ApplicationPost.h) (revision f1c4d7f7c9cd4422f6190a5b31c8f1e74e520c04) +++ sources/ApplicationPost.h (.../ApplicationPost.h) (revision 0eb3d05f90d7ed90eadfab6c0c1db76fa2a70fb6) @@ -69,7 +69,6 @@ const QString _postmsg_bluetooth = "Bluetooth" ; // POSTMSG_BLUETOOTH="Bluetooth" const QString _postmsg_shasum = "App shasum" ; // POSTMSG_SHASUM="App shasum" const QString _postmsg_cloudsync = "CloudSync" ; // POSTMSG_CLOUDSYNC="CloudSync" - const QString _postmsg_settingscrc = "SettingsCRC" ; // POSTMSG_SETTINGSCRC="SettingsCRC" const quint8 _macAddrssLen = 17 ; // ff:ff:ff:ff:ff:ff const quint8 _macAppearLen = 200 ; // the mac address shall be found within the next 200 characters. @@ -98,7 +97,6 @@ bool _isEthernet = false ; // HIGH: : ALARM_ID_UI_POST_FAILURE_ETHERNET : this is not a Fault and not required the application to stop. bool _isSound = false ; // HIGH: : ALARM_ID_UI_POST_FAILURE_SOUND : this is not a Fault and not required the application to stop. bool _isYearCheck = false ; // HIGH: : ALARM_ID_HD_UI_POST_FAILURE_INVALID_YEAR - bool _isSettingsCRC = false ; // HIGH: fault: ALARM_ID_HD_UI_POST_FAILURE_SETTINGS_BAD bool _isDone = false ; @@ -114,7 +112,6 @@ bool checkEthernet (); bool checkSound (); bool checkYear (); - bool checkSettingsCRC (); public: bool isShaSum () const { return _isShaSum ; } @@ -130,7 +127,17 @@ bool isSound () const { return _isSound ; } bool isYearCheck () const { return _isYearCheck ; } bool isDone () const { return _isDone ; } - bool isSettingsCRCCheck () const { return _isSettingsCRC; } + /*! + * \brief isDone + * \details set the isDone private member with the given vDone and returns it. + * There are some items related to POST but are running outside of this class, + * like initSettings result, cryptsetup mount (which includes CRC too) + * \param vDone - a bool parameter to and with the current done result + * \return bool value of the _isDone private property + */ + bool isDone (bool vDone) { _isDone = _isDone && vDone; + return _isDone; + } QString macEthernet () const { return _macEthernet ; } QString macWireless () const { return _macWireless ; } @@ -153,7 +160,6 @@ void didEthernet (bool vPass); void didSound (bool vPass); void didYearCheck (bool vPass); - void didSettingsCRCCheck (bool vPass); void didFail(Gui::GuiAlarmID vAlarmID); void didDone(bool vPass); Index: sources/gui/GuiController.cpp =================================================================== diff -u -r4fd6a7d7801d91ffbce9e8d4b54900224f6a0fac -r0eb3d05f90d7ed90eadfab6c0c1db76fa2a70fb6 --- sources/gui/GuiController.cpp (.../GuiController.cpp) (revision 4fd6a7d7801d91ffbce9e8d4b54900224f6a0fac) +++ sources/gui/GuiController.cpp (.../GuiController.cpp) (revision 0eb3d05f90d7ed90eadfab6c0c1db76fa2a70fb6) @@ -392,10 +392,10 @@ } /*! - * \brief GuiController::doNotifyTreatmentRangeInvalid - * \details emit the didTreatmentRangesIncorrect signal to ask ApplicationController to emit alarm that settings are bad + * \brief GuiController::doTreatmentRangesDone + * \details emit the didTreatmentRangesDone signal to ask ApplicationController to emit alarm that settings are bad */ -void GuiController::doNotifyTreatmentRangeInvalid() +void GuiController::doTreatmentRangesDone(bool vPass) { - emit didTreatmentRangesIncorrect(); + emit didTreatmentRangesDone(vPass); } Index: sources/gui/GuiController.h =================================================================== diff -u -r4fd6a7d7801d91ffbce9e8d4b54900224f6a0fac -r0eb3d05f90d7ed90eadfab6c0c1db76fa2a70fb6 --- sources/gui/GuiController.h (.../GuiController.h) (revision 4fd6a7d7801d91ffbce9e8d4b54900224f6a0fac) +++ sources/gui/GuiController.h (.../GuiController.h) (revision 0eb3d05f90d7ed90eadfab6c0c1db76fa2a70fb6) @@ -75,7 +75,7 @@ void doExportService (const GuiStringIndexMap &vExportList); // UI => OS void doExportTreatment (const GuiStringIndexMap &vExportList); // UI => OS void doQuitApplication (); - void doNotifyTreatmentRangeInvalid(); + void doTreatmentRangesDone(bool vPass); private slots: // Should be private for thread safety and is connected internally. void onActionReceive (GuiActionType vAction, const QVariantList &vData); // UI <= HD/DG @@ -117,7 +117,7 @@ void didQuitApplication (); - void didTreatmentRangesIncorrect(); + void didTreatmentRangesDone(bool vPass); // Device controller signal slots connection DEVICE_GUI_BRIDGE_DEFINITION_LIST Index: sources/storage/Logger.h =================================================================== diff -u -r611bbf4dcba67768db87cf30f21fd2db788f677d -r0eb3d05f90d7ed90eadfab6c0c1db76fa2a70fb6 --- sources/storage/Logger.h (.../Logger.h) (revision 611bbf4dcba67768db87cf30f21fd2db788f677d) +++ sources/storage/Logger.h (.../Logger.h) (revision 0eb3d05f90d7ed90eadfab6c0c1db76fa2a70fb6) @@ -37,6 +37,7 @@ #define LOG_DEBUG(vCONTENT) emit Storage::Logger::I().didLog(vCONTENT, Storage::Logger::LogType::eLogDebug, true ) #define LOG_APPED_UI(vCONTENT) emit Storage::Logger::I().didLog(" ,UI," + vCONTENT, Storage::Logger::LogType::eLogAppED, true ) +#define LOG_APPED_PO(vCONTENT) emit Storage::Logger::I().didLog("POST,UI," + vCONTENT, Storage::Logger::LogType::eLogAppED, true ) // forward declarations class tst_logging; Index: sources/storage/Settings.cpp =================================================================== diff -u -r4fd6a7d7801d91ffbce9e8d4b54900224f6a0fac -r0eb3d05f90d7ed90eadfab6c0c1db76fa2a70fb6 --- sources/storage/Settings.cpp (.../Settings.cpp) (revision 4fd6a7d7801d91ffbce9e8d4b54900224f6a0fac) +++ sources/storage/Settings.cpp (.../Settings.cpp) (revision 0eb3d05f90d7ed90eadfab6c0c1db76fa2a70fb6) @@ -52,33 +52,36 @@ /*! * \brief Settings::doRead * \details Reads all the configuration files + * \return non-zero, error value on error, and zero on success. */ int Settings::read() { - int err = Settings::Settings_Error::eError_None; + int err = Settings::Settings_Error::eError_None; QStringList fileFilter = QStringList() << QString("*.%1").arg(_settingsExt); QFileInfoList settingFiles = FileHandler::find (Storage::Settings_Path(), fileFilter); QStringList settingFolders = FileHandler::subFolders(Storage::Settings_Path()); if ( ! settingFolders.count() ) { err = Settings::Settings_Error::eError_No_SettingsFolder; - LOG_DEBUG(errorMessage(err).arg(Storage::Settings_Path())); + LOG_APPED_PO(errorMessage(err).arg(Storage::Settings_Path())); return err; } for ( QString &settingFolder : settingFolders ) { QString folder = settingFolder.prepend(Storage::Settings_Path()); settingFiles += FileHandler::find(folder, fileFilter); } + // DEBUG: // settingFiles = // { // QFileInfo("/home/denali/Projects/application/resources/settings/Confirm/Confirm.conf"), // QFileInfo("/home/denali/Projects/application/resources/settings/Alarms/Alarms.conf") // }; + if ( ! settingFiles.count() ) { err = Settings::Settings_Error::eError_No_SettingsFile; - LOG_DEBUG(errorMessage(err).arg(Storage::Settings_Path())); + LOG_APPED_PO(errorMessage(err).arg(Storage::Settings_Path())); return err; } @@ -88,13 +91,20 @@ QFile file(settingFile.absoluteFilePath()); if (! file.open(QIODevice::ReadOnly | QIODevice::Text)) { - err = Settings::Settings_Error::eError_ConfigFileReadFail; - LOG_DEBUG(errorMessage(err).arg(Storage::Settings_Path())); + err = Settings::Settings_Error::eError_Read; + LOG_APPED_PO(errorMessage(err).arg(Storage::Settings_Path())); return err; } + Detail detail; detail.content = file.readAll().trimmed(); - if (detail.content.isEmpty()) continue; + if (detail.content.isEmpty()) { + //TODO Do not error out for now, the list of the config files which can be empty or not needs to be defined. + // err = Settings::Settings_Error::eError_Empty; + LOG_APPED_PO(errorMessage(Settings::Settings_Error::eError_Empty).arg(settingFile.fileName())); + continue; + } + detail.location = settingFile.absolutePath() + "/"; detail.category = QString(detail.location + settingFile.baseName()).remove(Storage::Settings_Path()); details += detail; @@ -128,7 +138,7 @@ else if ( line == attribute.arg(_duplicate_key_off ) ) { enableDuplicateKey = false ;} else { - LOG_APPED_UI(( "Unknown '" + line + "' attribute in %1").arg(detail.category)); + LOG_APPED_PO(( "Unknown '" + line + "' attribute in %1").arg(detail.category)); } } Index: sources/storage/Settings.h =================================================================== diff -u -rf1c4d7f7c9cd4422f6190a5b31c8f1e74e520c04 -r0eb3d05f90d7ed90eadfab6c0c1db76fa2a70fb6 --- sources/storage/Settings.h (.../Settings.h) (revision f1c4d7f7c9cd4422f6190a5b31c8f1e74e520c04) +++ sources/storage/Settings.h (.../Settings.h) (revision 0eb3d05f90d7ed90eadfab6c0c1db76fa2a70fb6) @@ -55,18 +55,18 @@ // { Class SettingsError public: enum Settings_Error { - eError_None , + eError_None = 0 , // always has to be 0 eError_POST , eError_PathEmpty , eError_MkDir , eError_Write , + eError_Read , + eError_Empty , eError_Copy , eError_Remove , eError_No_SettingsFolder , eError_No_SettingsFile , eError_SettingNotExists , - eError_ConfigFileReadFail , - eError_ConfigFileEmpty }; private: const QHash settingsError_Message { // no translation for the error. My experience shows the error messages if translated is not useful for serviceability and debugging. @@ -75,6 +75,8 @@ { eError_PathEmpty , "The settings path is empty." }, { eError_MkDir , "The configuration folder '%1' cannot be created." }, { eError_Write , "The settings file %1 can't be written." }, + { eError_Read , "The settings file %1 can't be read." }, + { eError_Empty , "The settings file %1 is empty." }, { eError_Copy , "The configuration folder '%1' cannot be copied." }, { eError_Remove , "The configuration folder '%1' cannot be removed." }, { eError_No_SettingsFolder , "No settings folder in the %1 path found." }, Index: sources/view/hd/data/VTreatmentRanges.cpp =================================================================== diff -u -r4fd6a7d7801d91ffbce9e8d4b54900224f6a0fac -r0eb3d05f90d7ed90eadfab6c0c1db76fa2a70fb6 --- sources/view/hd/data/VTreatmentRanges.cpp (.../VTreatmentRanges.cpp) (revision 4fd6a7d7801d91ffbce9e8d4b54900224f6a0fac) +++ sources/view/hd/data/VTreatmentRanges.cpp (.../VTreatmentRanges.cpp) (revision 0eb3d05f90d7ed90eadfab6c0c1db76fa2a70fb6) @@ -30,8 +30,8 @@ // Connection to the GuiController made here // It should be defined in the class which wants to connect to signal. // VTreatmentRanges -> GUIController -> ApplicationController to handle - connect(this , SIGNAL( didTreatmentRangesIncorrect()), - &_GuiController, SLOT(doNotifyTreatmentRangeInvalid())); + connect(this , SIGNAL(didTreatmentRangesDone(bool)), + &_GuiController, SLOT( doTreatmentRangesDone(bool))); } @@ -143,7 +143,5 @@ // FROMVARIANT_WITHRETURN ( rinsebackFlowRateRes , "Rinseback Flow Rate Ranges" , "Rinseback_Flow_Rate_Res" , UInt , isConfigsOk ); FROMVARIANT_WITHRETURN ( rinsebackFlowRateDef , "Rinseback Flow Rate Ranges" , "Rinseback_Flow_Rate_Def" , UInt , isConfigsOk ); - if(!isConfigsOk) { - emit didTreatmentRangesIncorrect(); - } + emit didTreatmentRangesDone( isConfigsOk ); } Index: sources/view/hd/data/VTreatmentRanges.h =================================================================== diff -u -rf1c4d7f7c9cd4422f6190a5b31c8f1e74e520c04 -r0eb3d05f90d7ed90eadfab6c0c1db76fa2a70fb6 --- sources/view/hd/data/VTreatmentRanges.h (.../VTreatmentRanges.h) (revision f1c4d7f7c9cd4422f6190a5b31c8f1e74e520c04) +++ sources/view/hd/data/VTreatmentRanges.h (.../VTreatmentRanges.h) (revision 0eb3d05f90d7ed90eadfab6c0c1db76fa2a70fb6) @@ -74,6 +74,6 @@ VIEW_DEC_SLOT(SettingsData ) signals: - void didTreatmentRangesIncorrect(); + void didTreatmentRangesDone(bool vPass); }; } Index: sources/view/settings/VAdjustmentAlarmVolume.cpp =================================================================== diff -u -r80b5e8f1ebb90c03c37d90d90cd2da3bd95d6803 -r0eb3d05f90d7ed90eadfab6c0c1db76fa2a70fb6 --- sources/view/settings/VAdjustmentAlarmVolume.cpp (.../VAdjustmentAlarmVolume.cpp) (revision 80b5e8f1ebb90c03c37d90d90cd2da3bd95d6803) +++ sources/view/settings/VAdjustmentAlarmVolume.cpp (.../VAdjustmentAlarmVolume.cpp) (revision 0eb3d05f90d7ed90eadfab6c0c1db76fa2a70fb6) @@ -27,6 +27,11 @@ ADJUST_VIEW_CONNECTION(AdjustHDAlarmVolumeRequestData ); ACTION_VIEW_CONNECTION(AdjustHDAlarmVolumeResponseData ); ACTION_VIEW_CONNECTION(SettingsData) + + connect(&_GuiController, &GuiController::didPOSTPass, this, [=](bool) { + //POST// + doAdjustment(_hdAlarmVolume); + }); } void View::VAdjustmentAlarmVolume::onActionReceive(const AdjustHDAlarmVolumeResponseData &vData) @@ -73,6 +78,4 @@ { QString mCategory = Storage::Settings_Category_SettingsSystem; FROMVARIANT( hdAlarmVolume, "Alarm", "Volume", UInt ); - //POST// - doAdjustment(_hdAlarmVolume); } Index: sources/view/settings/VAdjustmentAlarmVolume.h =================================================================== diff -u -r80b5e8f1ebb90c03c37d90d90cd2da3bd95d6803 -r0eb3d05f90d7ed90eadfab6c0c1db76fa2a70fb6 --- sources/view/settings/VAdjustmentAlarmVolume.h (.../VAdjustmentAlarmVolume.h) (revision 80b5e8f1ebb90c03c37d90d90cd2da3bd95d6803) +++ sources/view/settings/VAdjustmentAlarmVolume.h (.../VAdjustmentAlarmVolume.h) (revision 0eb3d05f90d7ed90eadfab6c0c1db76fa2a70fb6) @@ -48,7 +48,7 @@ // disabled coco end // HD AlarmVolume data - PROPERTY( quint8 , hdAlarmVolume , 0) + PROPERTY( quint8 , hdAlarmVolume , 5) //TODO Needs to get maxVolume from MAdjustHDAlarmVolumeReq PROPERTY( QString , status , "") VIEW_DEC_CLASS(VAdjustmentAlarmVolume) Index: sources/view/settings/VDuetRoWaterDG.cpp =================================================================== diff -u -r80b5e8f1ebb90c03c37d90d90cd2da3bd95d6803 -r0eb3d05f90d7ed90eadfab6c0c1db76fa2a70fb6 --- sources/view/settings/VDuetRoWaterDG.cpp (.../VDuetRoWaterDG.cpp) (revision 80b5e8f1ebb90c03c37d90d90cd2da3bd95d6803) +++ sources/view/settings/VDuetRoWaterDG.cpp (.../VDuetRoWaterDG.cpp) (revision 0eb3d05f90d7ed90eadfab6c0c1db76fa2a70fb6) @@ -28,6 +28,12 @@ ACTION_VIEW_CONNECTION(DuetRoWaterModeDGrData) ACTION_VIEW_CONNECTION(SettingsData) ACTION_VIEW_CONNECTION(DuetRoWaterStatDGqData) + + connect(&_GuiController, &GuiController::didPOSTPass, this, [=](bool) { + //POST// + doAdjustment(_status); + }); + } void View::VDuetRoWaterDG::onActionReceive(const DuetRoWaterStatDGqData & ) // 0xC300 : 195 @@ -78,6 +84,4 @@ _post = true; QString mCategory = Storage::Settings_Category_SettingsSystem; FROMVARIANT( status, "RoWaterMode", "RoWaterMode", UInt ); - //POST// - doAdjustment(_status); }