|
Paparazzi UAS v7.1_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 | |
| void | intermcu_parse_IMCU_COMMANDS (uint8_t *buf) |
| Datalink event functions. | |
| 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. | |
| 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 73 of file intermcu_fbw.c.
Referenced by intermcu_init().
| #define IMCU_RADIO_CONTROL_ID ABI_BROADCAST |
Definition at line 64 of file intermcu_fbw.c.
Referenced by intermcu_init().
Definition at line 221 of file intermcu_fbw.c.
References LlaCoor_i::alt, GpsState::course, ecef_int_from_gps(), ecef_vel_int_from_gps(), GpsState::fix, GpsState::gspeed, GpsState::hmsl, intermcu, GpsState::lla_pos, GpsState::num_sv, GpsState::pacc, GpsState::sacc, EcefCoor_i::x, EcefCoor_i::y, and EcefCoor_i::z.
| void intermcu_event | ( | void | ) |
Definition at line 99 of file intermcu_fbw.c.
References datalink_nb_msgs, datalink_time, dl_parse_msg(), imcu_msg_buf, intermcu, and intermcu_dl_on_msg().
Referenced by main_fbw_event().
| void intermcu_forward_uplink | ( | uint8_t * | buf | ) |
Definition at line 176 of file intermcu_fbw.c.
References intermcu, and intermcu_dl_repack().
| void intermcu_init | ( | void | ) |
Definition at line 79 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(), and send_status().
| void intermcu_parse_IMCU_COMMANDS | ( | uint8_t * | buf | ) |
Datalink event functions.
Definition at line 151 of file intermcu_fbw.c.
References intermcu, intermcu_ap_motors_on, INTERMCU_CLR_CMD_STATUS, INTERMCU_CMD_MOTORS_ON, intermcu_commands, INTERMCU_GET_CMD_STATUS, and INTERMCU_OK.
| void intermcu_parse_IMCU_SPEKTRUM_SOFT_BIND | ( | uint8_t * | buf | ) |
Definition at line 169 of file intermcu_fbw.c.
References received_spektrum_soft_bind().
| void intermcu_periodic | ( | void | ) |
Definition at line 89 of file intermcu_fbw.c.
References DefaultPeriodic, intermcu, INTERMCU_LOST, and INTERMCU_LOST_CNT.
| void intermcu_send_status | ( | void | ) |
send fbw status message
Definition at line 136 of file intermcu_fbw.c.
References electrical, fbw_mode, intermcu, and radio_control.
|
static |
Definition at line 185 of file intermcu_fbw.c.
References 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, and RADIO_YAW.
|
static |
Definition at line 75 of file intermcu_fbw.c.
| uint8_t imcu_msg_buf[256] |
The InterMCU message buffer.
Definition at line 56 of file intermcu_fbw.c.
| struct intermcu_t intermcu |
Definition at line 51 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_commands(), intermcu_send_spektrum_bind(), intermcu_send_status(), intermcu_set_enabled(), opa_controller_periodic(), rc_cb(), and rc_cb().
| bool intermcu_ap_motors_on = false |
Definition at line 59 of file intermcu_fbw.c.
Referenced by intermcu_parse_IMCU_COMMANDS(), and main_task_periodic().
| pprz_t intermcu_commands[COMMANDS_NB] |
Definition at line 58 of file intermcu_fbw.c.
Referenced by intermcu_parse_IMCU_COMMANDS(), and main_task_periodic().
|
static |
Definition at line 66 of file intermcu_fbw.c.