43 #include "generated/airframe.h"
51 #if defined RADIO_CONTROL || RADIO_CONTROL_AUTO1
70 #define STATUS_RADIO_OK 0
71 #define STATUS_RADIO_REALLY_LOST 1
72 #define STATUS_MODE_AUTO 2
73 #define STATUS_MODE_FAILSAFE 3
74 #define AVERAGED_CHANNELS_SENT 4
75 #define MASK_FBW_CHANGED 0xf
87 extern uint8_t time_since_last_ap;
90 #define AP_STALLED_TIME 30 // 500ms with a 60Hz timer
93 static inline void inter_mcu_init(
void)
95 fbw_state->status = 0;
96 fbw_state->nb_err = 0;
103 static inline void inter_mcu_fill_fbw_state(
void)
119 #endif // RADIO_CONTROL
123 fbw_state->status =
status;
128 #if defined SINGLE_MCU
135 static inline void inter_mcu_event_task(
void)
137 time_since_last_ap = 0;
142 static inline void inter_mcu_periodic_task(
void)
144 if (time_since_last_ap >= AP_STALLED_TIME) {
148 inter_mcu_fill_fbw_state();
152 time_since_last_ap++;
int32_t current
current in milliamps
uint16_t vsupply
Supply voltage in deciVolt.
pprz_t command_pitch_trim
volatile bool_t inter_mcu_received_ap
volatile bool_t inter_mcu_received_fbw
pprz_t values[RADIO_CONTROL_NB_CHANNEL]
struct fbw_state * fbw_state
int32_t current
Supply current in milliAmpere.
struct ap_state * ap_state
Interface for electrical status: supply voltage, current, battery status, etc.
pprz_t command_roll_trim
Trim commands for roll, pitch and yaw.
struct RadioControl radio_control
#define RADIO_CONTROL_NB_CHANNEL
float energy
Energy consumption (mAh) This is the ap copy of the measurement from fbw.
pprz_t commands[COMMANDS_NB]
Storage of intermediate command values.
uint16_t vsupply
supply voltage in decivolts
float energy
consumed energy in mAh
struct Electrical electrical
FBW ( FlyByWire ) process API.