From 65e790a48c7c50ef56d40f3a0ec45a88dca9006b Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 19 Apr 2020 09:01:48 +1000 Subject: [PATCH] GCS_MAVLink: invalidate param count on set of ENABLE param --- libraries/GCS_MAVLink/GCS_Param.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libraries/GCS_MAVLink/GCS_Param.cpp b/libraries/GCS_MAVLink/GCS_Param.cpp index 3841e900b6..822392a700 100644 --- a/libraries/GCS_MAVLink/GCS_Param.cpp +++ b/libraries/GCS_MAVLink/GCS_Param.cpp @@ -298,6 +298,10 @@ void GCS_MAVLINK::handle_param_set(const mavlink_message_t &msg) // save the change vp->save(force_save); + if (force_save && (parameter_flags & AP_PARAM_FLAG_ENABLE)) { + AP_Param::invalidate_count(); + } + AP_Logger *logger = AP_Logger::get_singleton(); if (logger != nullptr) { logger->Write_Parameter(key, vp->cast_to_float(var_type));