Paparazzi UAS
v5.10_stable-5-g83a0da5-dirty
Paparazzi is a free software Unmanned Aircraft System.
|
Rotorcraft Inter-MCU interface. More...
#include "std.h"
#include "subsystems/commands.h"
#include "pprzlink/pprz_transport.h"
#include <BOARD_CONFIG>
Go to the source code of this file.
Data Structures | |
struct | intermcu_t |
Macros | |
#define | INTERMCU_AP 0 |
#define | INTERMCU_FBW 1 |
#define | INTERMCU_LOST_CNT 25 /* 50ms with a 512Hz timer TODO fixed value */ |
#define | INTERMCU_SET_CMD_STATUS(_bit) { intermcu.cmd_status |= (1 << _bit); } |
#define | INTERMCU_CLR_CMD_STATUS(_bit) { intermcu.cmd_status &= ~(1 << _bit); } |
#define | INTERMCU_GET_CMD_STATUS(_bit) (intermcu.cmd_status & (1 << _bit)) |
Enumerations | |
enum | intermcu_status { INTERMCU_OK, INTERMCU_LOST } |
enum | intermcu_PX4_baud_status { PX4_BAUD, CHANGING_BAUD, PPRZ_BAUD } |
enum | intermcu_cmd_status { INTERMCU_CMD_MOTORS_ON, INTERMCU_CMD_DISARM } |
Functions | |
void | intermcu_init (void) |
void | intermcu_periodic (void) |
Variables | |
struct intermcu_t | intermcu |
Rotorcraft Inter-MCU interface.
Definition in file intermcu.h.
struct intermcu_t |
Definition at line 68 of file intermcu.h.
Data Fields | ||
---|---|---|
uint8_t | cmd_status | Command status information that is transfered (intermcu_cmd_status) |
struct link_device * | device | Device used for communication. |
bool | enabled | If the InterMCU communication is enabled. |
bool | msg_available | If we have an InterMCU message. |
enum intermcu_status | status | Status of the INTERMCU. |
uint8_t | time_since_last_frame | Time since last frame. |
struct pprz_transport | transport | Transport over communication line (PPRZ) |
#define INTERMCU_AP 0 |
Definition at line 34 of file intermcu.h.
Referenced by intermcu_send_spektrum_bind(), intermcu_set_actuators(), and telemetry_intermcu_send_message().
#define INTERMCU_CLR_CMD_STATUS | ( | _bit | ) | { intermcu.cmd_status &= ~(1 << _bit); } |
Definition at line 64 of file intermcu.h.
Referenced by intermcu_parse_msg(), and opa_controller_periodic().
#define INTERMCU_FBW 1 |
Definition at line 35 of file intermcu.h.
Referenced by intermcu_on_rc_frame(), and intermcu_send_status().
#define INTERMCU_GET_CMD_STATUS | ( | _bit | ) | (intermcu.cmd_status & (1 << _bit)) |
Definition at line 65 of file intermcu.h.
Referenced by intermcu_parse_msg(), and opa_controller_periodic().
#define INTERMCU_LOST_CNT 25 /* 50ms with a 512Hz timer TODO fixed value */ |
Definition at line 38 of file intermcu.h.
Referenced by intermcu_periodic().
#define INTERMCU_SET_CMD_STATUS | ( | _bit | ) | { intermcu.cmd_status |= (1 << _bit); } |
Definition at line 63 of file intermcu.h.
Referenced by intermcu_set_actuators(), and opa_controller_ap_disarm().
enum intermcu_cmd_status |
Enumerator | |
---|---|
INTERMCU_CMD_MOTORS_ON |
The status of autopilot_motors_on. |
INTERMCU_CMD_DISARM |
Whether or not to dis-arm the FBW. |
Definition at line 57 of file intermcu.h.
Enumerator | |
---|---|
PX4_BAUD | |
CHANGING_BAUD | |
PPRZ_BAUD |
Definition at line 50 of file intermcu.h.
enum intermcu_status |
Enumerator | |
---|---|
INTERMCU_OK |
InterMCU communication is OK. |
INTERMCU_LOST |
No interMCU communication anymore. |
Definition at line 44 of file intermcu.h.
void intermcu_init | ( | void | ) |
Definition at line 64 of file intermcu_ap.c.
References DefaultPeriodic, register_periodic_telemetry(), send_status(), sys_time_register_timer(), and intermcu_t::transport.
Referenced by main_init().
void intermcu_periodic | ( | void | ) |
Definition at line 74 of file intermcu_ap.c.
References INTERMCU_LOST, INTERMCU_LOST_CNT, intermcu_t::status, and intermcu_t::time_since_last_frame.
Referenced by main_periodic().
struct intermcu_t intermcu |
Definition at line 41 of file intermcu_ap.c.
Referenced by fbw_on_rc_frame(), fbw_safety_check(), main_periodic(), opa_controller_periodic(), and telemetry_intermcu_send_message().