Paparazzi UAS  v5.0.5_stable-7-g4b8bbb7
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
lisa_stm_passthrough_main.c File Reference
#include "mcu.h"
#include "mcu_periph/uart.h"
#include "mcu_periph/sys_time.h"
#include "subsystems/datalink/downlink.h"
#include "subsystems/commands.h"
#include "subsystems/actuators.h"
#include "subsystems/actuators/actuators_pwm.h"
#include "subsystems/imu.h"
#include "subsystems/radio_control.h"
#include "autopilot.h"
#include "subsystems/ins.h"
#include "guidance.h"
#include "navigation.h"
#include "lisa/lisa_overo_link.h"
#include "generated/airframe.h"
#include "subsystems/ahrs.h"
#include "stm32/can.h"
#include "csc_msg_def.h"
#include "csc_protocol.h"
#include "subsystems/sensors/baro.h"
#include "mcu_periph/adc.h"
+ Include dependency graph for lisa_stm_passthrough_main.c:

Go to the source code of this file.

Macros

#define ActuatorsCommit()   actuators_pwm_commit();
 
#define actuators   actuators_pwm_values
 
#define ChopServo(x, a, b)   Chop(x, a, b)
 
#define Actuator(i)   actuators[i]
 
#define SERVOS_TICS_OF_USEC(_s)   (_s)
 

Functions

static void main_init (void)
 
static void main_periodic (void)
 
static void main_event (void)
 
static void on_gyro_accel_event (void)
 
static void on_accel_event (void)
 
static void on_mag_event (void)
 
static void on_overo_link_msg_received (void)
 
static void on_overo_link_lost (void)
 
static void on_overo_link_crc_failed (void)
 
static void on_rc_message (void)
 
static void on_vane_msg (void *data)
 
int main (void)
 
static void check_radio_lost (void)
 
static void main_on_baro_diff (void)
 
static void main_on_baro_abs (void)
 

Variables

static bool_t new_radio_msg
 
static bool_t new_baro_diff
 
static bool_t new_baro_abs
 
static bool_t new_vane
 
static bool_t new_adc
 
struct CscVaneMsg csc_vane_msg
 
static struct adc_buf adc0_buf
 
static struct adc_buf adc1_buf
 
static struct adc_buf adc2_buf
 
static struct adc_buf adc3_buf
 
uint8_t adc_new_data_trigger
 
struct CscServoCmd csc_servo_cmd
 

Macro Definition Documentation

#define Actuator (   i)    actuators[i]

Definition at line 88 of file lisa_stm_passthrough_main.c.

#define actuators   actuators_pwm_values
#define ActuatorsCommit ( )    actuators_pwm_commit();

Definition at line 84 of file lisa_stm_passthrough_main.c.

Referenced by on_rc_message().

#define ChopServo (   x,
  a,
 
)    Chop(x, a, b)

Definition at line 87 of file lisa_stm_passthrough_main.c.

#define SERVOS_TICS_OF_USEC (   _s)    (_s)

Definition at line 89 of file lisa_stm_passthrough_main.c.

Function Documentation

static void check_radio_lost ( void  )
static

Definition at line 143 of file lisa_stm_passthrough_main.c.

References commands_failsafe, radio_control, RC_REALLY_LOST, SetActuatorsFromCommands, and RadioControl::status.

Referenced by main_periodic().

+ Here is the caller graph for this function:

int main ( void  )

Definition at line 91 of file lisa_stm_passthrough_main.c.

References main_event(), main_init(), main_periodic(), and sys_time_check_and_ack_timer().

+ Here is the call graph for this function:

static void main_event ( void  )
inlinestatic

Definition at line 340 of file lisa_stm_passthrough_main.c.

References BaroEvent, ImuEvent, main_on_baro_abs(), main_on_baro_diff(), on_accel_event(), on_gyro_accel_event(), on_mag_event(), on_overo_link_crc_failed(), on_overo_link_msg_received(), on_rc_message(), OveroLinkEvent, and RadioControlEvent.

Referenced by main().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void main_on_baro_abs ( void  )
inlinestatic

Definition at line 336 of file lisa_stm_passthrough_main.c.

References new_baro_abs, and TRUE.

Referenced by main_event().

+ Here is the caller graph for this function:

static void main_on_baro_diff ( void  )
inlinestatic

Definition at line 332 of file lisa_stm_passthrough_main.c.

References new_baro_diff, and TRUE.

Referenced by main_event().

+ Here is the caller graph for this function:

static void main_periodic ( void  )
inlinestatic
static void on_accel_event ( void  )
inlinestatic

Definition at line 286 of file lisa_stm_passthrough_main.c.

Referenced by main_event().

+ Here is the caller graph for this function:

static void on_gyro_accel_event ( void  )
inlinestatic

Definition at line 289 of file lisa_stm_passthrough_main.c.

References ahrs, ahrs_align(), ahrs_aligner, AHRS_ALIGNER_LOCKED, ahrs_aligner_run(), ahrs_propagate(), AHRS_UNINIT, ahrs_update_accel(), imu, ImuScaleAccel, ImuScaleGyro, ins_propagate(), LisaOveroLink::msg, overo_link, AhrsAligner::status, Ahrs::status, and LisaOveroLink::up.

Referenced by 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 307 of file lisa_stm_passthrough_main.c.

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

Referenced by main_event().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void on_overo_link_crc_failed ( void  )
inlinestatic

Definition at line 283 of file lisa_stm_passthrough_main.c.

Referenced by main_event().

+ Here is the caller graph for this function:

static void on_overo_link_lost ( void  )
inlinestatic

Definition at line 280 of file lisa_stm_passthrough_main.c.

Referenced by main_periodic().

+ Here is the caller graph for this function:

static void on_rc_message ( void  )
inlinestatic

Definition at line 184 of file lisa_stm_passthrough_main.c.

References actuators, ActuatorsCommit, autopilot_on_rc_frame(), commands, new_radio_msg, radio_control, RADIO_KILL, RADIO_MODE, SetActuatorsFromCommands, TRUE, and RadioControl::values.

Referenced by main_event().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void on_vane_msg ( void *  data)
inlinestatic

Definition at line 316 of file lisa_stm_passthrough_main.c.

References csc_vane_msg, DefaultChannel, DefaultDevice, new_vane, and TRUE.

Referenced by main_init().

+ Here is the caller graph for this function:

Variable Documentation

struct adc_buf adc0_buf
static
struct adc_buf adc1_buf
static
struct adc_buf adc2_buf
static

Definition at line 77 of file lisa_stm_passthrough_main.c.

Referenced by main_init(), and on_overo_link_msg_received().

struct adc_buf adc3_buf
static

Definition at line 78 of file lisa_stm_passthrough_main.c.

Referenced by main_init(), and on_overo_link_msg_received().

uint8_t adc_new_data_trigger

Definition at line 104 of file adc_arch.c.

Referenced by main_periodic().

struct CscServoCmd csc_servo_cmd

Definition at line 82 of file lisa_stm_passthrough_main.c.

Referenced by on_overo_link_msg_received().

struct CscVaneMsg csc_vane_msg

Definition at line 73 of file lisa_stm_passthrough_main.c.

Referenced by main_init(), on_overo_link_msg_received(), and on_vane_msg().

bool_t new_adc
static
bool_t new_baro_abs
static
bool_t new_baro_diff
static
bool_t new_radio_msg
static
bool_t new_vane
static

Definition at line 69 of file lisa_stm_passthrough_main.c.

Referenced by main_init(), on_overo_link_msg_received(), and on_vane_msg().