Paparazzi UAS  v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
intermcu_fbw.c File Reference

Rotorcraft Inter-MCU on FlyByWire. More...

#include "intermcu_fbw.h"
#include "pprzlink/intermcu_msg.h"
#include "subsystems/radio_control.h"
#include "subsystems/electrical.h"
#include "mcu_periph/uart.h"
#include "modules/telemetry/telemetry_intermcu.h"
#include "modules/spektrum_soft_bind/spektrum_soft_bind_fbw.h"
#include <BOARD_CONFIG>
#include "subsystems/abi.h"
#include "subsystems/gps.h"
+ Include dependency graph for intermcu_fbw.c:

Go to the source code of this file.


#define ABI_C


static void intermcu_parse_msg (void(*commands_frame_handler)(void))
static void gps_cb (uint8_t sender_id, uint32_t stamp, struct GpsState *gps_s)
void intermcu_init (void)
void intermcu_periodic (void)
void intermcu_on_rc_frame (uint8_t fbw_mode)
void intermcu_send_status (uint8_t mode)
void InterMcuEvent (void(*frame_handler)(void))


struct intermcu_t intermcu
uint8_t imcu_msg_buf [128]
 The InterMCU message buffer. More...
pprz_t intermcu_commands [COMMANDS_NB]
bool autopilot_motors_on = false
static abi_event gps_ev

Detailed Description

Rotorcraft Inter-MCU on FlyByWire.

Definition in file intermcu_fbw.c.

Macro Definition Documentation


#define ABI_C

Definition at line 27 of file intermcu_fbw.c.



Definition at line 74 of file intermcu_fbw.c.

Function Documentation

◆ gps_cb()

static void gps_cb ( uint8_t  sender_id,
uint32_t  stamp,
struct GpsState gps_s 

◆ intermcu_init()

void intermcu_init ( void  )

◆ intermcu_on_rc_frame()

◆ intermcu_parse_msg()

static void intermcu_parse_msg ( void(*)(void)  commands_frame_handler)

◆ intermcu_periodic()

void intermcu_periodic ( void  )

Definition at line 96 of file intermcu_fbw.c.

References gps_periodic_check(), intermcu, INTERMCU_LOST, INTERMCU_LOST_CNT, intermcu_t::status, and intermcu_t::time_since_last_frame.

+ Here is the call graph for this function:

◆ intermcu_send_status()

void intermcu_send_status ( uint8_t  mode)

◆ InterMcuEvent()

void InterMcuEvent ( void(*)(void)  frame_handler)

Definition at line 199 of file intermcu_fbw.c.

References c(), intermcu_t::device, imcu_msg_buf, intermcu, intermcu_parse_msg(), intermcu_t::msg_available, and intermcu_t::transport.

Referenced by main_event().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ autopilot_motors_on

bool autopilot_motors_on = false

Definition at line 64 of file intermcu_fbw.c.

Referenced by intermcu_parse_msg(), and main_periodic().

◆ gps_ev

abi_event gps_ev

Definition at line 79 of file intermcu_fbw.c.

Referenced by intermcu_init().

◆ imcu_msg_buf

uint8_t imcu_msg_buf[128]

The InterMCU message buffer.

Definition at line 61 of file intermcu_fbw.c.

Referenced by intermcu_parse_msg(), and InterMcuEvent().

◆ intermcu

struct intermcu_t intermcu
Initial value:
= {
.device = (&((INTERMCU_LINK).device)),
.enabled = true,
.msg_available = false

Definition at line 56 of file intermcu_fbw.c.

Referenced by gps_cb(), intermcu_init(), intermcu_on_rc_frame(), intermcu_parse_msg(), intermcu_periodic(), intermcu_send_status(), and InterMcuEvent().

◆ intermcu_commands

pprz_t intermcu_commands[COMMANDS_NB]

Definition at line 63 of file intermcu_fbw.c.

Referenced by fbw_on_ap_command(), and intermcu_parse_msg().