Race timer sets DVR filenames to the heat you flew, e.g. hdz_0042-WinterCup-Mains-A-R5-H1.mp4#613
Race timer sets DVR filenames to the heat you flew, e.g. hdz_0042-WinterCup-Mains-A-R5-H1.mp4#613bob9 wants to merge 2 commits into
Conversation
A race timer can push a label for the next DVR recording through the ELRS backpack (e.g. "WinterCup-Qual1-H2"). While a label is set, recordings are named YYYY-MM-DD-NNNN-label.ext - date and file index lead so a plain filename sort lists the day in recording order; NNNN is the existing contiguous DVR counter, which now also scans labelled files so indexes never collide. Snapshot .jpg previews and split segments share the name. The label is sanitised to filename-safe characters, capped at 32 chars (names stay under the playback list's 64-char buffer), expires 5 minutes after it was set so later non-race recordings fall back to the standard naming, and an empty payload clears it. With no label, nothing changes.
Labelled recordings now keep whatever name the user's naming setting would have produced and just append -label before the extension: hdz_0042-WinterCup-Mains-A-R5-H1.mp4 (contiguous) or 20260713-141502-WinterCup-Mains-A-R5-H1.mp4 (date naming). Previously a label switched recordings to a separate YYYY-MM-DD-NNNN-label scheme. Because labelled names keep the hdz_ prefix and index position, the stock contiguous counter sees them natively and disk_maxLabeledIndex is no longer needed. The label cap rises from 32 to 43 chars (REC_labelMAXLEN 44) so the race description can be as long as possible: worst case is date naming at 15 + 1 + 43 + 4 = 63 chars, still inside the playback list's 64-char name buffer. Longer labels are silently truncated at both entry points (backpack MSP and record conf), never rejected.
|
Pushed a follow-up commit that changes how the label lands in the filename, after trying the first cut at a race meet on paper. Originally a label switched recordings to a separate Also raised the label cap from 32 to 43 chars so the race description can carry the meeting name properly. 43 is the exact budget: worst case is date naming (15) + dash + label + Description updated to match. |
Summary
Lets a race timer name the next DVR recording (e.g.
WinterCup-Mains-A-R5-H1) by sending a newMSP_SET_DVR_NAME(0x030F) message through the ELRS backpack.elrs.chandles the new MSP command and hands the payload todvr_set_race_label().dvr.cstores a filename-safe copy of the label (alnum kept, spaces become-, everything else dropped) with a 5-minute TTL so a recording made well after the heat doesn't inherit the race's name; an empty payload clears it. The label is written to the record conf on every update so a stale value never survives.record/) appends-labelto the stock filename, just before the extension, for both naming modes —hdz_0042-WinterCup-Mains-A-R5-H1.mp4(contiguous) or20260718-141502-WinterCup-Mains-A-R5-H1.mp4(date). Snapshot.jpgpreviews and split segments share the name. Because the stock prefix and index position are untouched, the existing contiguous file counter handles labelled names with no changes.Labels are capped at 43 chars (
REC_labelMAXLEN44) — the worst case (date naming + label +.mp4) is 63 chars, still inside the playback list's 64-char name buffer. Over-long labels are silently truncated at both entry points (MSP payload and record conf), never rejected.Additive only — recordings without a label are named exactly as before.
Related PRs
Forward MSP_ELRS_BACKPACK_SET_DVR_NAME to the goggles ExpressLRS/Backpack#232 — companion firmware PR: the VRX backpack forwards
MSP_ELRS_BACKPACK_SET_DVR_NAMEto the goggles over the serial link, which is what delivers this message.Send RTC time from the TX backpack to the VRX backpack over ESP-NOW ExpressLRS/Backpack#231 — syncs the backpack/goggle RTC so the named recordings also carry correct timestamps.
Automatically sync backpack time from the handset (real timestamps on goggle DVR) + lua memory optimisations ExpressLRS/Lua-Scripts#18 — the ELRS Lua script now seeds that clock automatically whenever it connects to the TX module.
Let pilots switch between Raceband and Lowband via the ELRS backpack #614 — lets pilots switch between Raceband and Lowband via the backpack; part of the same integration, independent of this PR.
Send handset time to the TX backpack to set its RTC ExpressLRS/ExpressLRS#3701 — TX-module side of that time sync: forwards the handset time to the backpack.