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

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:

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:

void intermcu_send_spektrum_bind ( void  )

Definition at line 129 of file intermcu_ap.c.

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

Referenced by spektrum_soft_bind_click().

+ Here is the caller graph for this function:

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_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:

void intermcu_set_enabled ( bool  value)

Definition at line 105 of file intermcu_ap.c.

References intermcu_t::enabled.

Referenced by px4flash_event().

+ Here is the caller graph for this function:

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_parse_msg(), intermcu_t::msg_available, and intermcu_t::transport.

+ Here is the call graph for this function:

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, 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

struct fbw_status_t fbw_status
static

Definition at line 47 of file intermcu_ap.c.

Referenced by intermcu_parse_msg(), and send_status().

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

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

Definition at line 41 of file intermcu_ap.c.

Referenced by fbw_on_rc_frame(), fbw_safety_check(), main_periodic(), opa_controller_periodic(), telemetry_intermcu_event(), and telemetry_intermcu_send_message().