From 41c653f973871f07aa20b3b31b47f1415c9e5965 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20Jos=C3=A9=20Pereira?= Date: Mon, 1 Feb 2021 13:26:29 -0300 Subject: [PATCH] AP_LandingGear: 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/AP_LandingGear/AP_LandingGear.cpp | 4 ++-- libraries/AP_LandingGear/AP_LandingGear.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libraries/AP_LandingGear/AP_LandingGear.cpp b/libraries/AP_LandingGear/AP_LandingGear.cpp index 9af832faf6..1fede15971 100644 --- a/libraries/AP_LandingGear/AP_LandingGear.cpp +++ b/libraries/AP_LandingGear/AP_LandingGear.cpp @@ -178,7 +178,7 @@ AP_LandingGear::LG_LandingGear_State AP_LandingGear::get_state() return gear_state_current; } -uint32_t AP_LandingGear::get_gear_state_duration_ms() +uint32_t AP_LandingGear::get_gear_state_duration_ms() const { if (last_gear_event_ms == 0) { return 0; @@ -187,7 +187,7 @@ uint32_t AP_LandingGear::get_gear_state_duration_ms() return AP_HAL::millis() - last_gear_event_ms; } -uint32_t AP_LandingGear::get_wow_state_duration_ms() +uint32_t AP_LandingGear::get_wow_state_duration_ms() const { if (last_wow_event_ms == 0) { return 0; diff --git a/libraries/AP_LandingGear/AP_LandingGear.h b/libraries/AP_LandingGear/AP_LandingGear.h index 76df2b35a1..7d8c1198f4 100644 --- a/libraries/AP_LandingGear/AP_LandingGear.h +++ b/libraries/AP_LandingGear/AP_LandingGear.h @@ -76,8 +76,8 @@ public: /// set landing gear position to retract, deploy or deploy-and-keep-deployed void set_position(LandingGearCommand cmd); - uint32_t get_gear_state_duration_ms(); - uint32_t get_wow_state_duration_ms(); + uint32_t get_gear_state_duration_ms() const; + uint32_t get_wow_state_duration_ms() const; static const struct AP_Param::GroupInfo var_info[];