Paparazzi UAS  v6.2_unstable
Paparazzi is a free software Unmanned Aircraft System.
intermcu_ap.c File Reference

Inter-MCU on the AP side. More...

#include "modules/intermcu/intermcu_ap.h"
#include "pprzlink/intermcu_msg.h"
#include "modules/energy/electrical.h"
#include "generated/modules.h"
#include "autopilot.h"
#include "generated/periodic_telemetry.h"
#include "modules/datalink/telemetry.h"
+ Include dependency graph for intermcu_ap.c:

Go to the source code of this file.

Macros

#define PERIODIC_C_INTERMCU
 

Functions

static void send_status (struct transport_tx *trans, struct link_device *dev)
 
void intermcu_init (void)
 
void intermcu_periodic (void)
 
void intermcu_event (void)
 
void intermcu_set_enabled (bool value)
 enable/disable intermcu link More...
 
void intermcu_send_commands (pprz_t *command_values, uint8_t ap_mode)
 send command vector over intermcu link instead of actuators More...
 
void intermcu_send_spektrum_bind (void)
 send binding signal for spektrum receiver More...
 
void intermcu_parse_IMCU_FBW_STATUS (uint8_t *buf)
 Datalink event functions. More...
 

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

Inter-MCU on the AP side.

Definition in file intermcu_ap.c.

Macro Definition Documentation

◆ PERIODIC_C_INTERMCU

#define PERIODIC_C_INTERMCU

Definition at line 27 of file intermcu_ap.c.

Function Documentation

◆ intermcu_event()

◆ intermcu_init()

void intermcu_init ( void  )

Definition at line 69 of file intermcu_ap.c.

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

+ Here is the call graph for this function:

◆ intermcu_parse_IMCU_FBW_STATUS()

void intermcu_parse_IMCU_FBW_STATUS ( uint8_t buf)

◆ intermcu_periodic()

◆ intermcu_send_commands()

void intermcu_send_commands ( pprz_t command_values,
uint8_t  ap_mode 
)

send command vector over intermcu link instead of actuators

Definition at line 129 of file intermcu_ap.c.

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

+ Here is the call graph for this function:

◆ intermcu_send_spektrum_bind()

void intermcu_send_spektrum_bind ( void  )

send binding signal for spektrum receiver

Definition at line 147 of file intermcu_ap.c.

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

Referenced by spektrum_soft_bind_click().

+ Here is the caller graph for this function:

◆ intermcu_set_enabled()

void intermcu_set_enabled ( bool  value)

enable/disable intermcu link

Definition at line 123 of file intermcu_ap.c.

References intermcu_t::enabled, and intermcu.

Referenced by px4flash_event().

+ Here is the caller graph for this function:

◆ send_status()

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

Definition at line 60 of file intermcu_ap.c.

References Electrical::current, dev, 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 53 of file intermcu_ap.c.

Referenced by intermcu_parse_IMCU_FBW_STATUS(), and send_status().

◆ imcu_msg_buf

uint8_t imcu_msg_buf[128]

The InterMCU message buffer.

Definition at line 51 of file intermcu_ap.c.

Referenced by intermcu_event().

◆ intermcu

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

Definition at line 45 of file intermcu_ap.c.

Referenced by intermcu_event(), intermcu_init(), intermcu_periodic(), intermcu_send_commands(), intermcu_send_spektrum_bind(), and intermcu_set_enabled().