41 #include "generated/airframe.h"
43 #include "autopilot_utils.h"
46 #include "autopilot_firmware.h"
50 #ifndef USE_GENERATED_AUTOPILOT
51 #define USE_GENERATED_AUTOPILOT FALSE
54 #if USE_GENERATED_AUTOPILOT
55 #include "autopilot_generated.h"
57 #include "autopilot_static.h"
120 #define autopilot_ResetFlightTimeAndLaunch(_) autopilot_reset_flight_time()
141 #define autopilot_KillThrottle(_kill) autopilot_set_kill_throttle(_kill)
179 #define autopilot_SetPowerSwitch(_ps) autopilot_set_power_switch(_ps)
186 #define autopilot_StoreSettings(_) autopilot_store_settings()
193 #define autopilot_ClearSettings(_) autopilot_clear_settings()
bool launch
request launch
bool use_rc
enable/disable RC input
void autopilot_init(void)
Autopilot initialization function.
bool in_flight
in flight status
void autopilot_set_in_flight(bool in_flight)
Set in flight status.
uint16_t flight_time
flight time in seconds
bool autopilot_set_mode(uint8_t new_autopilot_mode)
Set new autopilot mode.
bool autopilot_throttle_killed(void)
Get kill status.
void autopilot_check_in_flight(bool motors_on)
Check if airframe is in flight.
void autopilot_store_settings(void)
Store marked settings in flash Try to make sure that we don't write to flash while flying Also provid...
struct pprz_autopilot autopilot
Global autopilot structure.
void autopilot_reset_in_flight_counter(void)
reset in_flight counter actual implementation is firmware dependent
bool detect_ground_once
enable automatic detection of ground (one shot)
bool power_switch
enable/disable power from power switch (if any)
uint8_t mode_auto2
FIXME hide this in a private part ?
void autopilot_reset_flight_time(void)
Reset flight time and launch status Also provide macro for dl_setting backward compatibility.
void autopilot_SetModeHandler(float new_autopilot_mode)
Handler for setter function with dl_setting.
uint8_t arming_status
arming status
PPRZ Autopilot structure definition.
void autopilot_periodic(void)
Autopilot periodic call at PERIODIC_FREQUENCY.
uint8_t autopilot_get_mode(void)
Get autopilot mode.
bool motors_on
motor status
API to get/set the generic vehicle states.
void autopilot_set_power_switch(bool power_switch)
Set power switch state This will actually enable the switch if POWER_SWITCH_GPIO is defined Also prov...
void autopilot_send_mode(void)
Report autopilot mode on default downlink channel.
void autopilot_set_motors_on(bool motors_on)
Start or stop motors May have no effect if motors has auto-start based on throttle setpoint...
void autopilot_set_kill_throttle(bool kill)
Enable or disable motor control from autopilot Also provide macro for dl_setting backward compatibili...
bool autopilot_get_motors_on(void)
Get motor status.
void autopilot_on_rc_frame(void)
Autopilot RC input event hadler.
void autopilot_send_version(void)
Report autopilot version on default downlink channel.
bool kill_throttle
allow autopilot to use throttle
bool ground_detected
automatic detection of landing
uint8_t mode
current autopilot mode
void autopilot_event(void)
Autopilot event check function.
bool autopilot_in_flight(void)
Get in flight status.
void autopilot_clear_settings(void)
Clear marked settings in flash try to make sure that we don't write to flash while flying Also provid...
pprz_t throttle
throttle level as will be displayed in GCS