ACwing FC firmware
STM32WB55: attitude IEKF, altitude Kalman filter, flight core, protocol v2
Loading...
Searching...
No Matches
app_task.h
Go to the documentation of this file.
1
17#ifndef APP_TASK_H
18#define APP_TASK_H
19
20#include <stdint.h>
21#include <stddef.h>
22#include "calib_mgr.h"
23
24#define APP_FW_MAJOR 0u
25#define APP_FW_MINOR 6u
26#define APP_FW_PATCH 0u
27
28typedef struct {
29 char hw_rev;
30 uint8_t n_motors;
31 uint8_t motors_built;
32 uint32_t uid[3];
34 size_t (*get_init)(uint8_t *dst, size_t cap);
35 uint8_t batt_monitor;
36 uint16_t board_sensors;
38 uint8_t (*log_pct)(void);
40
44const cal_set_t *app_task_boot(const float mag_hi_default[3]);
45
46void app_task_start(const app_task_cfg_t *cfg);
49void app_init(const app_task_cfg_t *cfg);
50void app_step(uint32_t now_ms);
51
52#endif /* APP_TASK_H */
static size_t get_init(uint8_t *dst, size_t cap)
Definition app_main.c:681
void app_step(uint32_t now_ms)
Definition app_task.c:851
void app_init(const app_task_cfg_t *cfg)
protocol logic, also used by the host test
Definition app_task.c:833
void app_task_start(const app_task_cfg_t *cfg)
app_init + the RTOS task
Definition app_task.c:929
const cal_set_t * app_task_boot(const float mag_hi_default[3])
Before the scheduler starts: loads the flash image (parameters, name, calibrations) and posts the sav...
Definition app_task.c:806
float cap[6][3]
Definition calib_mgr.c:36
Sensor calibrations of protocol v2 (HANDOVER_FW.md ยง10).
uint16_t board_sensors
CAPS bits of the board itself (CURRENT, FLASH_LOG)
Definition app_task.h:36
char hw_rev
CAPS hwRev: 'N' Nucleo bench, 'A' ACwing FC rev A.
Definition app_task.h:29
uint8_t motors_built
Definition app_task.h:31
uint8_t batt_monitor
a BattTask runs: POWER, CHECKS item 1, BATTERY calibration
Definition app_task.h:35
uint8_t n_motors
Definition app_task.h:30