29#define LOG_MAGIC 0x474C4341u
30#define LOG_SECTOR 4096u
32#define LOG_HDR_SIZE 20u
33#define LOG_REC_OVERHEAD 3u
34#define LOG_REC_MAX 64u
100 uint8_t
armed, mode, autom, failsafe;
115 int16_t gyro_bias[3];
145_Static_assert(
sizeof(
log_info_t) == 27,
"LR_INFO");
146_Static_assert(
sizeof(
log_time_t) == 12,
"LR_TIME");
147_Static_assert(
sizeof(
log_att_t) == 24,
"LR_ATT");
148_Static_assert(
sizeof(
log_vert_t) == 25,
"LR_VERT");
150_Static_assert(
sizeof(
log_event_t) == 11,
"LR_EVENT");
151_Static_assert(
sizeof(
log_est_t) == 20,
"LR_EST");
152_Static_assert(
sizeof(
log_power_t) == 19,
"LR_POWER");
153_Static_assert(
sizeof(
log_drop_t) == 7,
"LR_DROP");
155uint8_t
log_crc8(
const uint8_t *p, uint32_t
n);
156uint16_t
log_crc16(
const uint8_t *p, uint32_t
n);
uint8_t source
0 ImuTask, 1 BattTask
uint16_t lost
records dropped since the last LR_DROP
uint8_t flags
bit0 in air, 1 landed, 2 RC stale, 3 geofence
uint16_t silence_ms
app link
uint16_t sensors
CAPS bits
uint8_t cells
bit7 = battery present
uint16_t cell_mv
sagged, filtered
uint16_t log_id
increments for every new log
uint16_t crc
CRC-16/CCITT-FALSE of the 18 bytes above
uint32_t serial
global sector write counter: the newest sector has the highest
uint16_t seq
sector index inside the log, 0 = first
uint32_t t0_ms
uptime when the log started
uint32_t t_ms
< LR_TIME: wall clock at uptime t_ms (set by the app)
uint32_t unix_s
UTC, seconds since 1970
int16_t tz_min
local time offset of the phone, minutes
uint8_t thrust
collective ×255
uint8_t flags
bit0 alt valid, 1 ToF valid, 2 ToF ground, 3 flow usable, 4 alt loop
int32_t h_mm
altitude estimate
uint16_t tof_mm
0xFFFF n/a
int32_t h_sp_mm
height set point (when the altitude loop runs)