Gate compression meter on radio TX state#2363
Conversation
Co-authored-by: Codex <[email protected]>
There was a problem hiding this comment.
Clean, minimal fix. The model-owned m_radioTransmitting flag is correctly stored alongside the existing radioTransmittingChanged emit, reset on disconnect, and used to gate the P/CW compression gauge through the meter handler. The explicit updateCompression(0.0f) on the TX→RX transition is a sensible belt-and-suspenders against quiescent RX meter publishes that would otherwise leave the gauge pegged until the next mic-meter event arrived.
A few observations:
-
Order of operations is correct: in
onStatusReceivedyou setm_radioTransmitting = radioTxbefore emitting the signal, so any handler readingisRadioTransmitting()synchronously sees the new value. Same pattern inonDisconnected. -
Access pattern in the new TX→RX clear is consistent with the surrounding lambda —
m_appletPanel->sMeterWidget()is dereferenced two lines above, so the newphoneCwApplet()call has the same lifetime guarantee. No null risk introduced. -
One thought, not blocking: since the
micMetersChangedlambda also gates onisRadioTransmitting(), the explicit clear on the radio-transmitting signal is only load-bearing when the radio stops publishing mic meters during RX. Worth a one-line comment on that explicit clear so a future reader doesn't think it's redundant with the gating below. -
Out of scope but flagged in the PR body: noting
meter_model_testfailing onmainindependently — agree, that's not yours to fix here.
Thanks for the focused fix and the clear root-cause writeup, @jensenpat.
|
Claude here on Jeremy's behalf — merged via admin squash. Clean fix for a real user-reported regression. The raw-interlock-vs-owned-by-us distinction is the right call (matches the #752 DAX passthrough rationale), and the on-disconnect reset is the kind of detail that's easy to miss but matters on reconnect-to-different-radio scenarios. 73, Jeremy KK7GWY & Claude (AI dev partner) |
Summary
RadioModeland expose it as the model-owned source of truth.Fixes #2325
Root Cause
FLEX-8000 radios can continue publishing TX-chain compression source meters while the radio is in receive. AetherSDR forwarded the derived compression value whenever PROC was enabled, without checking whether the radio was actually transmitting. In FT8/DIGU receive this could show a full red compression meter even though compression has no meaningful RX value.
Impact
The P/CW compression gauge now stays at zero during RX and on initial connection/reconnect until the radio reports
TRANSMITTING. Voice TX with PROC enabled can still show compression, including raw radio TX paths such as VOX or hardware PTT. Digital TX paths that bypass PROC continue to show no compression.Validation
cmake -B build-ninja -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfoenv -u CPLUS_INCLUDE_PATH cmake --build build-ninja --parallel 22ctest --test-dir build-ninja --output-on-failure./build-ninja/transmit_model_testNote:
./build-ninja/meter_model_teststill fails several existing compression derivation assertions on currentmain; this PR does not changeMeterModelderivation logic.👨🏼💻 Generated with OpenAI Codex (GPT-5.5 Pro 4/23) and tested by @jensenpat