Skip to content

Band menu tunes to wrong frequency (80m/40m → 20m) #8

@ten9876

Description

@ten9876

Bug Report

Description

Clicking 80m or 40m in the band selection menu sometimes tunes the radio to 20m (14.1 MHz) instead of the correct frequency (3.800 / 7.200 MHz).

Root Cause

The band-crossing detection in MainWindow fired on every frequencyChanged signal, including during initial connection when the radio reports slice frequencies via status messages. During connect, m_updatingFromModel was true but the band-crossing code didn't check it, causing it to:

  1. Detect a "band crossing" as the radio reported its current frequency
  2. Save the current state (14.1 MHz / 20m) under whatever band was momentarily detected
  3. Persist this incorrect state to QSettings

When the user later clicked 80m or 40m, band memory restored the stale 14.1 MHz state.

Fix

  1. Guard band-crossing detection with if (!m_updatingFromModel) — don't save band state during model-driven frequency updates (initial connect, status pushes)
  2. One-time migration clears stale bands group from QSettings on first launch of v0.2.3+

Files Changed

  • src/gui/MainWindow.cpp — band-crossing guard + migration

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions