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

Rotorcraft Inter-MCU on the autopilot. More...

#include "intermcu_ap.h"
#include "pprzlink/intermcu_msg.h"
#include "subsystems/radio_control.h"
#include "mcu_periph/uart.h"
#include "subsystems/electrical.h"
#include "autopilot.h"
#include "subsystems/datalink/telemetry.h"
+ Include dependency graph for intermcu_ap.c:

Go to the source code of this file.

Functions

static void intermcu_parse_msg (void(*rc_frame_handler)(void))
 
static void send_status (struct transport_tx *trans, struct link_device *dev)
 
void intermcu_init (void)
 
void intermcu_periodic (void)
 
void intermcu_set_enabled (bool value)
 
void intermcu_set_actuators (pprz_t *command_values, uint8_t ap_mode)
 
void intermcu_send_spektrum_bind (void)
 
void RadioControlEvent (void(*frame_handler)(void))
 

Variables

struct intermcu_t intermcu
 
uint8_t imcu_msg_buf [128]
 The InterMCU message buffer. More...
 
static struct fbw_status_t fbw_status
 

Detailed Description

Rotorcraft Inter-MCU on the autopilot.

Definition in file intermcu_ap.c.

Function Documentation

◆ intermcu_init()

void intermcu_init ( void  )

Definition at line 71 of file intermcu_ap.c.

Referenced by main_init().

+ Here is the caller graph for this function:

◆ intermcu_parse_msg()

◆ intermcu_periodic()

void intermcu_periodic ( void  )

Definition at line 90 of file intermcu_ap.c.

Referenced by main_periodic().

+ Here is the caller graph for this function:

◆ intermcu_send_spektrum_bind()

void intermcu_send_spektrum_bind ( void  )

Definition at line 129 of file intermcu_ap.c.

References intermcu_t::device, intermcu_t::enabled, intermcu, INTERMCU_AP, and intermcu_t::transport.

Referenced by spektrum_soft_bind_click().

+ Here is the caller graph for this function:

◆ intermcu_set_actuators()

void intermcu_set_actuators ( pprz_t command_values,
uint8_t  ap_mode 
)

Definition at line 111 of file intermcu_ap.c.

References autopilot_get_motors_on(), intermcu_t::cmd_status, intermcu_t::device, intermcu_t::enabled, intermcu, INTERMCU_AP, INTERMCU_CMD_MOTORS_ON, INTERMCU_SET_CMD_STATUS, and intermcu_t::transport.

Referenced by main_periodic().

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

◆ intermcu_set_enabled()

void intermcu_set_enabled ( bool  value)

Definition at line 105 of file intermcu_ap.c.

References intermcu_t::enabled, and intermcu.

Referenced by px4flash_event().

+ Here is the caller graph for this function:

◆ RadioControlEvent()

void RadioControlEvent ( void(*)(void)  frame_handler)

Definition at line 231 of file intermcu_ap.c.

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

+ Here is the call graph for this function:

◆ send_status()

static void send_status ( struct transport_tx *  trans,
struct link_device *  dev 
)
static

Definition at line 62 of file intermcu_ap.c.

References Electrical::current, dev, fbw_status_t::electrical, fbw_status, fbw_status_t::frame_rate, fbw_status_t::mode, fbw_status_t::rc_status, and Electrical::vsupply.

Referenced by intermcu_init().

+ Here is the caller graph for this function:

Variable Documentation

◆ fbw_status

struct fbw_status_t fbw_status
static

Definition at line 47 of file intermcu_ap.c.

Referenced by intermcu_parse_msg(), and send_status().

◆ imcu_msg_buf

uint8_t imcu_msg_buf[128]

The InterMCU message buffer.

Definition at line 46 of file intermcu_ap.c.

Referenced by intermcu_parse_msg(), and RadioControlEvent().

◆ intermcu