28 #include "pprzlink/intermcu_msg.h"
33 #include "autopilot.h"
36 #error "INTERMCU UART CAN ONLY SEND 8 COMMANDS OR THE UART WILL BE OVERFILLED"
51 #if PERIODIC_TELEMETRY
57 pprz_msg_send_FBW_STATUS(trans, dev, AC_ID,
68 #if PERIODIC_TELEMETRY
103 pprz_msg_send_IMCU_COMMANDS(&(intermcu.
transport.trans_tx), intermcu.
device,
117 #pragma GCC diagnostic ignored "-Wcast-align"
123 case DL_IMCU_RADIO_COMMANDS: {
127 for (i = 0; i < size; i++) {
138 case DL_IMCU_FBW_STATUS: {
151 #pragma GCC diagnostic pop
arch independent UART (Universal Asynchronous Receiver/Transmitter) API
#define INTERMCU_LOST_CNT
void RadioControlEvent(void(*frame_handler)(void))
static struct fbw_status_t fbw_status
void intermcu_set_enabled(bool value)
struct link_device * device
Device used for communication.
Periodic telemetry system header (includes downlink utility and generated code).
uint8_t cmd_status
Command status information that is transfered (intermcu_cmd_status)
#define INTERMCU_SET_CMD_STATUS(_bit)
struct intermcu_t intermcu
void intermcu_periodic(void)
enum intermcu_status status
Status of the INTERMCU.
pprz_t values[RADIO_CONTROL_NB_CHANNEL]
bool msg_available
If we have an InterMCU message.
uint8_t imcu_msg_buf[128]
The InterMCU message buffer.
bool enabled
If the InterMCU communication is enabled.
No interMCU communication anymore.
static void intermcu_parse_msg(void(*rc_frame_handler)(void))
Interface for electrical status: supply voltage, current, battery status, etc.
The status of autopilot_motors_on.
#define DefaultPeriodic
Set default periodic telemetry.
struct RadioControl radio_control
void intermcu_send_spektrum_bind(void)
struct pprz_transport transport
Transport over communication line (PPRZ)
Rotorcraft Inter-MCU on the autopilot.
static void send_status(struct transport_tx *trans, struct link_device *dev)
static const struct usb_device_descriptor dev
uint8_t time_since_last_frame
Time since last frame.
uint8_t time_since_last_frame
void intermcu_set_actuators(pprz_t *command_values, uint8_t ap_mode)
int8_t register_periodic_telemetry(struct periodic_telemetry *_pt, uint8_t _id, telemetry_cb _cb)
Register a telemetry callback function.