35#define LOG_POSTROLL_MS 1000u
36#define LOG_TIME_MIN_UNIX 1704067200u
37#define LOG_USB_PAUSE_MS 5000u
43 uint16_t (*sensors)(void);
45 void (*usb_pump)(void);
47 int (*erase_chip)(void);
Receive side of the ACwing Pilot link (HANDOVER_FW.md §2 and §6).
Flight-log store: ring of sectors on a NOR flash (format in log_format.h).
int log_task_usb_app_take(appl_cmd_t *c)
1 if a command was taken
uint8_t log_task_busy(void)
1 while a transfer is in progress (the task runs faster)
void log_task_init(const log_task_cfg_t *cfg)
uint8_t log_task_pct(void)
flash used %, 0xFF = no log flash (SYSTEM.log); any task
int log_task_ble_cmd(const log_cmd_t *c)
0 = queued, -1 = full (answer BUSY)
void log_task_step(uint32_t now_ms)
int log_task_wallclock(uint32_t now_ms, uint32_t *unix_s, uint16_t *ms)
wall clock set by the app (PV2_OP_SET_TIME): 0 and UTC time at uptime 'now', -1 if not set since rese...
void log_task_start(const log_task_cfg_t *cfg)
int log_task_ble_take(log_msg_t *m)
1 if a frame was taken
ACwing Pilot app protocol v2: identifiers and frame layouts.
a log command received over BLE (op, seq, arguments as written by the app)
flash backend; addresses in bytes from the start of the log area
an answer frame for BLE: type and payload (LOG_ENTRY, LOG_DATA, ACK)
const log_flash_t * flash
NULL: no log flash on this board