From 0a2f540b2a867bd5e72f2df50d5d5aa20c8ad6ec Mon Sep 17 00:00:00 2001 From: Consti10 Date: Tue, 30 Apr 2024 13:22:27 +0200 Subject: [PATCH] add X20 -> rpi please upgrade log message --- app/telemetry/models/aohdsystem.cpp | 7 +++++++ app/telemetry/models/aohdsystem.h | 2 ++ 2 files changed, 9 insertions(+) diff --git a/app/telemetry/models/aohdsystem.cpp b/app/telemetry/models/aohdsystem.cpp index 39b1e3fbb..f55d6f739 100644 --- a/app/telemetry/models/aohdsystem.cpp +++ b/app/telemetry/models/aohdsystem.cpp @@ -298,6 +298,13 @@ void AOHDSystem::process_onboard_computer_status(const mavlink_onboard_computer_ set_air_reported_fc_sys_id(air_reported_sys_id); const uint8_t ohd_platform=msg.link_type[0]; set_ohd_platform(ohd_platform); + if(m_is_air && QOpenHD::instance().is_platform_rpi() && ohd_platform==30){ + // Air is x20, and qopenhd is running on rpi + if(!m_x20_rpi_upgrade_warning_logged){ + QOpenHD::instance().show_toast("X20 -> RPI has high latency.\nPlease upgrade your ground station to next gen."); + m_x20_rpi_upgrade_warning_logged=true; + } + } const auto platform_as_str=x_platform_type_to_string(ohd_platform); set_ohd_platform_type_as_string(platform_as_str.c_str()); } diff --git a/app/telemetry/models/aohdsystem.h b/app/telemetry/models/aohdsystem.h index b29b7dee1..786be2b32 100644 --- a/app/telemetry/models/aohdsystem.h +++ b/app/telemetry/models/aohdsystem.h @@ -170,6 +170,8 @@ class AOHDSystem : public QObject std::chrono::steady_clock::time_point m_last_tx_error_hud_message=std::chrono::steady_clock::now(); std::chrono::steady_clock::time_point m_last_n_cameras_message=std::chrono::steady_clock::now(); void update_alive_status_with_hud_message(bool alive); +private: + bool m_x20_rpi_upgrade_warning_logged=false; };