Fix RADE selecting DIGU on 40m from RxApplet mode combo#2811
Conversation
RxApplet's mode combo handler called `m_slice->setMode("RADE")` after
emitting `radeActivated(true, ...)`. This sent the unknown mode string
"RADE" to the radio and emitted `modeChanged("RADE")`, which triggered
`onRadeSliceModeChanged` to call `deactivateRADE()` immediately after
activation. Depending on how the radio firmware handles an unknown mode
string, the slice could end up in DIGU instead of the DIGL correctly
computed for 40m by the kBands band lookup in `activateRADE()`.
The fix aligns RxApplet with VfoWidget, which correctly returns after
emitting `radeActivated` without calling `setMode`. RADE is client-side
only — the real mode (DIGL/DIGU) is set inside `activateRADE()` before
the `onRadeSliceModeChanged` watchdog is connected.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Verified the fix against the codebase — looks good.
Confirmed:
VfoWidget.cpp:1624-1627returns afteremit radeActivated(true, ...)without callingsetMode("RADE")—RxAppletnow matches that pattern exactly.- The quick-mode button path in
VfoWidget.cpp:1667-1670follows the same convention. - The existing comment at
RxApplet.cpp:433-437already documented the invariant the removed line was violating ("RADE is client-side only — the radio echoes back the real mode (DIGL/DIGU) immediately"). The PR description's root-cause analysis is accurate. - The DIGU-on-40m symptom is plausible: shipping the unknown string
"RADE"to the radio, followed immediately by the radio's echo-back of whatever it actually selected, would deactivate RADE afteractivateRADE()'s kBands DIGL/DIGU computation, and any radio-side fallback to DIGU would then stick.
Minimal, surgical, no convention concerns. Thanks @NF0T — nice catch on the cross-widget consistency bug.
|
Claude here — merged. Tack Ryan! Surgical −1/+0 fix that brings the code back into alignment with the comment one line below it. The diagnosis nails the watchdog race: Sibling 73, Jeremy KK7GWY & Claude (AI dev partner) |
|
Bug Report – SmartSDR 4.2.18.41174 Issue 1: Incorrect Sideband Display/Behavior in DIGL Mode Open SmartSDR 75/80 meters (e.g., digital/raid entry) / 40 meters (same behavior observed) Expected Behavior When selecting a digital mode for lower HF bands (e.g., 75m, 40m), the radio should: Switch to DIGL, show Rade in the Frequency Flag, Operate using LSB characteristics (as expected for these bands) Actual Behavior The slice flag indicates DIGL, Shows Rade active; however, on the panadapter, the radio appears to be using USB instead of LSB. This creates confusion about which sideband is actually in use Issue 2: No Transmit Audio from Microphone Key the radio (PTT): Speak into the microphone Expected Behavior: RF output with audible modulation from the microphone input Actual Behavior Radio successfully enters TX mode, but No transmit audio is produced, No RF modulation observed DAX Behavior Observed With DAX OFF: TX Stream shows: "DAX TX Off" When turning DAX ON: TX Stream changes to: "Off – Busy" Pressing OFF in TX Stream panel: Changes status to: "Ready" Turning DAX OFF again: TX Stream returns to: "Off – DAX TX Off" Turning DAX ON again: Reverts to: "Off – Busy" Notes No transmit audio is present regardless of: DAX being enabled or disabled Behavior suggests the possibility: TX audio source routing issue support-bundle-20260517-132943.zip Rig conditions: All Flex equipment is running the latest Firmware. All devices have a static IP address. All radio equipment is on a flat network, on its own Cisco Catalyst switch with no other devices on that network segment. |
Summary
RxApplet's mode combo handler calledm_slice->setMode("RADE")after emittingradeActivated(true, ...), sending the unknown mode string "RADE" to the radio and immediately triggeringonRadeSliceModeChanged("RADE")→deactivateRADE().activateRADE()'s kBands lookup, producing the user-reported symptom of RADE selecting DIGU on 40m.VfoWidget, which has always correctly returned after emittingradeActivatedwithout callingsetMode. RADE is client-side only; the actual DIGL/DIGU assignment happens insideactivateRADE()before the watchdog connection is made.Root Cause
RxApplet.cpp:430(removed):The comment at line 433 already stated "RADE is client-side only — the radio echoes back the real mode (DIGL/DIGU) immediately, so mode() == 'RADE' is never true in steady state" — the removed line was directly contradicting that invariant.
Test Plan
🤖 Generated with Claude Code