Skip to content

PoC: synthetic motor audio from 0xFF RPM telemetry - #630

Open
350d wants to merge 2 commits into
hd-zero:mainfrom
350d:poc/synthetic-motor-audio
Open

350d wants to merge 2 commits into
hd-zero:mainfrom
350d:poc/synthetic-motor-audio

Conversation

@350d

@350d 350d commented Oct 6, 2026 •

Copy link
Copy Markdown

Summary

  • Decode the optional 6-byte motor RPM tail on the HDZero 0xFF service packet (length >= 21).
  • Synthesize stereo propeller audio at 22.05 kHz (QUADX pan, quieter rears); stale/zero RPM fades out.
  • Record Option → Motor Audio (On/Off, record.motor_audio): live mix beside the selected Mic / Line In / A/V In source (opens DAC path; Softwinner AO PCM feed still TODO on hardware).
  • Host tool utilities/motor_audio_poc for unit tests, synthetic WAV, and blackbox CSV replay. Docs in docs/synthetic-motor-audio.md.
  • Pair with the matching VTX PR that appends the packed RPM bytes.

Notes

Test plan

  • cmake -S utilities/motor_audio_poc -B tmp/motor_audio_poc_build && cmake --build tmp/motor_audio_poc_build
  • ./tmp/motor_audio_poc_build/motor_audio_poc --motor-test → PASS
  • --motor-synthetic --motor-wav tmp/out.wav and listen
  • --motor-replay <csv> --motor-poles N --motor-realtime (Meteor75 verified ~60s)
  • UI: Record Option → Motor Audio On/Off persists in setting.ini
  • Against VTX PoC: confirm 21-byte service enables audio; 15-byte legacy stays silent

Decode four packed 12-bit RPMs from the service packet, synthesize stereo propeller audio at 22.05 kHz, and ship a host PoC for tests and blackbox replay.
@350d

350d commented Oct 6, 2026

Copy link
Copy Markdown
Author

Demo audio generated from random blackbox log from internet:
motor_meteor75_replay.wav.zip

Gate the synth from settings, open the DAC mix path beside the selected Mic/Line/AV source, and keep the emulator SDL device in sync with the toggle.
@rquellet

rquellet commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

I tested this yesterday on a live drone with headphones connected to the goggle. I see now that the live audio output function hasn't been implemented yet though. Looking forward to seeing this work, this is a project I've thought of doing myself in the past, and I'm happy to see someone work on it!

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.

2 participants