From 1dec0d9e1d92226b2d7564b52c22315dd22673ce Mon Sep 17 00:00:00 2001 From: Consti10 Date: Wed, 22 May 2024 14:57:00 +0200 Subject: [PATCH 1/3] Revert "Update StatusCardBodyOpenHD.qml" This reverts commit 630cb356d76ad42535eb6d0e1d211718b15fb077. --- qml/ui/configpopup/status/StatusCardBodyOpenHD.qml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/qml/ui/configpopup/status/StatusCardBodyOpenHD.qml b/qml/ui/configpopup/status/StatusCardBodyOpenHD.qml index f4dc43d99..6c2720c07 100644 --- a/qml/ui/configpopup/status/StatusCardBodyOpenHD.qml +++ b/qml/ui/configpopup/status/StatusCardBodyOpenHD.qml @@ -24,10 +24,10 @@ Column { property var m_model: m_is_ground ? _ohdSystemGround : _ohdSystemAir - property string m_version: m_model.openhd_version.substring(0, 5) + property string m_version: m_model.openhd_version property string m_last_ping: m_model.last_ping_result_openhd property bool m_is_alive: m_model.is_alive - property string m_qopenhd_version: _qopenhd.version_string.substring(0, 5) + property string m_qopenhd_version: _qopenhd.version_string //fucking hell qt property int m_font_pixel_size: 13 @@ -80,13 +80,13 @@ Column { if(_ohdSystemGround.openhd_version=="N/A"){ return false; } - return _ohdSystemGround.openhd_version.substring(0, 5) != m_qopenhd_version.substring(0, 5); + return _ohdSystemGround.openhd_version != m_qopenhd_version; }else{ // Show if ground and air reported version is valid and there is a mismatch if(_ohdSystemGround.openhd_version=="N/A" || _ohdSystemAir.openhd_version=="N/A"){ return false; } - return _ohdSystemGround.openhd_version.substring(0, 5) != _ohdSystemAir.openhd_version.substring(0, 5) + return _ohdSystemGround.openhd_version != _ohdSystemAir.openhd_version } } m_error_text: { From 25e99023cbc8fde8585b47679f83abe2982c77a5 Mon Sep 17 00:00:00 2001 From: Consti10 Date: Wed, 22 May 2024 15:00:36 +0200 Subject: [PATCH 2/3] properly implement fix 'do not show -release on a release' - it is not something important to the average user --- app/telemetry/models/aohdsystem.cpp | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/app/telemetry/models/aohdsystem.cpp b/app/telemetry/models/aohdsystem.cpp index f55d6f739..ace8f9888 100644 --- a/app/telemetry/models/aohdsystem.cpp +++ b/app/telemetry/models/aohdsystem.cpp @@ -62,19 +62,20 @@ static MonitorModeLinkBitfield parse_monitor_link_bitfield(uint8_t bitfield){ return ret; } -static std::string ohd_version_as_string(uint8_t major,uint8_t minor,uint8_t patch,uint8_t release_type){ - std::stringstream ss; - ss<<(int)major<<"."<<(int)minor<<"."<<(int)patch<<"-evo"; - if(release_type==0){ - ss<<"-release"; - }else if(release_type==1){ - ss<<"-beta"; - }else if(release_type==2){ - ss<<"-alpha"; - }else{ - ss<<"-unknown"; - } - return ss.str(); +static std::string ohd_version_as_string(uint8_t major, uint8_t minor, + uint8_t patch, uint8_t release_type) { + std::stringstream ss; + ss << (int)major << "." << (int)minor << "." << (int)patch << "-evo"; + if (release_type == 0) { + // This is a 'proper' release + } else if (release_type == 1) { + ss << "-beta"; // testers only + } else if (release_type == 2) { + ss << "-alpha"; // internal only + } else { + ss << "-unknown"; + } + return ss.str(); } AOHDSystem::AOHDSystem(const bool is_air,QObject *parent) From 5f672229bc54d1340f835dc83aacc92a57274cab Mon Sep 17 00:00:00 2001 From: Consti10 Date: Wed, 22 May 2024 15:09:48 +0200 Subject: [PATCH 3/3] properly implement fix 'do not show -release on a release' - it is not something important to the average user --- app/util/qopenhd.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/util/qopenhd.h b/app/util/qopenhd.h index e2dd5e3d4..5475ea559 100644 --- a/app/util/qopenhd.h +++ b/app/util/qopenhd.h @@ -70,7 +70,7 @@ class QOpenHD : public QObject // Tries to mimic android toast as much as possible // Q_INVOKABLE void show_toast(QString message,bool long_toast=false); - L_RO_PROP(QString,version_string,set_version_string,"2.5.4-evo"); + L_RO_PROP(QString,version_string,set_version_string,"2.6.0-evo"); // // Shows a message popup to the user that needs to be clicked away - use sparingly //