flight_recorder.c
depends on woz_log.h flight_recorder.h woz_uwb_facade.h
flowchart TD fr_capture_config --> fr_write_config
API
Fstatic int fr_emit(fr_writer_t *w, uint8_t type, const uint8_t *payload, size_t plen)
Emit one framed record: [u8 type][u16 payload_len][payload]. Latches overflow (and leaves the buffer at its last complete record) if it would not fit.
fr_write_config, fr_write_end, fr_write_ev, fr_write_meta · calls p16, p8, pbytesFvoid fr_capture_ev(uint8_t ep, uint32_t status, uint16_t datalength)
Snapshot the DW3000 registers this entry point will read, then append the
event. Reads are side-effect-free, but they do cost SPI while armed — capture
is opt-in and perturbs walk-up timing exactly like the lab/uwbdiag traces
do, so arm it only for a capture run.
fr_ts5, fr_write_evFsize_t fr_finalize(const uint8_t **buf)
Append the END record once, then hand back the finalised buffer.
fr_dump · calls fr_write_endUndocumented (24)
p8, p16, p32, p64, pbytes, g8, g16, g32, g64, fr_writer_init, fr_write_meta, fr_write_config, fr_write_ev, fr_write_end, fr_reader_init, fr_read_next, fr_ts5, fr_set_enabled, fr_enabled, fr_set_dump_sink, fr_capture_config, fr_emit_line, fr_dump, fr_clear