AP_LandingGear: Add missing const in member functions

Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
This commit is contained in:
Patrick José Pereira 2021-02-01 13:26:29 -03:00 committed by Andrew Tridgell
parent d006012cee
commit 41c653f973
2 changed files with 4 additions and 4 deletions

View File

@ -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;

View File

@ -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[];