Skip to content

Commit e15c638

Browse files
committed
GCS_MAVLink: disallow setting of readonly/internal parameters via mavftp
1 parent 3a6056f commit e15c638

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

libraries/GCS_MAVLink/GCS_Param.cpp

+1-9
Original file line numberDiff line numberDiff line change
@@ -281,15 +281,7 @@ void GCS_MAVLINK::handle_param_set(const mavlink_message_t &msg)
281281

282282
float old_value = vp->cast_to_float(var_type);
283283

284-
if (parameter_flags & AP_PARAM_FLAG_INTERNAL_USE_ONLY) {
285-
// the user can set BRD_OPTIONS to enable set of internal
286-
// parameters, for developer testing or unusual use cases
287-
if (AP_BoardConfig::allow_set_internal_parameters()) {
288-
parameter_flags &= ~AP_PARAM_FLAG_INTERNAL_USE_ONLY;
289-
}
290-
}
291-
292-
if ((parameter_flags & AP_PARAM_FLAG_INTERNAL_USE_ONLY) || vp->is_read_only()) {
284+
if (!vp->allow_set_via_mavlink(parameter_flags)) {
293285
GCS_SEND_TEXT(MAV_SEVERITY_WARNING, "Param write denied (%s)", key);
294286
// send the readonly value
295287
send_parameter_value(key, var_type, old_value);

0 commit comments

Comments
 (0)