Paparazzi UAS  v4.2.2_stable-4-gcc32f65
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
main.c File Reference
+ Include dependency graph for main.c:

Go to the source code of this file.

Macros

#define MODULES_C
 

Functions

static void on_gyro_event (void)
 
static void on_accel_event (void)
 
static void on_baro_abs_event (void)
 
static void on_baro_dif_event (void)
 
static void on_gps_event (void)
 
static void on_mag_event (void)
 
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 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 baro_tid
 id for baro_periodic() timer More...
 
tid_t telemetry_tid
 id for telemetry_periodic() timer More...
 

Macro Definition Documentation

#define MODULES_C

Definition at line 25 of file main.c.

Function Documentation

STATIC_INLINE void failsafe_check ( void  )

Definition at line 179 of file main.c.

References AP_MODE_FAILSAFE, AP_MODE_KILL, AP_MODE_NAV, autopilot_mode, autopilot_set_mode(), GpsIsLost, and radio_control.

Referenced by handle_periodic_tasks().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

STATIC_INLINE void handle_periodic_tasks ( void  )

Definition at line 142 of file main.c.

References baro_periodic(), baro_tid, electrical_periodic(), electrical_tid, failsafe_check(), failsafe_tid, main_periodic(), main_periodic_tid, radio_control_tid, sys_time_check_and_ack_timer(), telemetry_periodic(), and telemetry_tid.

Referenced by main().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int main ( void  )

Definition at line 86 of file main.c.

References handle_periodic_tasks(), main_event(), and main_init().

+ Here is the call graph for this function:

static void main_event ( void  )
inline

Definition at line 197 of file main.c.

References autopilot_on_rc_frame(), autopilot_rc, BaroEvent, DatalinkEvent, DetectGroundEvent(), GpsEvent, i2c_event(), ImuEvent, on_accel_event(), on_baro_abs_event(), on_baro_dif_event(), on_gps_event(), on_gyro_event(), on_mag_event(), and RadioControlEvent.

Referenced by main().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void main_periodic ( void  )
inline

Definition at line 157 of file main.c.

References actuators_set(), autopilot_flight_time, autopilot_in_flight, autopilot_motors_on, autopilot_periodic(), datalink_time, imu_periodic(), LED_PERIODIC, and PERIODIC_FREQUENCY.

Referenced by handle_periodic_tasks().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void on_accel_event ( void  )
inlinestatic

Definition at line 223 of file main.c.

References ahrs, AHRS_UNINIT, ahrs_update_accel(), imu, ImuScaleAccel, and Ahrs::status.

Referenced by event_task_ap(), and main_event().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void on_baro_abs_event ( void  )
inlinestatic

Definition at line 252 of file main.c.

References ins_update_baro(), and vi_notify_baro_abs_available().

Referenced by main_event().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void on_baro_dif_event ( void  )
inlinestatic

Definition at line 259 of file main.c.

Referenced by main_event().

+ Here is the caller graph for this function:

static void on_gps_event ( void  )
inlinestatic

Definition at line 263 of file main.c.

References GpsState::fix, gps, GPS_FIX_3D, ins_update_gps(), and vi_notify_gps_available().

Referenced by main_event().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void on_gyro_event ( void  )
inlinestatic

Definition at line 231 of file main.c.

References ahrs, ahrs_align(), ahrs_aligner, AHRS_ALIGNER_LOCKED, ahrs_aligner_run(), ahrs_propagate(), AHRS_UNINIT, imu, ImuScaleGyro, ins_propagate(), AhrsAligner::status, Ahrs::status, and vi_notify_imu_available().

Referenced by event_task_ap(), and main_event().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void on_mag_event ( void  )
inlinestatic

Definition at line 271 of file main.c.

References ahrs, AHRS_RUNNING, ahrs_update_mag(), imu, ImuScaleMag, Ahrs::status, and vi_notify_mag_available().

Referenced by event_task_ap(), and main_event().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

STATIC_INLINE void telemetry_periodic ( void  )

Definition at line 175 of file main.c.

References DefaultChannel, and DefaultDevice.

Referenced by handle_periodic_tasks().

+ Here is the caller graph for this function:

Variable Documentation

tid_t baro_tid

id for baro_periodic() timer

Definition at line 82 of file main.c.

Referenced by handle_periodic_tasks(), and main_init().

tid_t electrical_tid

id for electrical_periodic() timer

Definition at line 81 of file main.c.

Referenced by handle_periodic_tasks(), and main_init().

tid_t failsafe_tid

id for failsafe_check() timer

Definition at line 79 of file main.c.

Referenced by handle_periodic_tasks(), and main_init().

tid_t main_periodic_tid

id for main_periodic() timer

Definition at line 78 of file main.c.

Referenced by handle_periodic_tasks(), and main_init().

tid_t radio_control_tid

id for radio_control_periodic_task() timer

Definition at line 80 of file main.c.

Referenced by handle_periodic_tasks(), and main_init().

tid_t telemetry_tid

id for telemetry_periodic() timer

Definition at line 83 of file main.c.

Referenced by handle_periodic_tasks(), and main_init().