Index: sources/ApplicationController.cpp =================================================================== diff -u -rc97b99199d1be46f7cfa99908308ce98c8578285 -r5a9b7ff46df9cecc258f7cb18019a51bca76bce3 --- sources/ApplicationController.cpp (.../ApplicationController.cpp) (revision c97b99199d1be46f7cfa99908308ce98c8578285) +++ sources/ApplicationController.cpp (.../ApplicationController.cpp) (revision 5a9b7ff46df9cecc258f7cb18019a51bca76bce3) @@ -89,6 +89,8 @@ */ void ApplicationController::initConnections() { + connect(&_post , SIGNAL(didOSVersion (bool)), + this , SLOT( onOSVersion (bool))); connect(&_post , SIGNAL( didEthernet (bool)), this , SLOT(onPOSTEthernet (bool))); connect(&_post , SIGNAL( didWiFi (bool)), @@ -564,12 +566,23 @@ } /*! + * \brief ApplicationController::onOSVersion + * \details Notifies the OS Version POST status + */ +void ApplicationController::onOSVersion(bool vPass) { + // sending the data first, therefore in the slot for the didPOST we have the vPass and the Data to decide to use the data or not. + emit didPOSTOSVersionData (_post.osVersion()); + emit didPOSTOSVersion (vPass); +} + +/*! * \brief ApplicationController::onPOSTEthernet * \details sends the Ethernet mac to device controller */ void ApplicationController::onPOSTEthernet(bool vPass) { - emit didPOSTEthernet (vPass); + // sending the data first, therefore in the slot for the didPOST we have the vPass and the Data to decide to use the data or not. emit didPOSTEthernetData(_post.macEthernet()); + emit didPOSTEthernet (vPass); } /*! @@ -580,8 +593,9 @@ if (vPass) { _WifiInterface.doStart(); } - emit didPOSTWireless (vPass); + // sending the data first, therefore in the slot for the didPOST we have the vPass and the Data to decide to use the data or not. emit didPOSTWirelessData(_post.macWireless()); + emit didPOSTWireless (vPass); //DEBUG qDebug() << " ---------- " << _post.macWireless(); } @@ -598,18 +612,19 @@ else { _BluetoothInterface.doNotifyStatePOSTError(); } - emit didPOSTBluetooth (vPass); + // sending the data first, therefore in the slot for the didPOST we have the vPass and the Data to decide to use the data or not. emit didPOSTBluetoothData (_post.macBluetooth()); + emit didPOSTBluetooth (vPass); } /*! * \brief ApplicationController::onPOSTCloudSync * \details Notifies the CloudSync POST status */ -void ApplicationController::onPOSTCloudSync(bool vPass) -{ +void ApplicationController::onPOSTCloudSync(bool vPass) { + // sending the data first, therefore in the slot for the didPOST we have the vPass and the Data to decide to use the data or not. + emit didPOSTCloudSyncData("" /*_post.netCloudSync*/); // not needed and POST is not getting it yet. [ApplicationController => DeviceController] emit didPOSTCloudSync (vPass); - emit didPOSTCloudSyncData("" /*_post.netCloudSync*/); // not needed and post is not getting it yet.[ApplicationController => DeviceController] } /*! Index: sources/ApplicationController.h =================================================================== diff -u -rc97b99199d1be46f7cfa99908308ce98c8578285 -r5a9b7ff46df9cecc258f7cb18019a51bca76bce3 --- sources/ApplicationController.h (.../ApplicationController.h) (revision c97b99199d1be46f7cfa99908308ce98c8578285) +++ sources/ApplicationController.h (.../ApplicationController.h) (revision 5a9b7ff46df9cecc258f7cb18019a51bca76bce3) @@ -113,6 +113,7 @@ void onSettingsUpdate(); + void onOSVersion (bool vPass); void onPOSTEthernet (bool vPass); void onPOSTWiFi (bool vPass); void onPOSTBluetooth (bool vPass); @@ -128,11 +129,13 @@ void onTreatmentRangesDone(bool vPass); signals: + void didPOSTOSVersion (bool vPass); void didPOSTEthernet (bool vPass); void didPOSTWireless (bool vPass); void didPOSTBluetooth (bool vPass); void didPOSTCloudSync (bool vPass); + void didPOSTOSVersionData (const QString &vOSVersion ); void didPOSTEthernetData (const QString &vMacAddress); void didPOSTWirelessData (const QString &vMacAddress); void didPOSTBluetoothData (const QString &vMacAddress); Index: sources/ApplicationPost.cpp =================================================================== diff -u -r7afdd47e30a761efd8ed08988f53337ea4e74ed6 -r5a9b7ff46df9cecc258f7cb18019a51bca76bce3 --- sources/ApplicationPost.cpp (.../ApplicationPost.cpp) (revision 7afdd47e30a761efd8ed08988f53337ea4e74ed6) +++ sources/ApplicationPost.cpp (.../ApplicationPost.cpp) (revision 5a9b7ff46df9cecc258f7cb18019a51bca76bce3) @@ -88,36 +88,40 @@ */ bool ApplicationPost::checkOSVersion() { - QString exr("%1\\s*\"\\d+\\.\\d+\\.\\d+\""); - QRegExp reg(exr.arg(_postmsg_osversion)); - QString captured; + QString exrVer("%1\\s*\"\\d+\\.\\d+\\.\\d+\""); + QString exrBld("%1\\s*\"\\d+\""); + + QRegExp regVer(exrVer.arg(_postmsg_osversion)); + QRegExp regBld(exrBld.arg(_postmsg_osbuild )); + QString version; + QString build; QStringList versions; quint16 major; quint16 minor; quint16 micro; // check the statement exists in the long - int row = _content.indexOf (reg); - bool ok = row >= 0; // found - if ( ! ok ) goto lErr; + int rowVer = _content.indexOf (regVer); + int rowBld = _content.indexOf (regBld); Q_UNUSED(rowBld); + bool ok = rowVer >= 0; // found + if ( ! ok ) goto lOut; // check the Os version is compatible - captured = reg.cap(0); // 0 is the first captured and next if any are the subsets. - versions = captured.replace(_postmsg_osversion,"").replace("\"","").split("."); + version = regVer.cap(0).replace(_postmsg_osversion,"").replace("\"",""); // 0 is the first captured and next if any are the subsets. + build = regBld.cap(0).replace(_postmsg_osbuild ,"").replace("\"",""); // 0 is the first captured and next if any are the subsets. + versions = version.split("."); major = versions[0].toUInt(); // type, existance, count has been already tested by regex, and was rejected in first check section. minor = versions[1].toUInt(); // type, existance, count has been already tested by regex, and was rejected in first check section. micro = versions[2].toUInt(); // type, existance, count has been already tested by regex, and was rejected in first check section. ok = major >= Storage::OS_VERSION_MAJOR && minor >= Storage::OS_VERSION_MINOR && micro >= Storage::OS_VERSION_MICRO ; - if ( ! ok ) goto lErr; + if ( ! ok ) goto lOut; - // if ok then - emit didOSVersion(ok); - return ok; + _osVersion = version + "." + build; -lErr: - emit didFail(Gui::GuiAlarmID::ALARM_ID_HD_UI_POST_FAILURE_OS_VERSION); +lOut: + if ( !ok ) emit didFail(Gui::GuiAlarmID::ALARM_ID_HD_UI_POST_FAILURE_OS_VERSION); emit didOSVersion(ok); return ok; } Index: sources/ApplicationPost.h =================================================================== diff -u -r7afdd47e30a761efd8ed08988f53337ea4e74ed6 -r5a9b7ff46df9cecc258f7cb18019a51bca76bce3 --- sources/ApplicationPost.h (.../ApplicationPost.h) (revision 7afdd47e30a761efd8ed08988f53337ea4e74ed6) +++ sources/ApplicationPost.h (.../ApplicationPost.h) (revision 5a9b7ff46df9cecc258f7cb18019a51bca76bce3) @@ -62,6 +62,7 @@ const QString _postmsg_postfix_failed = " failed" ; // POSTMSG_POSTFIX_FAILED=" failed" const QString _postmsg_osversion = "DIALITY_VERSION_ID=" ; // DIALITY_VERSION_ID="0.0.40" + const QString _postmsg_osbuild = "BUILD_ID=" ; // BUILD_ID="20230628230011" const QString _postmsg_canbus = "CANBus" ; // POSTMSG_CANBUS="CANBus" const QString _postmsg_sdcard = "SD-CARD" ; // POSTMSG_SDCARD="SD-CARD" const QString _postmsg_touch = "Touch" ; // POSTMSG_TOUCH="Touch" @@ -79,6 +80,7 @@ const QString _macEthernetLabel = "link/ether " ; // the last space is important const QString _macWirelessLabel = "link/ether " ; // the last space is important const QString _macBluetoothLabel = "BD Address: " ; // the last space is important + QString _osVersion = "" ; QString _macEthernet = "" ; QString _macWireless = "" ; QString _macBluetooth = "" ; @@ -143,6 +145,7 @@ return _isDone; } + QString osVersion () const { return _osVersion ; } QString macEthernet () const { return _macEthernet ; } QString macWireless () const { return _macWireless ; } QString macBluetooth () const { return _macBluetooth ; } Index: sources/device/DeviceController.cpp =================================================================== diff -u -r6ccee3fdf50b4717096745fb5b3f5ecc91b9cd1b -r5a9b7ff46df9cecc258f7cb18019a51bca76bce3 --- sources/device/DeviceController.cpp (.../DeviceController.cpp) (revision 6ccee3fdf50b4717096745fb5b3f5ecc91b9cd1b) +++ sources/device/DeviceController.cpp (.../DeviceController.cpp) (revision 5a9b7ff46df9cecc258f7cb18019a51bca76bce3) @@ -108,6 +108,8 @@ connect(&_fileSystemWatcher , SIGNAL( fileChanged(const QString &)), this , SLOT( onWatchFileChanged(const QString &))); + connect(&_ApplicationController , SIGNAL(didPOSTOSVersionData (const QString &)), + this , SLOT( onPOSTOSVersionData (const QString &))); connect(&_ApplicationController , SIGNAL(didPOSTEthernetData (const QString &)), this , SLOT( onPOSTEthernetData (const QString &))); connect(&_ApplicationController , SIGNAL(didPOSTWirelessData (const QString &)), @@ -901,6 +903,17 @@ } /*! + * \brief DeviceController::onPOSTOSVersionData + * \details Collects the OS Version + * when it is ready after the POST is done reading OS Version + * \param vMacAddress - The Ethernet MAC address + */ +void DeviceController::onPOSTOSVersionData(const QString &vOSVersion) { + _osVersion = vOSVersion; + emit didPOSTOSVersionData (vOSVersion); +} + +/*! * \brief DeviceController::onPOSTEthernetData * \details Collects the ethernet mac address * when it is ready after the POST is done for the Ethernet Index: sources/device/DeviceController.h =================================================================== diff -u -r6ccee3fdf50b4717096745fb5b3f5ecc91b9cd1b -r5a9b7ff46df9cecc258f7cb18019a51bca76bce3 --- sources/device/DeviceController.h (.../DeviceController.h) (revision 6ccee3fdf50b4717096745fb5b3f5ecc91b9cd1b) +++ sources/device/DeviceController.h (.../DeviceController.h) (revision 5a9b7ff46df9cecc258f7cb18019a51bca76bce3) @@ -113,6 +113,7 @@ QFileSystemWatcher _fileSystemWatcher; + QString _osVersion = ""; QString _macEthernet = ""; QString _macWireless = ""; QString _macBluetooth = ""; @@ -142,13 +143,15 @@ void onEventThreadChange (); /*! - * \brief didPOSTData + * \brief onPOSTData * \details These signals will be emitted when UI is done with the POST and will let DeviceView update its property(ies). + * \param vOSVersion - OS Version * \param vMacEthernet - Ethernet Mac Adress * \param vMacWireless - Wireless Mac Adress * \param vMacBluetooth - Bluetooth Mac Adress * \param vNetCloudSync - CloudSync IP Adress */ + void onPOSTOSVersionData (const QString &vOSVersion ); void onPOSTEthernetData (const QString &vMacAddress); void onPOSTWirelessData (const QString &vMacAddress); void onPOSTBluetoothData (const QString &vMacAddress); @@ -267,6 +270,7 @@ */ void didEventThreadChange (QPrivateSignal); + void didPOSTOSVersionData (const QString &vOSVersion ); void didPOSTEthernetData (const QString &vMacAddress); void didPOSTWirelessData (const QString &vMacAddress); void didPOSTBluetoothData (const QString &vMacAddress); Index: sources/device/DeviceView.cpp =================================================================== diff -u -rcb0e2dc027adf7e0fbe803b82bb9945b82c556a5 -r5a9b7ff46df9cecc258f7cb18019a51bca76bce3 --- sources/device/DeviceView.cpp (.../DeviceView.cpp) (revision cb0e2dc027adf7e0fbe803b82bb9945b82c556a5) +++ sources/device/DeviceView.cpp (.../DeviceView.cpp) (revision 5a9b7ff46df9cecc258f7cb18019a51bca76bce3) @@ -19,6 +19,7 @@ // Project #include "ApplicationController.h" #include "GuiController.h" +#include "DeviceController.h" #include "GuiGlobals.h" #include "encryption.h" @@ -27,6 +28,9 @@ void VDevice::initConnections() { DEVICE_VIEW_INIT_CONNECTIONS_LIST + + connect(&_DeviceController , SIGNAL(didPOSTOSVersionData(QString)), + this , SLOT( onPOSTOSVersionData(QString))); } // developer implementation section @@ -251,3 +255,8 @@ // has to be the last one response(true); } + +void VDevice::onPOSTOSVersionData(const QString &vOSVersion) +{ + osVersion(vOSVersion); +} Index: sources/device/DeviceView.h =================================================================== diff -u -rcb0e2dc027adf7e0fbe803b82bb9945b82c556a5 -r5a9b7ff46df9cecc258f7cb18019a51bca76bce3 --- sources/device/DeviceView.h (.../DeviceView.h) (revision cb0e2dc027adf7e0fbe803b82bb9945b82c556a5) +++ sources/device/DeviceView.h (.../DeviceView.h) (revision 5a9b7ff46df9cecc258f7cb18019a51bca76bce3) @@ -42,6 +42,8 @@ TRIGGER ( quint32 , reason , 0) PROPERTY ( QString , status , "") + PROPERTY ( QString , osVersion , "") + ATTRIBUTE ( quint8 , brightness , 0, Brightness ) ATTRIBUTE ( quint8 , bluetoothPairedReset, 0, BluetoothPairedReset ) @@ -60,6 +62,9 @@ VIEW_DEC_CLASS(VDevice) +private slots: + void onPOSTOSVersionData (const QString &vOSVersion); + private: bool isCompleteResponse(Model::MDeviceResponseBase::Data vData) { // Either the script exited successfully or the script failed and the reason is provided Index: sources/gui/GuiController.h =================================================================== diff -u -rec31f94081864aec8b48a3cfa1e0aea80619714c -r5a9b7ff46df9cecc258f7cb18019a51bca76bce3 --- sources/gui/GuiController.h (.../GuiController.h) (revision ec31f94081864aec8b48a3cfa1e0aea80619714c) +++ sources/gui/GuiController.h (.../GuiController.h) (revision 5a9b7ff46df9cecc258f7cb18019a51bca76bce3) @@ -92,7 +92,7 @@ void onExportStat (quint32 vIndex, const QString &vFileName, quint8 vPercent); void onFailedTransmit(Sequence seq); - void onPOSTPass (bool vPass); + void onPOSTPass (bool vPass); signals: void didActionReceive (GuiActionType vAction, const QVariantList &vData); // UI <= HD/DG Index: sources/gui/qml/pages/settings/SettingsInformation.qml =================================================================== diff -u -r80b5e8f1ebb90c03c37d90d90cd2da3bd95d6803 -r5a9b7ff46df9cecc258f7cb18019a51bca76bce3 --- sources/gui/qml/pages/settings/SettingsInformation.qml (.../SettingsInformation.qml) (revision 80b5e8f1ebb90c03c37d90d90cd2da3bd95d6803) +++ sources/gui/qml/pages/settings/SettingsInformation.qml (.../SettingsInformation.qml) (revision 5a9b7ff46df9cecc258f7cb18019a51bca76bce3) @@ -45,7 +45,7 @@ rowCount : 8 rowSpacing : 0 itemHeight : 50 - itemWidth : 550 + itemWidth : 575 touchable : false itemsHasLine: [ 0, // title C1 @@ -56,6 +56,7 @@ itemsValueLeftMargin: 300 itemsValue : [ "" , + vDevice .osVersion , Qt .application.version, vAdjustmentVersions .hdVerDevice , vAdjustmentVersions .hdVerFPGA , @@ -71,6 +72,7 @@ ] itemsText : [ qsTr("Versions" ), // col1 title + qsTr("OS Version" ), qsTr("UI Version" ), qsTr("HD Version" ), qsTr("HD FPGA Version" ),