ACwing FC firmware
STM32WB55: attitude IEKF, altitude Kalman filter, flight core, protocol v2
Loading...
Searching...
No Matches
app_link.h
Go to the documentation of this file.
1
24#ifndef APP_LINK_H
25#define APP_LINK_H
26
27#include <stdint.h>
28
29#define APPL_CMD_MAX 20u
30#define APPL_QUEUE_LEN 16u
31typedef struct {
32 uint8_t len;
33 uint8_t b[APPL_CMD_MAX];
35
36typedef struct {
37 int16_t thr, yaw, pitch, roll;
38 uint8_t buttons;
39} appl_rc_t;
40
41void appl_reset(void);
42
43/* ---- BLE context (one producer) ---- */
44void appl_on_cmd_write(const uint8_t *data, uint16_t len, uint32_t now_ms);
45void appl_on_connect(void);
46void appl_on_disconnect(void);
47
48/* ---- AppTask (one consumer) ---- */
49int appl_pop(appl_cmd_t *out);
50uint32_t appl_queue_dropped(void);
51
52/* ---- flight core (any reader, never blocks) ---- */
53uint8_t appl_ever(void);
54uint32_t appl_last_ms(void);
55uint8_t appl_link_down(void);
58uint32_t appl_silence_ms(uint32_t now_ms, uint32_t down_floor_ms);
61int appl_rc_read(appl_rc_t *out, uint32_t *t_ms);
62
63#endif /* APP_LINK_H */
float roll
Definition calib_mgr.c:43
double b[6]
Definition calib_mgr.c:53
uint8_t len
Definition app_link.h:32
uint8_t buttons
Definition app_link.h:38
int16_t pitch
Definition app_link.h:37