diff --git a/libraries/AP_OSD/AP_OSD.h b/libraries/AP_OSD/AP_OSD.h index 2445cee2fd..9a3764ed4a 100644 --- a/libraries/AP_OSD/AP_OSD.h +++ b/libraries/AP_OSD/AP_OSD.h @@ -304,12 +304,12 @@ public: // initialize the setting from the configured information void update(); // grab the parameter name - void copy_name(char* name, size_t len) { + void copy_name(char* name, size_t len) const { _param->copy_name_token(_current_token, name, len); if (len > 16) name[16] = 0; } // copy the name converting FOO_BAR_BAZ to FooBarBaz - void copy_name_camel_case(char* name, size_t len); + void copy_name_camel_case(char* name, size_t len) const; // set the ranges from static metadata bool set_from_metadata(); bool set_by_name(const char* name, uint8_t config_type, float pmin=0, float pmax=0, float pincr=0); diff --git a/libraries/AP_OSD/AP_OSD_Backend.h b/libraries/AP_OSD/AP_OSD_Backend.h index 4fe7cd4696..3623bafb5c 100644 --- a/libraries/AP_OSD/AP_OSD_Backend.h +++ b/libraries/AP_OSD/AP_OSD_Backend.h @@ -68,7 +68,7 @@ protected: } //check option - bool check_option(uint32_t option) + bool check_option(uint32_t option) const { return (_osd.options & option) != 0; } diff --git a/libraries/AP_OSD/AP_OSD_ParamSetting.cpp b/libraries/AP_OSD/AP_OSD_ParamSetting.cpp index 129becf4e4..8c30b3c02b 100644 --- a/libraries/AP_OSD/AP_OSD_ParamSetting.cpp +++ b/libraries/AP_OSD/AP_OSD_ParamSetting.cpp @@ -417,7 +417,7 @@ void AP_OSD_ParamSetting::guess_ranges(bool force) } // copy the name converting FOO_BAR_BAZ to FooBarBaz -void AP_OSD_ParamSetting::copy_name_camel_case(char* name, size_t len) +void AP_OSD_ParamSetting::copy_name_camel_case(char* name, size_t len) const { char buf[17]; _param->copy_name_token(_current_token, buf, 17);