fix(volume): handle TCI VOLUME dB wire scale (AetherSDR #3502)#1
Merged
Conversation
AetherSDR PR #3502 moved the TCI VOLUME command to dB (-60..0) on the wire. Two breaks for this plugin, which models volume as 0-100 percent: 1. Read: AE now echoes volume in dB (negative). The parser stored that dB value as if it were percent, corrupting the local mirror and breaking the dial's first-step tracking (exactly the concern raised in #3502). 2. Write: stepping AF gain to the bottom sent `volume:0`, which AE now reads as 0 dB = FULL volume (was 0% mute) - turning the dial down jumped to max. Fix (internal model stays percent; convert only at the wire): - Read: an echoed value <=0 is dB -> dbToPercent(); >=1 stays legacy percent. Handles both old (percent-echo) and new (dB-echo) AetherSDR. - Write: emit -60 dB for the silence floor instead of 0; 1-100 still go as legacy percent, which AE's compat shim accepts. Follow-up to the hardware re-verification flagged in aethersdr/AetherSDR#3502. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to the hardware re-verification flagged in aethersdr/AetherSDR#3502, which moved TCI
VOLUMEto dB (-60..0) on the wire.This plugin models volume as 0-100 percent, so two things broke:
volume:0flip: stepping AF gain to the bottom sentvolume:0, which AE now reads as 0 dB = FULL volume (was 0% mute) — turning the dial all the way down jumped to maximum.Fix (
app.js)<= 0is treated as dB and converted viadbToPercent();>= 1stays legacy percent. Works against both old (percent-echo) and new (dB-echo) AetherSDR.-60dB for the silence floor instead of0; values1-100still go as legacy percent (accepted by AE's compat shim).Internal model stays percent — conversion happens only at the wire. RF
driveandmic_levelare untouched (not affected by #3502).