Paparazzi UAS
v5.8.2_stable-0-g6260b7c
Paparazzi is a free software Unmanned Aircraft System.
|
Rotorcraft main loop. More...
#include <inttypes.h>
#include "mcu.h"
#include "mcu_periph/sys_time.h"
#include "led.h"
#include "subsystems/datalink/telemetry.h"
#include "subsystems/datalink/datalink.h"
#include "subsystems/datalink/downlink.h"
#include "subsystems/settings.h"
#include "subsystems/commands.h"
#include "subsystems/actuators.h"
#include "subsystems/imu.h"
#include "subsystems/gps.h"
#include "subsystems/electrical.h"
#include "firmwares/rotorcraft/autopilot.h"
#include "subsystems/radio_control.h"
#include "firmwares/rotorcraft/stabilization.h"
#include "firmwares/rotorcraft/guidance.h"
#include "subsystems/ahrs.h"
#include "subsystems/ahrs/ahrs_aligner.h"
#include "subsystems/ins.h"
#include "state.h"
#include "firmwares/rotorcraft/main.h"
#include "generated/modules.h"
#include "subsystems/abi.h"
Go to the source code of this file.
Macros | |
#define | MODULES_C |
#define | ABI_C |
#define | BARO_PERIODIC_FREQUENCY 50 |
#define | RC_LOST_MODE AP_MODE_FAILSAFE |
mode to enter when RC is lost while using a mode with RC input (not AP_MODE_NAV) More... | |
Functions | |
int | main (void) |
STATIC_INLINE void | main_init (void) |
STATIC_INLINE void | handle_periodic_tasks (void) |
STATIC_INLINE void | main_periodic (void) |
STATIC_INLINE void | telemetry_periodic (void) |
STATIC_INLINE void | failsafe_check (void) |
STATIC_INLINE void | main_event (void) |
Variables | |
tid_t | main_periodic_tid |
id for main_periodic() timer More... | |
tid_t | modules_tid |
id for modules_periodic_task() timer More... | |
tid_t | failsafe_tid |
id for failsafe_check() timer More... | |
tid_t | radio_control_tid |
id for radio_control_periodic_task() timer More... | |
tid_t | electrical_tid |
id for electrical_periodic() timer More... | |
tid_t | telemetry_tid |
id for telemetry_periodic() timer More... | |
Rotorcraft main loop.
Definition in file main.c.
#define BARO_PERIODIC_FREQUENCY 50 |
Definition at line 101 of file main.c.
Referenced by init_ap(), and main_init().
#define RC_LOST_MODE AP_MODE_FAILSAFE |
mode to enter when RC is lost while using a mode with RC input (not AP_MODE_NAV)
Definition at line 322 of file main.c.
Referenced by failsafe_check().
STATIC_INLINE void failsafe_check | ( | void | ) |
Definition at line 325 of file main.c.
References AP_MODE_FAILSAFE, AP_MODE_HOME, AP_MODE_KILL, AP_MODE_NAV, autopilot_check_in_flight(), autopilot_mode, autopilot_motors_on, autopilot_set_mode(), Electrical::bat_critical, electrical, gps_periodic_check(), GpsIsLost, radio_control, RC_LOST_MODE, RC_OK, RC_REALLY_LOST, and RadioControl::status.
Referenced by handle_periodic_tasks(), and main_init().
STATIC_INLINE void handle_periodic_tasks | ( | void | ) |
Definition at line 241 of file main.c.
Referenced by main(), and pprz_thd().
int main | ( | void | ) |
Definition at line 123 of file main.c.
References get_sys_time_usec(), handle_periodic_tasks(), main_event(), main_init(), and sys_time_usleep().
|
inline |
|
inline |
|
inline |
Definition at line 268 of file main.c.
Referenced by handle_periodic_tasks().
STATIC_INLINE void telemetry_periodic | ( | void | ) |
Definition at line 301 of file main.c.
Referenced by handle_periodic_tasks().
tid_t electrical_tid |
id for electrical_periodic() timer
tid_t failsafe_tid |
id for failsafe_check() timer
tid_t main_periodic_tid |
id for main_periodic() timer
tid_t radio_control_tid |
id for radio_control_periodic_task() timer
tid_t telemetry_tid |
id for telemetry_periodic() timer