Paparazzi UAS  v5.10_stable-5-g83a0da5-dirty
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 dependency graph for intermcu_fbw.c:

Go to the source code of this file.

Functions

static void intermcu_parse_msg (void(*commands_frame_handler)(void))
 
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))
 

Variables

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
 

Detailed Description

Rotorcraft Inter-MCU on FlyByWire.

Definition in file intermcu_fbw.c.

Function Documentation

void intermcu_init ( void  )

Definition at line 69 of file intermcu_fbw.c.

References DefaultPeriodic, register_periodic_telemetry(), send_status(), sys_time_register_timer(), and intermcu_t::transport.

+ Here is the call graph for this function:

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

Definition at line 130 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  )
void intermcu_send_status ( uint8_t  mode)
void InterMcuEvent ( void(*)(void)  frame_handler)

Definition at line 175 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 62 of file intermcu_fbw.c.

uint8_t imcu_msg_buf[128]

The InterMCU message buffer.

Definition at line 59 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 54 of file intermcu_fbw.c.

pprz_t intermcu_commands[COMMANDS_NB]

Definition at line 61 of file intermcu_fbw.c.

Referenced by fbw_on_ap_command().