Paparazzi UAS  v5.15_devel-230-gc96ce27
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
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.

Referenced by intermcu_init().

Function Documentation

static void gps_cb ( uint8_t  sender_id,
uint32_t  stamp,
struct GpsState gps_s 
void intermcu_init ( void  )
static void intermcu_parse_msg ( void(*)(void)  commands_frame_handler)

Definition at line 148 of file intermcu_fbw.c.

References intermcu_t::cmd_status, imcu_msg_buf, INTERMCU_CLR_CMD_STATUS, INTERMCU_CMD_MOTORS_ON, INTERMCU_GET_CMD_STATUS, INTERMCU_OK, msg, received_spektrum_soft_bind(), intermcu_t::status, telemetry_intermcu_on_msg(), and intermcu_t::time_since_last_frame.

Referenced by InterMcuEvent().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void intermcu_periodic ( void  )

Definition at line 96 of file intermcu_fbw.c.

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

+ Here is the call graph for this function:

void intermcu_send_status ( uint8_t  mode)
void InterMcuEvent ( void(*)(void)  frame_handler)

Definition at line 199 of file intermcu_fbw.c.

References intermcu_t::device, imcu_msg_buf, 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

bool autopilot_motors_on = false

Definition at line 64 of file intermcu_fbw.c.

Referenced by main_periodic().

abi_event gps_ev

Definition at line 79 of file intermcu_fbw.c.

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().

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

Definition at line 56 of file intermcu_fbw.c.

pprz_t intermcu_commands[COMMANDS_NB]

Definition at line 63 of file intermcu_fbw.c.

Referenced by fbw_on_ap_command().