From 263216669db09f2b6feca95335dc2efa38da9d7e Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Wed, 1 Feb 2023 18:25:14 +1100 Subject: [PATCH] GCS_MAVLink: add warning about providing full-sized buffer to send_parameter_value --- libraries/GCS_MAVLink/GCS.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libraries/GCS_MAVLink/GCS.h b/libraries/GCS_MAVLink/GCS.h index 57fec020ae..781460b8ce 100644 --- a/libraries/GCS_MAVLink/GCS.h +++ b/libraries/GCS_MAVLink/GCS.h @@ -232,6 +232,9 @@ public: virtual uint8_t sysid_my_gcs() const = 0; virtual bool sysid_enforce() const { return false; } + // NOTE: param_name here must point to a 16+1 byte buffer - so do + // NOT try to pass in a static-char-* unless it does have that + // length! void send_parameter_value(const char *param_name, ap_var_type param_type, float param_value);