Clean up comments on kiss noise floor changes.

This commit is contained in:
Adam Gessaman 2026-02-05 09:46:30 -08:00
parent 0fb570338f
commit c0b81b9ad8
2 changed files with 6 additions and 10 deletions

View file

@ -12,8 +12,8 @@
#include <SPIFFS.h>
#endif
#define NOISE_FLOOR_CALIB_INTERVAL_MS 2000 // match Dispatcher default
#define AGC_RESET_INTERVAL_MS 30000 // periodic RX restart so AGC doesn't drift (repeater uses same via prefs)
#define NOISE_FLOOR_CALIB_INTERVAL_MS 2000
#define AGC_RESET_INTERVAL_MS 30000
StdRNG rng;
mesh::LocalIdentity identity;
@ -100,11 +100,9 @@ void loop() {
uint8_t packet[KISS_MAX_PACKET_SIZE];
uint16_t len;
// Match Dispatcher order: noise floor calib + loop() first, so we never sample RSSI in the same
// iteration as startReceive() (AGC reset -> recvRaw below). Sampling right after startReceive()
// can yield settling/cold RSSI and drive the floor toward -120.
// trigger noise floor calibration
if ((uint32_t)(millis() - next_noise_floor_calib_ms) >= NOISE_FLOOR_CALIB_INTERVAL_MS) {
radio_driver.triggerNoiseFloorCalibrate(0); // 0 = no interference threshold (KISS has no prefs)
radio_driver.triggerNoiseFloorCalibrate(0);
next_noise_floor_calib_ms = millis();
}
radio_driver.loop();
@ -119,7 +117,7 @@ void loop() {
}
if ((uint32_t)(millis() - next_agc_reset_ms) >= AGC_RESET_INTERVAL_MS) {
radio_driver.resetAGC(); // next recvRaw() will startReceive() and reset AGC so RSSI/noise floor don't stick at -120
radio_driver.resetAGC();
next_agc_reset_ms = millis();
}
uint8_t rx_buf[256];