Skip to content

Reset noise floor samples after frequency changes#10752

Open
RCGV1 wants to merge 1 commit into
meshtastic:masterfrom
RCGV1:codex/reset-noise-floor-on-frequency-change
Open

Reset noise floor samples after frequency changes#10752
RCGV1 wants to merge 1 commit into
meshtastic:masterfrom
RCGV1:codex/reset-noise-floor-on-frequency-change

Conversation

@RCGV1

@RCGV1 RCGV1 commented Jun 20, 2026

Copy link
Copy Markdown
Member

Summary

  • Reset RadioLib noise-floor calibration when reconfigure() applies a different effective receiver frequency.
  • Keep the change local to RadioLibInterface; all RadioLib chip drivers already call this base reconfigure path before applying chip-specific settings.
  • Clear the noise-floor sample throttle timestamp during reset so collection can restart immediately on the new frequency.
  • Add test_radio coverage that seeds RadioLib noise-floor state, verifies it is cleared when frequency changes, and verifies it is preserved when frequency is unchanged.

Why this is needed

LoRa config changes do not generally reboot the node. AdminModule::handleSetConfig() explicitly sets requiresReboot = false for LoRa config, then saveChanges() calls MeshService::reloadConfig(), which notifies the radio config observer and reconfigures the radio live. Channel changes also save without reboot and flow through reloadConfig; this matters because the default frequency slot can be derived from the primary channel name.

Testing

  • trunk fmt src/mesh/RadioInterface.h src/mesh/RadioInterface.cpp src/mesh/RadioLibInterface.h src/mesh/RadioLibInterface.cpp test/test_radio/test_main.cpp
  • ~/.platformio/penv/bin/python -m platformio test -e native-macos -f test_radio: 17 passed
  • pio run -e heltec-v3: SUCCESS

Notes

  • Attempted ~/.platformio/penv/bin/python -m platformio test -e native -f test_radio on macOS, but it failed before test execution because LovyanGFX includes Linux-only <malloc.h>. The repo has native-macos for this case, and that target passed.

@github-actions

github-actions Bot commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

⚡ Try this PR in the Web Flasher

Flash this PR in the Web Flasher

firmware commit boards expires

Warning

This is an automated, unreviewed CI test build. Back up your device configuration
before flashing, and only flash devices you are able to recover.

Supported boards built by this PR (22)
Device Board Platform
Crowpanel Adv 3.5 TFT elecrow-adv-35-tft esp32-s3
Heltec HT62 heltec-ht62-esp32c3-sx1262 esp32-c3
Heltec Mesh Node 096 heltec-mesh-node-t096 nrf52840
Heltec Mesh Node T1 heltec-mesh-node-t1 nrf52840
Heltec Mesh Node T114 heltec-mesh-node-t114 nrf52840
Heltec V3 heltec-v3 esp32-s3
Raspberry Pi Pico pico rp2040
Raspberry Pi Pico W picow rp2040
RAK WisBlock 11200 rak11200 esp32
RAK WisBlock 11310 rak11310 rp2040
RAK3312 rak3312 esp32-s3
RAK WisBlock 4631 rak4631 nrf52840
Seeed Xiao NRF52840 Kit seeed_xiao_nrf52840_kit nrf52840
Seeed SenseCAP Indicator seeed-sensecap-indicator-tft esp32-s3
Seeed Xiao ESP32-S3 seeed-xiao-s3 esp32-s3
Station G2 station-g2 esp32-s3
Station G3 station-g3 esp32-s3
LILYGO T-Deck t-deck-tft esp32-s3
LILYGO T-Echo t-echo nrf52840
LILYGO T-Echo Plus t-echo-plus nrf52840
LILYGO T-Impulse Plus t-impulse-plus nrf52840
Seeed SenseCAP T1000-E tracker-t1000-e nrf52840

Build artifacts expire on 2026-07-22. Updated for 9604fe5.

@github-actions github-actions Bot added the enhancement New feature or request label Jun 20, 2026
@thebentern

Copy link
Copy Markdown
Contributor

This probably should target master

@RCGV1 RCGV1 changed the base branch from develop to master June 20, 2026 23:09
@thebentern

Copy link
Copy Markdown
Contributor

Now that it targets master, it needes to be rebased. We don't want to merge develop into master yet

@RCGV1 RCGV1 force-pushed the codex/reset-noise-floor-on-frequency-change branch from ae55fc4 to 9604fe5 Compare June 22, 2026 21:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants