Skip to content

Commit

Permalink
on X20, camera type is read only
Browse files Browse the repository at this point in the history
  • Loading branch information
Consti10 committed Apr 29, 2024
1 parent 36582cc commit efe26d1
Showing 1 changed file with 4 additions and 0 deletions.
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 efe26d1

Please sign in to comment.