From 7be27235f30daaa27e7dd10ea3443ca3622a1cc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20Jos=C3=A9=20Pereira?= Date: Mon, 1 Feb 2021 13:26:25 -0300 Subject: [PATCH] AC_Autorotation: Add missing const in member functions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Patrick José Pereira --- libraries/AC_Autorotation/AC_Autorotation.cpp | 4 ++-- libraries/AC_Autorotation/AC_Autorotation.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libraries/AC_Autorotation/AC_Autorotation.cpp b/libraries/AC_Autorotation/AC_Autorotation.cpp index 39370035707..7f966aeb904 100644 --- a/libraries/AC_Autorotation/AC_Autorotation.cpp +++ b/libraries/AC_Autorotation/AC_Autorotation.cpp @@ -190,7 +190,7 @@ bool AC_Autorotation::update_hs_glide_controller(float dt) // Function to set collective and collective filter in motor library -void AC_Autorotation::set_collective(float collective_filter_cutoff) +void AC_Autorotation::set_collective(float collective_filter_cutoff) const { AP_Motors *motors = AP::motors(); if (motors) { @@ -248,7 +248,7 @@ float AC_Autorotation::get_rpm(bool update_counter) } -void AC_Autorotation::Log_Write_Autorotation(void) +void AC_Autorotation::Log_Write_Autorotation(void) const { // @LoggerMessage: AROT // @Description: Helicopter AutoRotation information diff --git a/libraries/AC_Autorotation/AC_Autorotation.h b/libraries/AC_Autorotation/AC_Autorotation.h index 9588720a9f6..0ae16bc1cac 100644 --- a/libraries/AC_Autorotation/AC_Autorotation.h +++ b/libraries/AC_Autorotation/AC_Autorotation.h @@ -34,7 +34,7 @@ public: float get_bail_time(void) { return _param_bail_time; } float get_last_collective() const { return _collective_out; } bool is_enable(void) { return _param_enable; } - void Log_Write_Autorotation(void); + void Log_Write_Autorotation(void) const; void update_forward_speed_controller(void); // Update foward speed controller void set_desired_fwd_speed(void) { _vel_target = _param_target_speed; } // Overloaded: Set desired speed for forward controller to parameter value void set_desired_fwd_speed(float speed) { _vel_target = speed; } // Overloaded: Set desired speed to argument value @@ -95,7 +95,7 @@ private: } _flags; //--------Internal Functions-------- - void set_collective(float _collective_filter_cutoff); + void set_collective(float _collective_filter_cutoff) const; // low pass filter for collective trim LowPassFilterFloat col_trim_lpf;