Index: sources/ApplicationController.cpp =================================================================== diff -u -rc70ae33e19c08779ce89e2f1728f2d1af7b5c100 -r99cf0dc3002c0395f0d10d1d4fb34e2052449fd6 --- sources/ApplicationController.cpp (.../ApplicationController.cpp) (revision c70ae33e19c08779ce89e2f1728f2d1af7b5c100) +++ sources/ApplicationController.cpp (.../ApplicationController.cpp) (revision 99cf0dc3002c0395f0d10d1d4fb34e2052449fd6) @@ -373,24 +373,28 @@ { // DEBUG: return; #ifndef DISABLE_KEEP_ALIVE - QVariantList mData; - int mFakeDataLen = gFakeData.length(); - // coco begin validated: This is a fake data generator for CANBus missing/swapped frames Testing - // will never be executed on the product - // has been tested manually - if (mFakeDataLen) { - if (gFakeSeqAtBegin) { - createFakeSeqAtBeginLongMessage(mData, mFakeDataLen); + // Update can disable this message from being sent and + // the queueing up a possible response expectation. + if (_keepAlive) { + QVariantList mData; + int mFakeDataLen = gFakeData.length(); + // coco begin validated: This is a fake data generator for CANBus missing/swapped frames Testing + // will never be executed on the product + // has been tested manually + if (mFakeDataLen) { + if (gFakeSeqAtBegin) { + createFakeSeqAtBeginLongMessage(mData, mFakeDataLen); + } + else { + createFakeSequencedLongMessage (mData, mFakeDataLen); + } } + // disabled coco end else { - createFakeSequencedLongMessage (mData, mFakeDataLen); + mData += static_cast(GuiActionData::NoData); } + onActionTransmit(GuiActionType::ID_KeepAlive, mData); } - // disabled coco end - else { - mData += static_cast(GuiActionData::NoData); - } - onActionTransmit(GuiActionType::ID_KeepAlive, mData); #endif } @@ -526,6 +530,24 @@ */ void ApplicationController::initSettings() { + // this emit guaranties that the slot will be called in the application thread + // also the signal is private so it will be used internally only. + emit didSettingsInit({}); +} + +void ApplicationController::enableKeepAlive(bool vTurnOn) { + _keepAlive = vTurnOn; +} + + +/*! + * \brief ApplicationController::onSettingsInit + * \details The slot which will be called to start the settings initialization in Application thread. + * This method also initializes the Settings model singleton object to let it live in the Application thread. + * To start the setting initialization QConcurrent is used with QFuture to signal the Application when it's done. + */ +/*void ApplicationController::onSettingsInit() +{ // That is enough to call to the I function here to create the object in the thread that Settings is leaving in, // which currently is Application_Thread, since the Settings is created in that thread. _Settings; @@ -537,7 +559,7 @@ }); _settingsWatcher.setFuture(mFuture); } - +*/ /*! * \brief onSettingsUpdate * \details when the Settings reads the .conf files and fills the MSettings emits this finished signal @@ -669,17 +691,35 @@ * \brief ApplicationController::onPOSTDone * \details Sends the POST Final message */ -void ApplicationController::onPOSTDone(bool /*vPass*/) { - LOG_DEBUG("ApplicationPOST Done"); +//<<<<<<< HEAD +//void ApplicationController::onPOSTDone(bool /*vPass*/) { +// LOG_DEBUG("ApplicationPOST Done"); /// in manufacturing or update mode the configurations must reside in /root/home /// therefore the settings can be initialized after POST. +//#ifdef BUILD_FOR_DESKTOP +// initSettings(); +//#else +// if ( gEnableManufacturing || gEnableUpdating ) initSettings(); +//#endif +//} +//======= +void ApplicationController::onPOSTDone(bool vPass) { + emit didPOSTDone(vPass); // Used by Update SW. + AdjustUIPostFinalResultRequestData data; + data.mResult = vPass; + emit didAdjustment(data); + LOG_DEBUG("ApplicationPost Done"); + + /// in manufacturing or update mode the configurations must reside in /root/home + /// therefore the settings can be initialized after POST. #ifdef BUILD_FOR_DESKTOP initSettings(); #else if ( gEnableManufacturing || gEnableUpdating ) initSettings(); #endif } +//>>>>>>> DEN-sunrise-prb void ApplicationController::onQuitApplication() {