Index: scripts/date_time_set.sh =================================================================== diff -u -r079aae9751fe0d234adaa470bc7d23980d5e7692 -rd1a6830c486a9ee9c388a80b570aa8141a8366c9 --- scripts/date_time_set.sh (.../date_time_set.sh) (revision 079aae9751fe0d234adaa470bc7d23980d5e7692) +++ scripts/date_time_set.sh (.../date_time_set.sh) (revision d1a6830c486a9ee9c388a80b570aa8141a8366c9) @@ -1,11 +1,12 @@ #!/bin/sh -# hardcode PST -rm -f /etc/localtime -ln -s /usr/share/zoneinfo/America/Los_Angeles /etc/localtime +if [ $# -eq 0 ]; then + currentFile=$(basename "$0") + echo "Usage: ./$currentFile 'yyyy-mm-dd HH:MM:SS'" + exit 0 +fi -timedatectl set-time $1 +date -s "$1" # set the hwclock from the system time -hwclock -w - +hwclock -w \ No newline at end of file Index: scripts/setup.sh =================================================================== diff -u -r56e378f7504701b9e9a9dccaf205aef2fd52c58e -rd1a6830c486a9ee9c388a80b570aa8141a8366c9 --- scripts/setup.sh (.../setup.sh) (revision 56e378f7504701b9e9a9dccaf205aef2fd52c58e) +++ scripts/setup.sh (.../setup.sh) (revision d1a6830c486a9ee9c388a80b570aa8141a8366c9) @@ -25,8 +25,13 @@ if [ $? -eq 0 ]; then break fi + done +echo "Setup the timezone (PST)" +rm -f /etc/localtime +ln -s /usr/share/zoneinfo/America/Los_Angeles /etc/localtime + echo "Setup the hardware clock" hwclock -w Index: sources/gui/qml/globals/Variables.qml =================================================================== diff -u -r632f698e13711e6544a28c7a72d276d2bf5f000e -rd1a6830c486a9ee9c388a80b570aa8141a8366c9 --- sources/gui/qml/globals/Variables.qml (.../Variables.qml) (revision 632f698e13711e6544a28c7a72d276d2bf5f000e) +++ sources/gui/qml/globals/Variables.qml (.../Variables.qml) (revision d1a6830c486a9ee9c388a80b570aa8141a8366c9) @@ -1,16 +1,16 @@ /*! - * + * * Copyright (c) 2019-2020 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 Variables.qml * \author (last) Peter Lucia * \date (last) 06-Oct-2020 * \author (original) Behrouz NematiPour * \date (original) 09-Oct-2019 - * + * */ // Qt @@ -88,7 +88,7 @@ readonly property int sliderCircleDiameter : 25 readonly property int pressuresProgressbarWidth : 725 - + readonly property int gridSelectionButtonHeight : 100 readonly property int gridSelectionButtonWidth : 375 @@ -115,21 +115,27 @@ readonly property int settingsArrowHeight : 30 readonly property int settingsArrowWidth : 24 + readonly property int settingsButtonWidth : 300 + readonly property int settingsButtonHeight : 85 + readonly property int settingsMargin : 75 + readonly property int settingsSpacing : 20 + readonly property int settingsInputWidth : 225 + readonly property int settingsNotificationMargin : 10 readonly property int settingsBLEListViewWidth : 360 readonly property int settingsBLEItemRightMargin : 20 - readonly property int settingsBLEButtonWidth : 300 - readonly property int settingsBLEButtonHeight : 85 - readonly property int settingsBLEMargin : 75 + readonly property int settingsBLEButtonWidth : settingsButtonWidth + readonly property int settingsBLEButtonHeight : settingsButtonHeight + readonly property int settingsBLEMargin : settingsMargin readonly property int settingsBLEListViewMargin : 25 readonly property int settingsOptionWidth : 550 readonly property int settingsOptionHeight : 50 - readonly property int settingsWIFIButtonWidth : settingsBLEButtonWidth - readonly property int settingsWIFIButtonHeight : settingsBLEButtonHeight - readonly property int settingsWIFIMargin : settingsBLEMargin - readonly property int settingsWIFIInputWidth : 225 - readonly property int settingsWIFISpacing : 20 + readonly property int settingsWIFIButtonWidth : settingsButtonWidth + readonly property int settingsWIFIButtonHeight : settingsButtonHeight + readonly property int settingsWIFIMargin : settingsMargin + readonly property int settingsWIFIInputWidth : settingsInputWidth + readonly property int settingsWIFISpacing : settingsSpacing readonly property int settingsWIFINetworkHeight : 85 readonly property int settingsWIFINetworkWidth : 375 readonly property int settingsWIFINetworksWidth : settingsWIFINetworkWidth + 50 @@ -144,9 +150,9 @@ readonly property int textInputHeight : 50 readonly property int textInputLineWidth : 100 - readonly property int settingsDateTimeSetMargin : settingsWIFIMargin - readonly property int settingsDateTimeSetSpacing : settingsWIFISpacing - readonly property int settingsDateTimeSetInputWidth : settingsWIFIInputWidth + readonly property int settingsDateTimeSetMargin : settingsMargin + readonly property int settingsDateTimeSetSpacing : settingsSpacing + readonly property int settingsDateTimeSetInputWidth : settingsInputWidth // ---------- < PRS > Related Section ---------- // Min/Max Index: sources/gui/qml/pages/SettingsDateTimeSet.qml =================================================================== diff -u -r079aae9751fe0d234adaa470bc7d23980d5e7692 -rd1a6830c486a9ee9c388a80b570aa8141a8366c9 --- sources/gui/qml/pages/SettingsDateTimeSet.qml (.../SettingsDateTimeSet.qml) (revision 079aae9751fe0d234adaa470bc7d23980d5e7692) +++ sources/gui/qml/pages/SettingsDateTimeSet.qml (.../SettingsDateTimeSet.qml) (revision d1a6830c486a9ee9c388a80b570aa8141a8366c9) @@ -48,7 +48,7 @@ text: qsTr("Set Date and Time") } - Rectangle { id: _rect + Rectangle { id: _contentRect color: Colors.transparent anchors { top: _title.bottom @@ -57,7 +57,7 @@ right: parent.right rightMargin: Variables.settingsDateTimeSetMargin bottom: parent.bottom - bottomMargin: 2*Variables.mainMenuHeight + bottomMargin: Variables.mainMenuHeight + Variables.notificationHeight + Variables.settingsNotificationMargin } // time Index: sources/gui/qml/pages/SettingsHome.qml =================================================================== diff -u -r079aae9751fe0d234adaa470bc7d23980d5e7692 -rd1a6830c486a9ee9c388a80b570aa8141a8366c9 --- sources/gui/qml/pages/SettingsHome.qml (.../SettingsHome.qml) (revision 079aae9751fe0d234adaa470bc7d23980d5e7692) +++ sources/gui/qml/pages/SettingsHome.qml (.../SettingsHome.qml) (revision d1a6830c486a9ee9c388a80b570aa8141a8366c9) @@ -28,7 +28,6 @@ * which is the default screen in the "Settings" stack */ ScreenItem { id: _root - backgroundRect.color: Colors.backgroundMenu TouchRect { id : _clearAlarmCondition objectName: "_clearAlarmCondition" @@ -42,7 +41,7 @@ rightMargin : (Variables.headerHeight - Variables.logoHeight) / 2 } text.text: qsTr("Clear Alarm Condition") - button.onPressed: { + button.onClicked: { vAlarmStatus.doClearCondition(); } } Index: sources/model/dg/adjustment/MAdjustDGDateTimeResponse.h =================================================================== diff -u -re92ad4dc0e95b4e4cc1408146fb48a6e33169d52 -rd1a6830c486a9ee9c388a80b570aa8141a8366c9 --- sources/model/dg/adjustment/MAdjustDGDateTimeResponse.h (.../MAdjustDGDateTimeResponse.h) (revision e92ad4dc0e95b4e4cc1408146fb48a6e33169d52) +++ sources/model/dg/adjustment/MAdjustDGDateTimeResponse.h (.../MAdjustDGDateTimeResponse.h) (revision d1a6830c486a9ee9c388a80b570aa8141a8366c9) @@ -44,9 +44,9 @@ *

Logging info

* | || * | || - * | typeText | Event | - * | unitText | DG | - * | infoText | AdjustDGDateTimeResponse | + * | typeText | Event | + * | unitText | DG | + * | infoText | AdjustDGDateTime | * */ class MAdjustDGDateTimeResponse : public MAbstract { @@ -63,9 +63,9 @@ public: - Type_Enum typeText () const override { return Type_Enum::eEvent ; } - Unit_Enum unitText () const override { return Unit_Enum::eDG ; } - QString infoText () const override { return QString("AdjustDGDateTimeResponse") ; } + Type_Enum typeText () const override { return Type_Enum::eEvent ; } + Unit_Enum unitText () const override { return Unit_Enum::eDG ; } + QString infoText () const override { return QString("AdjustDGDateTime") ; } struct Data { bool mAccepted = 0; /*!< Accepted value of type quint32 extracted out */ Index: sources/model/hd/adjustment/MAdjustHDDateTimeResponse.h =================================================================== diff -u -re92ad4dc0e95b4e4cc1408146fb48a6e33169d52 -rd1a6830c486a9ee9c388a80b570aa8141a8366c9 --- sources/model/hd/adjustment/MAdjustHDDateTimeResponse.h (.../MAdjustHDDateTimeResponse.h) (revision e92ad4dc0e95b4e4cc1408146fb48a6e33169d52) +++ sources/model/hd/adjustment/MAdjustHDDateTimeResponse.h (.../MAdjustHDDateTimeResponse.h) (revision d1a6830c486a9ee9c388a80b570aa8141a8366c9) @@ -44,9 +44,9 @@ *

Logging info

* | || * | || - * | typeText | Event | - * | unitText | DG | - * | infoText | AdjustHDDateTimeResponse | + * | typeText | Event | + * | unitText | DG | + * | infoText | AdjustHDDateTime | * */ class MAdjustHDDateTimeResponse : public MAbstract { @@ -65,7 +65,7 @@ Type_Enum typeText () const override { return Type_Enum::eEvent ; } Unit_Enum unitText () const override { return Unit_Enum::eHD ; } - QString infoText () const override { return QString("AdjustHDDateTimeResponse") ; } + QString infoText () const override { return QString("AdjustHDDateTime") ; } struct Data { bool mAccepted = 0; /*!< Accepted value of type quint32 extracted out */ Index: sources/model/hd/adjustment/MTreatmentAdjustRequests.h =================================================================== diff -u -rb5a7852d2637f7969680fbd3d2c821a6a74a8ccd -rd1a6830c486a9ee9c388a80b570aa8141a8366c9 --- sources/model/hd/adjustment/MTreatmentAdjustRequests.h (.../MTreatmentAdjustRequests.h) (revision b5a7852d2637f7969680fbd3d2c821a6a74a8ccd) +++ sources/model/hd/adjustment/MTreatmentAdjustRequests.h (.../MTreatmentAdjustRequests.h) (revision d1a6830c486a9ee9c388a80b570aa8141a8366c9) @@ -727,9 +727,9 @@ * \brief The MAdjustHDDateTime class * \details The model to request starting a treatment * - * | MSG | CAN ID | M.Box | Type | Ack | Src | Dest | Description | - * |:----:|:------:|:-----:|:----:|:---:|:---:|:----:|:-------------------------:| - * | 109 | 0x100 | | Req | Y | UI | HD | Set RTC Date and Time | + * | MSG | CAN ID | Type | Ack | Src | Dest | Description | + * |:----:|:------:|:----:|:---:|:---:|:----:|:-------------------------:| + * | 109 | 0x100 | Req | Y | UI | HD | Set RTC Date and Time | * * | Payload || * | || @@ -754,9 +754,9 @@ * \brief The MAdjustDGDateTime class * \details The model to request starting a treatment * - * | MSG | CAN ID | M.Box | Type | Ack | Src | Dest | Description | - * |:----:|:------:|:-----:|:----:|:---:|:---:|:----:|:-------------------------:| - * | 111 | 0x110 | | Req | Y | UI | DG | Set RTC Date and Time | + * | MSG | CAN ID | Type | Ack | Src | Dest | Description | + * |:----:|:------:|:----:|:---:|:---:|:----:|:-------------------------:| + * | 111 | 0x110 | Req | Y | UI | DG | Set RTC Date and Time | * * | Payload || * | || Index: sources/view/VDateTime.cpp =================================================================== diff -u -r079aae9751fe0d234adaa470bc7d23980d5e7692 -rd1a6830c486a9ee9c388a80b570aa8141a8366c9 --- sources/view/VDateTime.cpp (.../VDateTime.cpp) (revision 079aae9751fe0d234adaa470bc7d23980d5e7692) +++ sources/view/VDateTime.cpp (.../VDateTime.cpp) (revision d1a6830c486a9ee9c388a80b570aa8141a8366c9) @@ -161,8 +161,7 @@ if (vResponse.mAccepted == 1) { _setDateTimeHD = SUCCESS; - } else - { + } else { _setDateTimeHD = FAILURE; } updateStatus(); @@ -179,8 +178,7 @@ if (vResponse.mAccepted == 1) { _setDateTimeDG = SUCCESS; - } else - { + } else { _setDateTimeDG = FAILURE; } updateStatus(); Index: sources/view/VDateTime.h =================================================================== diff -u -r079aae9751fe0d234adaa470bc7d23980d5e7692 -rd1a6830c486a9ee9c388a80b570aa8141a8366c9 --- sources/view/VDateTime.h (.../VDateTime.h) (revision 079aae9751fe0d234adaa470bc7d23980d5e7692) +++ sources/view/VDateTime.h (.../VDateTime.h) (revision d1a6830c486a9ee9c388a80b570aa8141a8366c9) @@ -33,15 +33,13 @@ VIEW_DEC_CLASS(VDateTime) protected: - // coco begin validated: Has been validated manually PROPERTY(QString, hour, "00") PROPERTY(QString, minute, "00") PROPERTY(QString, second, "00") PROPERTY(QString, month, "01") PROPERTY(QString, day, "01") PROPERTY(QString, year, "2020") PROPERTY(QString, status, "") - // coco end public: enum DateTimeSetStatus { NOT_SET = 0,