Paparazzi UAS
v5.15_devel-230-gc96ce27
Paparazzi is a free software Unmanned Aircraft System.
|
Rover 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 "autopilot.h"
#include "subsystems/radio_control.h"
#include "subsystems/ahrs.h"
#include "state.h"
#include "firmwares/rover/main_ap.h"
#include "generated/modules.h"
#include "subsystems/abi.h"
#include "subsystems/navigation/waypoints.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 | |
void | main_init (void) |
Main initialization. More... | |
void | handle_periodic_tasks (void) |
void | main_periodic (void) |
void | telemetry_periodic (void) |
void | failsafe_check (void) |
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... | |
Rover main loop.
Definition in file main_ap.c.
#define BARO_PERIODIC_FREQUENCY 50 |
Definition at line 94 of file main_ap.c.
Referenced by init_ap(), and main_init().
#define RC_LOST_MODE AP_MODE_FAILSAFE |
void failsafe_check | ( | void | ) |
Definition at line 267 of file main_ap.c.
References AP_MODE_FAILSAFE, AP_MODE_FLIP, AP_MODE_GUIDED, AP_MODE_HOME, AP_MODE_KILL, AP_MODE_MODULE, AP_MODE_NAV, autopilot_check_in_flight(), autopilot_get_mode(), autopilot_get_motors_on(), autopilot_set_mode(), Electrical::bat_critical, electrical, GpsIsLost, radio_control, RC_LOST_MODE, RC_OK, RC_REALLY_LOST, and RadioControl::status.
void handle_periodic_tasks | ( | void | ) |
Definition at line 189 of file main_ap.c.
References baro_periodic(), electrical_periodic(), failsafe_check(), main_periodic(), radio_control_periodic_task(), sys_time_check_and_ack_timer(), and telemetry_periodic().
Referenced by main(), nps_autopilot_run_step(), thd_ap(), and thd_fbw().
|
inline |
Definition at line 272 of file main_ap.c.
References autopilot, autopilot_event(), autopilot_on_rc_frame(), BaroEvent, mcu_event(), RadioControlEvent, and pprz_autopilot::use_rc.
|
inline |
Main initialization.
Definition at line 115 of file main_ap.c.
References ahrs_init(), autopilot_generated_init(), autopilot_init(), autopilot_static_init(), baro_init(), BARO_PERIODIC_FREQUENCY, Imu::body_to_imu, downlink_init(), electrical_init(), failsafe_check(), imu, intermcu_init(), mcu_init(), mcu_int_enable, motor_mixing_init(), orientationGetQuat_f(), radio_control_init(), settings_init(), stateInit(), sys_time_register_timer(), TELEMETRY_FREQUENCY, and waypoints_localize_all().
|
inline |
Definition at line 224 of file main_ap.c.
References autopilot, autopilot_get_mode(), autopilot_in_flight(), autopilot_periodic(), commands, datalink_time, pprz_autopilot::flight_time, intermcu_periodic(), intermcu_set_actuators(), LED_PERIODIC, and throttle_curve_run().
void telemetry_periodic | ( | void | ) |
Definition at line 243 of file main_ap.c.
References autopilot_send_version(), DefaultChannel, DefaultDevice, and DefaultPeriodic.
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