Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add X20 -> rpi please upgrade log message #698

Merged
merged 2 commits into from
Apr 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading