Index: en_US.udic =================================================================== diff -u -re60d099fd4fbada632a974b9fc95d4d2c9652b1a -re2dc7bd9995a3bb410aa472a1f95c1cc9ba3136d --- en_US.udic (.../en_US.udic) (revision e60d099fd4fbada632a974b9fc95d4d2c9652b1a) +++ en_US.udic (.../en_US.udic) (revision e2dc7bd9995a3bb410aa472a1f95c1cc9ba3136d) @@ -197,3 +197,4 @@ vfat Unmounts bluetooth +vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv Index: sources/canbus/MessageAcknowModel.cpp =================================================================== diff -u -rc4bd7072571428744e11dd24d5da1d1a3e1d1686 -re2dc7bd9995a3bb410aa472a1f95c1cc9ba3136d --- sources/canbus/MessageAcknowModel.cpp (.../MessageAcknowModel.cpp) (revision c4bd7072571428744e11dd24d5da1d1a3e1d1686) +++ sources/canbus/MessageAcknowModel.cpp (.../MessageAcknowModel.cpp) (revision e2dc7bd9995a3bb410aa472a1f95c1cc9ba3136d) @@ -71,9 +71,9 @@ */ void MessageAcknowModel::quit() { + qDeleteAll(_acknowList); // coco begin validated: Application termination is not correctly done in coco!!! // it has been tested and works perfectly fine in normal run. - qDeleteAll(_acknowList); quitThread(); // validated } // coco end Index: sources/cloudsync/CloudSyncController.cpp =================================================================== diff -u -re5a37f31483318be0eaa5506e13f285e81f2f8d2 -re2dc7bd9995a3bb410aa472a1f95c1cc9ba3136d --- sources/cloudsync/CloudSyncController.cpp (.../CloudSyncController.cpp) (revision e5a37f31483318be0eaa5506e13f285e81f2f8d2) +++ sources/cloudsync/CloudSyncController.cpp (.../CloudSyncController.cpp) (revision e2dc7bd9995a3bb410aa472a1f95c1cc9ba3136d) @@ -33,7 +33,7 @@ */ CloudSyncController::CloudSyncController(QObject *parent) : QObject(parent) { checkDate(); - sendOutBuff("Ready"); + sendUIBuff("Ready"); startTimer(_interval); } @@ -155,12 +155,12 @@ } /*! - * \brief CloudSyncController::addWatch - * \details + * \brief CloudSyncController::addCSBuffWatch + * \details Adds a watcher on the CloudSync Application output file. + * \sa _out_File */ -void CloudSyncController::addWatch() +void CloudSyncController::addCSBuffWatch() { - // QString outBuff; bool ok = Storage::FileHandler::makeFolder(_location); if ( ok ) { _date_out_File = _location + // The location @@ -200,11 +200,18 @@ if (_dateFormatted != dateFormatted) { _dateFormatted = dateFormatted; // TODO: do we need to remove current watch? - addWatch(); + addCSBuffWatch(); } } -bool CloudSyncController::sendOutBuff(const QString &vData) +/*! + * \brief CloudSyncController::sendUIBuff + * \details Sends the UI Buffer to the UI input file. + * \param vData - the data to be sent out. + * \return true on successful writing to the file buffer. + * \sa _inp_File + */ +bool CloudSyncController::sendUIBuff(const QString &vData) { QString inpBuff; _date_inp_File = _location + // The location @@ -231,7 +238,7 @@ */ void CloudSyncController::onActionReceive(GuiActionType vAction, const QVariantList &vData) { - QString inpBuff; + QString inpBuff; switch (vAction) { case GuiActionType::ID_HDOperationModeData: case GuiActionType::ID_PreTreatmentStates : @@ -244,7 +251,7 @@ inpBuff = Format::toHexString/*QString::number*//*enumString*/(vAction); for (auto var : vData) { inpBuff += _separator + var.toString(); } - if ( ! sendOutBuff(inpBuff) ) break; + if ( ! sendUIBuff(inpBuff) ) break; default: break; } Index: sources/cloudsync/CloudSyncController.h =================================================================== diff -u -re60d099fd4fbada632a974b9fc95d4d2c9652b1a -re2dc7bd9995a3bb410aa472a1f95c1cc9ba3136d --- sources/cloudsync/CloudSyncController.h (.../CloudSyncController.h) (revision e60d099fd4fbada632a974b9fc95d4d2c9652b1a) +++ sources/cloudsync/CloudSyncController.h (.../CloudSyncController.h) (revision e2dc7bd9995a3bb410aa472a1f95c1cc9ba3136d) @@ -87,7 +87,7 @@ void quitThread(); void checkDate(); - void addWatch(); + void addCSBuffWatch(); bool interpreter(const QString &vContent); // this function may later need to be a class. - bool sendOutBuff(const QString &vData); + bool sendUIBuff (const QString &vData); }; Index: sources/device/DeviceController.h =================================================================== diff -u -rb7c9de054c6b7a1ca4bac9fbb0ec5d4ac06620a9 -re2dc7bd9995a3bb410aa472a1f95c1cc9ba3136d --- sources/device/DeviceController.h (.../DeviceController.h) (revision b7c9de054c6b7a1ca4bac9fbb0ec5d4ac06620a9) +++ sources/device/DeviceController.h (.../DeviceController.h) (revision e2dc7bd9995a3bb410aa472a1f95c1cc9ba3136d) @@ -18,7 +18,6 @@ #include #include #include -#include // Project #include "main.h" // Doxygen : do not remove Index: sources/device/DeviceGlobals.h =================================================================== diff -u -rb7c9de054c6b7a1ca4bac9fbb0ec5d4ac06620a9 -re2dc7bd9995a3bb410aa472a1f95c1cc9ba3136d --- sources/device/DeviceGlobals.h (.../DeviceGlobals.h) (revision b7c9de054c6b7a1ca4bac9fbb0ec5d4ac06620a9) +++ sources/device/DeviceGlobals.h (.../DeviceGlobals.h) (revision e2dc7bd9995a3bb410aa472a1f95c1cc9ba3136d) @@ -55,14 +55,31 @@ } \ } \ public Q_SLOTS : \ + /*! \ + * \brief VDevice::doInit \ + * \details the slot to be called to initialize the attribute. }\ + */ \ void doInit##vATTRIBUTEFLC ( ); \ Q_SIGNALS: /*! the signals for property bindings(Changed) and communications */ \ void vATTRIBUTE##Changed (const vTYPE & v##vATTRIBUTE ); \ - private : /*! the function is called once the property is set in qml as request */ \ + private : \ + /*! \ + * \brief VDevice::bluetoothPairedResetRequest \ + * \details The slot which will be called in case \ + * the attribute value has been updated in the QML. \ + * The updated value is wrapped in the corresponding model \ + * and will be used to call the assigned script eventually. \ + */ \ void vATTRIBUTE##Request (const vTYPE & v##vATTRIBUTE ); \ Q_SIGNALS : \ void didAttributeRequest (const Device##vATTRIBUTEFLC##RequestData &vData ); \ private Q_SLOTS : \ + /*! \ + * \brief VDevice::onAttributeResponse \ + * \details The slot which will be called in case the updated value for the attribute\ + * has been receive by the output of designated script. \ + * \param vData - the data model containing the values. \ + */ \ void onAttributeResponse(const Device##vATTRIBUTEFLC##ResponseData &vData ); \ private : @@ -76,8 +93,21 @@ Model::MDevice##vATTRIBUTEFLC##Response _device##vATTRIBUTEFLC##Response; \ Model::MDevice##vATTRIBUTEFLC##Request _device##vATTRIBUTEFLC##Request ; \ Q_SIGNALS : void didAttributeResponse (const Device##vATTRIBUTEFLC##ResponseData &); \ - private Q_SLOTS : void onAttributeRequest (const Device##vATTRIBUTEFLC##RequestData &vData); \ - private Q_SLOTS : void onProcess##vATTRIBUTEFLC##ExitCode(int vExitCode, QProcess::ExitStatus vStatus); \ + private Q_SLOTS : \ + /*! \ + * \brief DeviceController::onAttributeRequest \ + * \details This slot will be called in case the attribute is updated in the QML, \ + * to start the corresponding process and call the script assigned to it. \ + */ \ + void onAttributeRequest (const Device##vATTRIBUTEFLC##RequestData &vData); \ + /*! \ + * \brief DeviceController::onProcessExitCode \ + * \details The slot which is being called once the started process is returning a value \ + * as an exit code, probably from within the called script \ + * \param vExitCode - the returned exit code \ + * \param vStatus - the status of the process \ + */ \ + void onProcess##vATTRIBUTEFLC##ExitCode(int vExitCode, QProcess::ExitStatus vStatus); \ private : #define DEVICE_DEV_INIT_CONNECTIONS( vATTRIBUTEFLC ) \ Index: sources/device/DeviceView.cpp =================================================================== diff -u -r2b90169339a65399c03c31d1a40adffee87e7719 -re2dc7bd9995a3bb410aa472a1f95c1cc9ba3136d --- sources/device/DeviceView.cpp (.../DeviceView.cpp) (revision 2b90169339a65399c03c31d1a40adffee87e7719) +++ sources/device/DeviceView.cpp (.../DeviceView.cpp) (revision e2dc7bd9995a3bb410aa472a1f95c1cc9ba3136d) @@ -75,8 +75,10 @@ response(true); } - +// -------------------------------- // developer implementation section +// -------------------------------- + void VDevice::doInitBluetoothPairedReset() { // DEBUG : qDebug() << "HERE Init"; Index: sources/gui/qml/pages/MainHome.qml =================================================================== diff -u -raa873f8620e3f402bf60827e9c54623b5e09280e -re2dc7bd9995a3bb410aa472a1f95c1cc9ba3136d --- sources/gui/qml/pages/MainHome.qml (.../MainHome.qml) (revision aa873f8620e3f402bf60827e9c54623b5e09280e) +++ sources/gui/qml/pages/MainHome.qml (.../MainHome.qml) (revision e2dc7bd9995a3bb410aa472a1f95c1cc9ba3136d) @@ -46,7 +46,7 @@ width: parent.width text : vDateTime.greeting } - // Removed for phase 1 + // TODO: Removed for phase 1 // TouchRect { id : _startTreatmentRect // anchors.horizontalCenter: parent.horizontalCenter // text.text: qsTr("START TREATMENT") Index: sources/view/hd/data/posttreatment/VPostTreatmentStatesData.cpp =================================================================== diff -u -raa873f8620e3f402bf60827e9c54623b5e09280e -re2dc7bd9995a3bb410aa472a1f95c1cc9ba3136d --- sources/view/hd/data/posttreatment/VPostTreatmentStatesData.cpp (.../VPostTreatmentStatesData.cpp) (revision aa873f8620e3f402bf60827e9c54623b5e09280e) +++ sources/view/hd/data/posttreatment/VPostTreatmentStatesData.cpp (.../VPostTreatmentStatesData.cpp) (revision e2dc7bd9995a3bb410aa472a1f95c1cc9ba3136d) @@ -32,7 +32,10 @@ drainReservoirs ( vData.mSubMode == GuiPostTreatmentStates::HD_POST_TREATMENT_DRAIN_RESERVOIRS_STATE ); verify ( vData.mSubMode == GuiPostTreatmentStates::HD_POST_TREATMENT_VERIFY_STATE ); - // *** Only for test *** + // DEBUG: *** Only for test *** // Be careful it is always triggered on each message. + // It should only be used temporarily for debugging and shall be removed immediately after the test, + // since it is a TRIGGER will always be called regardless of state value change + // and will force whatever code attached to it to be called. state(true); } Index: sources/view/settings/VDateTime.cpp =================================================================== diff -u -raa873f8620e3f402bf60827e9c54623b5e09280e -re2dc7bd9995a3bb410aa472a1f95c1cc9ba3136d --- sources/view/settings/VDateTime.cpp (.../VDateTime.cpp) (revision aa873f8620e3f402bf60827e9c54623b5e09280e) +++ sources/view/settings/VDateTime.cpp (.../VDateTime.cpp) (revision e2dc7bd9995a3bb410aa472a1f95c1cc9ba3136d) @@ -218,18 +218,16 @@ ); } +/*! + * \brief VDateTime::greeting + * \details sets the greeting property string to be used on the standby/home screen regarding the device's current time of the day. + * \param vMilitaryTime + */ void VDateTime::greeting(quint16 vMilitaryTime) { - if ( 0500 <= vMilitaryTime && vMilitaryTime < 1200 ) { - greeting(tr("Good Morning")); - return; - } + if ( eMorningMin <= vMilitaryTime && vMilitaryTime < eMorningMax ) { greeting(tr("Good Morning" )); return; } + if ( eAfternoonMin <= vMilitaryTime && vMilitaryTime < eAfternoonMax ) { greeting(tr("Good Afternoon")); return; } - if ( 1200 <= vMilitaryTime && vMilitaryTime < 1800 ) { - greeting(tr("Good Afternoon")); - return; - } - greeting(tr("Good Evening")); } Index: sources/view/settings/VDateTime.h =================================================================== diff -u -raa873f8620e3f402bf60827e9c54623b5e09280e -re2dc7bd9995a3bb410aa472a1f95c1cc9ba3136d --- sources/view/settings/VDateTime.h (.../VDateTime.h) (revision aa873f8620e3f402bf60827e9c54623b5e09280e) +++ sources/view/settings/VDateTime.h (.../VDateTime.h) (revision e2dc7bd9995a3bb410aa472a1f95c1cc9ba3136d) @@ -50,6 +50,14 @@ }; Q_ENUM(DateTimeSetStatus) + enum GreetingRanges { + eMorningMin = 0500, // 05:00 AM + eMorningMax = 1200, // 12:00 PM + + eAfternoonMin = 1200, // 12:00 PM + eAfternoonMax = 1800, // 18:00 PM + }; + protected: void timerEvent(QTimerEvent *event) override;