Skip to content

Commit

Permalink
Merge pull request #698 from OpenHD/consti-dev
Browse files Browse the repository at this point in the history
add X20 -> rpi please upgrade log message
  • Loading branch information
Consti10 authored Apr 30, 2024
2 parents 7aa8507 + 0a2f540 commit 04a4d1d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
7 changes: 7 additions & 0 deletions app/telemetry/models/aohdsystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
Expand Down
2 changes: 2 additions & 0 deletions app/telemetry/models/aohdsystem.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};


Expand Down
4 changes: 4 additions & 0 deletions app/telemetry/settings/mavlinksettingsmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,10 @@ QVariant MavlinkSettingsModel::data(const QModelIndex &index, int role) const
QString ret=DocumentedParam::get_short_description(data.unique_id.toStdString()).c_str();
return ret;
} else if(role ==ReadOnlyRole){
if(data.unique_id=="CAMERA_TYPE" && AOHDSystem::instanceAir().ohd_platform_type()==30){
// X20 - camera type is not changeable by the user
return true;
}
return DocumentedParam::read_only(data.unique_id.toStdString());
}else if(role == WhitelistedRole){
return DocumentedParam::is_param_whitelisted(data.unique_id.toStdString());
Expand Down

0 comments on commit 04a4d1d

Please sign in to comment.