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"
123 #define autopilot_ResetFlightTimeAndLaunch(_) autopilot_reset_flight_time()
161 #define autopilot_KillThrottle(_kill) autopilot_set_kill_throttle(_kill)
197 #define autopilot_StoreSettings(_) autopilot_store_settings()
204 #define autopilot_ClearSettings(_) autopilot_clear_settings()
void autopilot_event(void)
Autopilot event check function.
bool motors_on
motor status
bool ground_detected
automatic detection of landing
uint8_t mode_auto2
FIXME hide this in a private part ?
uint8_t arming_status
arming status
void autopilot_periodic(void)
Autopilot periodic call at PERIODIC_FREQUENCY.
bool autopilot_set_mode(uint8_t new_autopilot_mode)
Set new autopilot mode.
bool launch
request launch
uint8_t autopilot_get_mode(void)
Get autopilot mode.
pprz_t throttle
throttle level as will be displayed in GCS
void autopilot_set_in_flight(bool in_flight)
Set in flight status.
bool use_rc
enable/disable RC input
void autopilot_send_mode(void)
Report autopilot mode on default downlink channel.
bool autopilot_set_motors_on(bool motors_on)
Start or stop motors May have no effect if motors has auto-start based on throttle setpoint or when t...
struct pprz_autopilot autopilot
Global autopilot structure.
bool detect_ground_once
enable automatic detection of ground (one shot)
void autopilot_SetModeHandler(float new_autopilot_mode)
Handler for setter function with dl_setting.
bool autopilot_get_motors_on(void)
Get motor status.
void autopilot_on_rc_frame(void)
Autopilot RC input event hadler.
bool kill_throttle
allow autopilot to use throttle
void autopilot_check_in_flight(bool motors_on)
Check if airframe is in flight.
uint8_t mode
current autopilot mode
bool autopilot_arming_motors_on(bool motors_on)
Start or stop the motors during arming May not happen when preflight checks are failing.
void autopilot_init(void)
Autopilot initialization function.
bool autopilot_in_flight(void)
Get in flight status.
void autopilot_force_motors_on(bool motors_on)
Force start/stop the motors WARNING This will skip he preflight checks.
bool in_flight
in flight status
void autopilot_set_kill_throttle(bool kill)
Enable or disable motor control from autopilot Also provide macro for dl_setting backward compatibili...
void autopilot_send_version(void)
Report autopilot version on default downlink channel.
bool autopilot_throttle_killed(void)
Get kill status.
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...
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...
void autopilot_failsafe_checks(void)
Autopilot periodic failsafe checks.
void autopilot_reset_in_flight_counter(void)
reset in_flight counter actual implementation is firmware dependent
void autopilot_reset_flight_time(void)
Reset flight time and launch status Also provide macro for dl_setting backward compatibility.
uint16_t flight_time
flight time in seconds
PPRZ Autopilot structure definition.
API to get/set the generic vehicle states.
unsigned short uint16_t
Typedef defining 16 bit unsigned short type.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.