Bug Report
AetherSDR version: 26.5.2.1
Radio: FLEX-8600, firmware 4.2.18
OS: Windows 11 Pro
Description
Two related bugs in the MIDI VFO tuning (rx.tuneKnob) path.
Bug 1 — Binary 0/127 encoder: wrong direction / one direction dead
When a MIDI controller uses binary relative encoding (CW = CC value 127, CCW = CC value 0) — the style used by MidiController and handled as "standard" in Thetis — AetherSDR's VFO tuning misbehaves:
- Value 127 (CW):
relativeCcDelta(127) returns -1 (two's-complement CCW), so the VFO tunes in the wrong direction.
- Value 0 (CCW):
relativeCcDelta(0) returns 0, so the VFO does not move at all.
Thetis handles this correctly via ProcessStdMIDIWheelAsVFO, treating direction > 125 as CW and anything <= 125 (including 0) as CCW.
Bug 2 — Step size UI control does not affect MIDI tuning
The relativeAction MIDI handler in MainWindow reads s->stepHz(), which is only updated after the radio acknowledges a slice set step=N round-trip. Changing the step size in AetherSDR's UI does not immediately affect MIDI VFO steps, even though the same change immediately affects keyboard and HID encoder tuning (both use spectrum()->stepSize()).
Steps to Reproduce
- Bind a relative encoder to
rx.tuneKnob via MIDI Learn.
- Use a controller that sends binary 0/127 relative CC.
- Turn CW: VFO tunes CCW (wrong direction).
- Turn CCW: VFO does not move.
- Change step size in AetherSDR UI: MIDI step is unchanged.
Root Cause
relativeCcDelta is a two's-complement decoder: 127 decodes as -1 (CCW) and 0 decodes as 0 (no movement). Binary/Thetis convention treats 127 as CW (+1) and 0 as CCW (-1).
The relativeAction handler uses s->stepHz() (radio echo delayed) rather than spectrum()->stepSize() (immediate), inconsistent with keyboard and HID encoder paths.
Fix
- Override two's-complement decode for values 0 and 127 on the VFO binding: treat as binary unit pulses (0 = -1 CCW, 127 = +1 CW). Extend backward-compat tier to handle center-64 encoded controllers.
- In MainWindow
relativeAction handler, use spectrum()->stepSize() (with s->stepHz() fallback), matching keyboard and HID encoder behaviour.
Principle VIII (Evidence Over Assertion): root cause confirmed by comparing AetherSDR decode path against Thetis Midi2CatCommands.cs source.
Principle XI (Fixes Are Demonstrated): fix confirmed on real FLEX-8600 hardware.
Bug Report
AetherSDR version: 26.5.2.1
Radio: FLEX-8600, firmware 4.2.18
OS: Windows 11 Pro
Description
Two related bugs in the MIDI VFO tuning (
rx.tuneKnob) path.Bug 1 — Binary 0/127 encoder: wrong direction / one direction dead
When a MIDI controller uses binary relative encoding (CW = CC value 127, CCW = CC value 0) — the style used by MidiController and handled as "standard" in Thetis — AetherSDR's VFO tuning misbehaves:
relativeCcDelta(127)returns -1 (two's-complement CCW), so the VFO tunes in the wrong direction.relativeCcDelta(0)returns 0, so the VFO does not move at all.Thetis handles this correctly via
ProcessStdMIDIWheelAsVFO, treatingdirection > 125as CW and anything <= 125 (including 0) as CCW.Bug 2 — Step size UI control does not affect MIDI tuning
The
relativeActionMIDI handler in MainWindow readss->stepHz(), which is only updated after the radio acknowledges aslice set step=Nround-trip. Changing the step size in AetherSDR's UI does not immediately affect MIDI VFO steps, even though the same change immediately affects keyboard and HID encoder tuning (both usespectrum()->stepSize()).Steps to Reproduce
rx.tuneKnobvia MIDI Learn.Root Cause
relativeCcDeltais a two's-complement decoder: 127 decodes as -1 (CCW) and 0 decodes as 0 (no movement). Binary/Thetis convention treats 127 as CW (+1) and 0 as CCW (-1).The
relativeActionhandler usess->stepHz()(radio echo delayed) rather thanspectrum()->stepSize()(immediate), inconsistent with keyboard and HID encoder paths.Fix
relativeActionhandler, usespectrum()->stepSize()(withs->stepHz()fallback), matching keyboard and HID encoder behaviour.Principle VIII (Evidence Over Assertion): root cause confirmed by comparing AetherSDR decode path against Thetis
Midi2CatCommands.cssource.Principle XI (Fixes Are Demonstrated): fix confirmed on real FLEX-8600 hardware.