[fix](trx-frontend-http): fix waterfall freeze, RDS bandwidth, add jog multiplier
Fix waterfall overview freezing at steady state by tracking a monotonic push counter instead of row array length — the array size stays constant once the waterfall is full, so the previous row-count comparison never triggered the incremental draw path. Fix WFM RDS not decoding when switching to WFM from a narrowband mode: set_mode now resets audio_bandwidth_hz to the mode-appropriate default (180 kHz for WFM) before rebuilding the FIR, preventing the 57 kHz RDS subcarrier from being filtered out. Add 1×/10×/100× multiplier button group next to the jog unit selector. jogUnit × jogMult gives the effective jog step; both are persisted to localStorage independently. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Stan Grams <sjg@haxx.space>
This commit is contained in:
@@ -418,9 +418,25 @@ impl ChannelDsp {
|
||||
|
||||
pub fn set_mode(&mut self, mode: &RigMode) {
|
||||
self.mode = mode.clone();
|
||||
self.audio_bandwidth_hz = default_bandwidth_for_mode(mode);
|
||||
self.demodulator = Demodulator::for_mode(mode);
|
||||
self.rebuild_filters();
|
||||
}
|
||||
}
|
||||
|
||||
/// Returns the appropriate channel filter bandwidth for a given mode.
|
||||
fn default_bandwidth_for_mode(mode: &RigMode) -> u32 {
|
||||
match mode {
|
||||
RigMode::LSB | RigMode::USB | RigMode::PKT | RigMode::DIG => 3_000,
|
||||
RigMode::CW | RigMode::CWR => 500,
|
||||
RigMode::AM => 6_000,
|
||||
RigMode::FM => 12_500,
|
||||
RigMode::WFM => 180_000,
|
||||
RigMode::Other(_) => 3_000,
|
||||
}
|
||||
}
|
||||
|
||||
impl ChannelDsp {
|
||||
|
||||
/// Rebuild the FIR low-pass filters with new bandwidth and tap count.
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user