|
|
|
@ -18,6 +18,7 @@
@@ -18,6 +18,7 @@
|
|
|
|
|
|
|
|
|
|
#include "GCS.h" |
|
|
|
|
#include <AP_Logger/AP_Logger.h> |
|
|
|
|
#include <AP_BoardConfig/AP_BoardConfig.h> |
|
|
|
|
|
|
|
|
|
extern const AP_HAL::HAL& hal; |
|
|
|
|
|
|
|
|
@ -276,6 +277,14 @@ void GCS_MAVLINK::handle_param_set(const mavlink_message_t &msg)
@@ -276,6 +277,14 @@ void GCS_MAVLINK::handle_param_set(const mavlink_message_t &msg)
|
|
|
|
|
|
|
|
|
|
float old_value = vp->cast_to_float(var_type); |
|
|
|
|
|
|
|
|
|
if (parameter_flags & AP_PARAM_FLAG_INTERNAL_USE_ONLY) { |
|
|
|
|
// the user can set BRD_OPTIONS to enable set of internal
|
|
|
|
|
// parameters, for developer testing or unusual use cases
|
|
|
|
|
if (AP_BoardConfig::allow_set_internal_parameters()) { |
|
|
|
|
parameter_flags &= ~AP_PARAM_FLAG_INTERNAL_USE_ONLY; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if ((parameter_flags & AP_PARAM_FLAG_INTERNAL_USE_ONLY) || vp->is_read_only()) { |
|
|
|
|
gcs().send_text(MAV_SEVERITY_WARNING, "Param write denied (%s)", key); |
|
|
|
|
// send the readonly value
|
|
|
|
|