mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-26 01:33:56 -04:00
AP_LandingGear: allow compilation with HAL_LOGGING_ENABLED false
This commit is contained in:
parent
14beb2f191
commit
97c8d149f7
@ -174,7 +174,7 @@ void AP_LandingGear::deploy()
|
|||||||
// set deployed flag
|
// set deployed flag
|
||||||
_deployed = true;
|
_deployed = true;
|
||||||
_have_changed = true;
|
_have_changed = true;
|
||||||
AP::logger().Write_Event(LogEvent::LANDING_GEAR_DEPLOYED);
|
LOGGER_WRITE_EVENT(LogEvent::LANDING_GEAR_DEPLOYED);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// retract - retract landing gear
|
/// retract - retract landing gear
|
||||||
@ -190,7 +190,7 @@ void AP_LandingGear::retract()
|
|||||||
// reset deployed flag
|
// reset deployed flag
|
||||||
_deployed = false;
|
_deployed = false;
|
||||||
_have_changed = true;
|
_have_changed = true;
|
||||||
AP::logger().Write_Event(LogEvent::LANDING_GEAR_RETRACTED);
|
LOGGER_WRITE_EVENT(LogEvent::LANDING_GEAR_RETRACTED);
|
||||||
|
|
||||||
// send message only if output has been configured
|
// send message only if output has been configured
|
||||||
if (SRV_Channels::function_assigned(SRV_Channel::k_landing_gear_control)) {
|
if (SRV_Channels::function_assigned(SRV_Channel::k_landing_gear_control)) {
|
||||||
@ -303,6 +303,7 @@ void AP_LandingGear::update(float height_above_ground_m)
|
|||||||
_last_height_above_ground = alt_m;
|
_last_height_above_ground = alt_m;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if HAL_LOGGING_ENABLED
|
||||||
// log weight on wheels state
|
// log weight on wheels state
|
||||||
void AP_LandingGear::log_wow_state(LG_WOW_State state)
|
void AP_LandingGear::log_wow_state(LG_WOW_State state)
|
||||||
{
|
{
|
||||||
@ -310,6 +311,7 @@ void AP_LandingGear::log_wow_state(LG_WOW_State state)
|
|||||||
AP_HAL::micros64(),
|
AP_HAL::micros64(),
|
||||||
(int8_t)gear_state_current, (int8_t)state);
|
(int8_t)gear_state_current, (int8_t)state);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
bool AP_LandingGear::check_before_land(void)
|
bool AP_LandingGear::check_before_land(void)
|
||||||
{
|
{
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
|
|
||||||
#include <AP_Param/AP_Param.h>
|
#include <AP_Param/AP_Param.h>
|
||||||
#include <AP_Common/AP_Common.h>
|
#include <AP_Common/AP_Common.h>
|
||||||
|
#include <AP_Logger/AP_Logger_config.h>
|
||||||
|
|
||||||
/// @class AP_LandingGear
|
/// @class AP_LandingGear
|
||||||
/// @brief Class managing the control of landing gear
|
/// @brief Class managing the control of landing gear
|
||||||
@ -122,8 +123,12 @@ private:
|
|||||||
/// deploy - deploy the landing gear
|
/// deploy - deploy the landing gear
|
||||||
void deploy();
|
void deploy();
|
||||||
|
|
||||||
|
#if HAL_LOGGING_ENABLED
|
||||||
// log weight on wheels state
|
// log weight on wheels state
|
||||||
void log_wow_state(LG_WOW_State state);
|
void log_wow_state(LG_WOW_State state);
|
||||||
|
#else
|
||||||
|
void log_wow_state(LG_WOW_State state) {}
|
||||||
|
#endif
|
||||||
|
|
||||||
static AP_LandingGear *_singleton;
|
static AP_LandingGear *_singleton;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user