Skip to content

Name DVR recordings after the race via MSP_SET_DVR_NAME (0x030F)#613

Open
bob9 wants to merge 1 commit into
hd-zero:mainfrom
bob9:dvr-recording-name
Open

Name DVR recordings after the race via MSP_SET_DVR_NAME (0x030F)#613
bob9 wants to merge 1 commit into
hd-zero:mainfrom
bob9:dvr-recording-name

Conversation

@bob9

@bob9 bob9 commented Jul 14, 2026

Copy link
Copy Markdown

Summary

Lets a race timer name the next DVR recording (e.g. WinterCup-Qual1-H2) by sending a new MSP_SET_DVR_NAME (0x030F) message through the ELRS backpack.

  • elrs.c handles the new MSP command and hands the payload to dvr_set_race_label().
  • dvr.c stores 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.
  • The record process (record/) reads the label from the conf and uses it when building the recording filename.

Additive only — recordings without a label are named exactly as before.

Related PRs

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.
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.

1 participant