Index: sources/ApplicationPost.cpp =================================================================== diff -u -rf2db5c985e5c0ae7835a69eff43bfc537e6dd2fc -r492cca08a567e5421968f50118f4d0488ddf2006 --- sources/ApplicationPost.cpp (.../ApplicationPost.cpp) (revision f2db5c985e5c0ae7835a69eff43bfc537e6dd2fc) +++ sources/ApplicationPost.cpp (.../ApplicationPost.cpp) (revision 492cca08a567e5421968f50118f4d0488ddf2006) @@ -36,40 +36,38 @@ */ void ApplicationPost::start() { - // QString postLogFileName = qApp->applicationDirPath() + "/" + Storage::POST_LOG; + QString postLogFileName = qApp->applicationDirPath() + "/" + Storage::POST_LOG; _isDone = true; - emit didDone(_isDone); - return; - // if (Storage::FileHandler::read(postLogFileName, _content)) { - // _isShaSum = checkShaSum (); // This is a fault. Will always return true for now. Alarm will be triggered to notify user in Active Alarm List. There is a comment in the class definition about some ideas later. - // _isCANBus = checkCANBus (); - // _isDisplay = checkDisplay (); - // _isTouch = checkTouch (); - // _isSDCard = checkSDCard (); - // _isRtc = checkRtc (); - // _isWiFi = checkWiFi (); // is not mandatory and the device can still be used without it. Alarm will be triggered to notify user in Active Alarm List. - // _isBluetooth = checkBluetooth (); // is not mandatory and the device can still be used without it. Alarm will be triggered to notify user in Active Alarm List. - // _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. - // // WARNING: - // // all of the checks have to be done, - // // although some are not failing the final result, - // // so they need to be assigned to a variable and then, AND(&&) them, - // // otherwise on the first fail rest of the checks will not run by compiler optimization. - // _isDone = _isShaSum && - // _isCANBus && - // _isDisplay && - // _isTouch && - // _isSDCard && - // _isRtc ; - // } - // else { - // // TODO: Ignored for now but this could be a FileSystem check failure, and the post.log has to always exist. - // // _done = false; - // LOG_EVENT(tr("The POST log file could not be read.")); - // } - // emit didDone(_isDone); + if (Storage::FileHandler::read(postLogFileName, _content)) { + _isShaSum = checkShaSum (); // This is a fault. Will always return true for now. Alarm will be triggered to notify user in Active Alarm List. There is a comment in the class definition about some ideas later. + _isCANBus = checkCANBus (); + _isDisplay = checkDisplay (); + _isTouch = checkTouch (); + _isSDCard = checkSDCard (); + _isRtc = checkRtc (); + _isWiFi = checkWiFi (); // is not mandatory and the device can still be used without it. Alarm will be triggered to notify user in Active Alarm List. + _isBluetooth = checkBluetooth (); // is not mandatory and the device can still be used without it. Alarm will be triggered to notify user in Active Alarm List. + _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. + // WARNING: + // all of the checks have to be done, + // although some are not failing the final result, + // so they need to be assigned to a variable and then, AND(&&) them, + // otherwise on the first fail rest of the checks will not run by compiler optimization. + _isDone = _isShaSum && + _isCANBus && + _isDisplay && + _isTouch && + _isSDCard && + _isRtc ; + } + else { + // TODO: Ignored for now but this could be a FileSystem check failure, and the post.log has to always exist. + // _done = false; + LOG_EVENT(tr("The POST log file could not be read.")); + } + emit didDone(_isDone); } /*! @@ -119,7 +117,7 @@ */ bool ApplicationPost::checkTouch() { - bool ok = true; // _content.contains(_postmsg_touch); + bool ok = _content.contains(_postmsg_touch); if (! ok) emit didFail(Gui::GuiAlarmID::ALARM_ID_UI_POST_FAILURE_TOUCH); emit didTouch(ok); return ok;