Skip to content

Add detector header and $FSEQ line to every log file - #45

Closed
roman-dvorak wants to merge 12 commits into
AIRDOS04Cfrom
feature/log-header-fseq
Closed

Add detector header and $FSEQ line to every log file#45
roman-dvorak wants to merge 12 commits into
AIRDOS04Cfrom
feature/log-header-fseq

Conversation

@roman-dvorak

@roman-dvorak roman-dvorak commented Apr 22, 2026

Copy link
Copy Markdown
Member

This pull request improves the AIRDOS04 firmware's SD card logging by ensuring that every log file—both the initial file and all rotated files—starts with a complete device identification header and a new $FSEQ line indicating the file's sequence within a measurement session. The documentation is updated to reflect these changes and to describe the new $FSEQ line.

Firmware changes:

  • Every new log file (including after file rotation) now begins with the device identification header ($DOS, $DIG, $ADC, $BATP, $TIME) and a $FSEQ line containing the file sequence number and the measurement session's Unix start time. This ensures each file is self-identifying and can be analyzed independently. [1] [2]
  • Added variables logHeader, measurement_start_unix_time, and file_seq to track and reproduce the header and sequence information across file rotations.

Documentation updates:

  • Updated OUTPUT_FORMAT.md to specify that the device identification header and $FSEQ line are written at the start of every log file, not just the first. The new $FSEQ line is documented, including format, parameters, and examples. [1] [2] [3]

@roman-dvorak

Copy link
Copy Markdown
Member Author

Takhle aktuálně vypadá hlavička z AIRDOS04C:

$DOS,AIRDOS04C,2.0.0-60-CIBuild,0,0824e03e89c50cca48c89cd6f78d630e8b35c1a7,CIBuild,0910410874100851d00ba080a08000b0
$DIG,BATDATUNIT01B,09104108741008520c0ca080a080005e,00
$DIG_NAME,UST
$ADC,USTSIPIN03A,0910410874100851d00ba080a08000b0,ffff
$ADC_NAME,ےےےےےےےےےے
$BATP,0,941
$TIME,10718554,1766148826,1776867380,6974,2026-04-22 14:16:20
$FSEQ,0,1776867380
$RTCCHK,10718555.71,OK,reg07=0x00,reg28=0x95
$START,0,0
$E,38713,22

@kaklik

kaklik commented Apr 23, 2026

Copy link
Copy Markdown
Member

Ok, akorát to pro mne není samovysvětlující, takže je to potřeba zdokumentovat.

kaklik and others added 4 commits April 23, 2026 21:48
Update usb device rules.
The log header was snapshotted once at measurement start with the initial
$TIME line, then reused verbatim on every file rotation, so every rotated
file carried the original timestamp instead of its actual creation time.
Snapshot logHeader without $TIME and append a fresh line from the RTC for
each file.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@slimonslimon

Copy link
Copy Markdown
Collaborator

Since repository requires verified commits, this branch was squashed into single commit, with CL which creates signed commit and this branch was merged into master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants