Paparazzi UAS
v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
Inter-MCU on FlyByWire side. More...
#include "modules/intermcu/intermcu_fbw.h"
#include "main_fbw.h"
#include "pprzlink/intermcu_msg.h"
#include "generated/modules.h"
#include "modules/radio_control/radio_control.h"
#include "modules/energy/electrical.h"
#include "modules/datalink/datalink.h"
#include "modules/core/abi.h"
#include "modules/spektrum_soft_bind/spektrum_soft_bind_fbw.h"
#include <BOARD_CONFIG>
#include "modules/gps/gps.h"
Go to the source code of this file.
Macros | |
#define | IMCU_RADIO_CONTROL_ID ABI_BROADCAST |
#define | IMCU_GPS_ID GPS_MULTI_ID |
Functions | |
static void | rc_cb (uint8_t sender_id, struct RadioControl *rc) |
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_event (void) |
void | intermcu_send_status (void) |
send fbw status message More... | |
void | intermcu_parse_IMCU_COMMANDS (uint8_t *buf) |
Datalink event functions. More... | |
void | intermcu_parse_IMCU_SPEKTRUM_SOFT_BIND (uint8_t *buf) |
void | intermcu_forward_uplink (uint8_t *buf) |
Variables | |
struct intermcu_t | intermcu |
uint8_t | imcu_msg_buf [256] |
The InterMCU message buffer. More... | |
pprz_t | intermcu_commands [COMMANDS_NB] |
bool | intermcu_ap_motors_on = false |
static abi_event | rc_ev |
static abi_event | gps_ev |
Inter-MCU on FlyByWire side.
Definition in file intermcu_fbw.c.
#define IMCU_GPS_ID GPS_MULTI_ID |
Definition at line 85 of file intermcu_fbw.c.
#define IMCU_RADIO_CONTROL_ID ABI_BROADCAST |
Definition at line 76 of file intermcu_fbw.c.
Definition at line 242 of file intermcu_fbw.c.
References LlaCoor_i::alt, GpsState::course, intermcu_t::device, GpsState::ecef_pos, GpsState::ecef_vel, GpsState::fix, GpsState::gspeed, GpsState::hmsl, intermcu, GpsState::lla_pos, GpsState::num_sv, GpsState::pacc, GpsState::sacc, intermcu_t::transport, EcefCoor_i::x, EcefCoor_i::y, and EcefCoor_i::z.
Referenced by intermcu_init().
void intermcu_event | ( | void | ) |
Definition at line 115 of file intermcu_fbw.c.
References datalink_nb_msgs, datalink_time, intermcu_t::device, dl_parse_msg(), intermcu_t::enabled, imcu_msg_buf, intermcu, intermcu_dl_on_msg(), intermcu_t::msg_available, intermcu_t::time_since_last_frame, and intermcu_t::transport.
Referenced by main_fbw_event().
void intermcu_forward_uplink | ( | uint8_t * | buf | ) |
Definition at line 197 of file intermcu_fbw.c.
References intermcu_t::device, intermcu, intermcu_dl_repack(), and intermcu_t::transport.
void intermcu_init | ( | void | ) |
Definition at line 91 of file intermcu_fbw.c.
References DefaultPeriodic, gps_cb(), gps_ev, IMCU_GPS_ID, IMCU_RADIO_CONTROL_ID, intermcu, rc_cb(), rc_ev, register_periodic_telemetry(), send_status(), sys_time_register_timer(), and intermcu_t::transport.
void intermcu_parse_IMCU_COMMANDS | ( | uint8_t * | buf | ) |
Datalink event functions.
Definition at line 172 of file intermcu_fbw.c.
References intermcu_t::cmd_status, intermcu, intermcu_ap_motors_on, INTERMCU_CLR_CMD_STATUS, INTERMCU_CMD_MOTORS_ON, intermcu_commands, INTERMCU_GET_CMD_STATUS, INTERMCU_OK, intermcu_t::status, and intermcu_t::time_since_last_frame.
void intermcu_parse_IMCU_SPEKTRUM_SOFT_BIND | ( | uint8_t * | buf | ) |
Definition at line 190 of file intermcu_fbw.c.
References received_spektrum_soft_bind().
void intermcu_periodic | ( | void | ) |
Definition at line 105 of file intermcu_fbw.c.
References DefaultPeriodic, intermcu_t::device, intermcu, INTERMCU_LOST, INTERMCU_LOST_CNT, intermcu_t::status, intermcu_t::time_since_last_frame, and intermcu_t::transport.
void intermcu_send_status | ( | void | ) |
send fbw status message
Definition at line 157 of file intermcu_fbw.c.
References Electrical::current, intermcu_t::device, electrical, fbw_mode, RadioControl::frame_rate, intermcu, radio_control, RadioControl::status, intermcu_t::transport, and Electrical::vsupply.
|
static |
Definition at line 206 of file intermcu_fbw.c.
References intermcu_t::device, fbw_mode, intermcu, INTERMCU_RADIO_AUX1, INTERMCU_RADIO_AUX2, INTERMCU_RADIO_AUX3, INTERMCU_RADIO_CONTROL_NB_CHANNEL, INTERMCU_RADIO_KILL_SWITCH, INTERMCU_RADIO_MODE, INTERMCU_RADIO_PITCH, INTERMCU_RADIO_ROLL, INTERMCU_RADIO_THROTTLE, INTERMCU_RADIO_YAW, RADIO_AUX1, RADIO_AUX2, RADIO_AUX3, radio_control, RADIO_KILL_SWITCH, RADIO_MODE, RADIO_PITCH, RADIO_ROLL, RADIO_THROTTLE, RADIO_YAW, intermcu_t::transport, and RadioControl::values.
Referenced by intermcu_init().
|
static |
Definition at line 87 of file intermcu_fbw.c.
Referenced by intermcu_init().
uint8_t imcu_msg_buf[256] |
The InterMCU message buffer.
Definition at line 64 of file intermcu_fbw.c.
Referenced by intermcu_event().
struct intermcu_t intermcu |
Definition at line 1 of file intermcu_fbw.c.
Referenced by fbw_safety_check(), gps_cb(), intermcu_event(), intermcu_forward_uplink(), intermcu_init(), intermcu_parse_IMCU_COMMANDS(), intermcu_periodic(), intermcu_send_status(), main_task_periodic(), opa_controller_periodic(), and rc_cb().
bool intermcu_ap_motors_on = false |
Definition at line 67 of file intermcu_fbw.c.
Referenced by intermcu_parse_IMCU_COMMANDS(), and main_task_periodic().
pprz_t intermcu_commands[COMMANDS_NB] |
Definition at line 66 of file intermcu_fbw.c.
Referenced by intermcu_parse_IMCU_COMMANDS(), and main_task_periodic().
|
static |
Definition at line 78 of file intermcu_fbw.c.
Referenced by intermcu_init().