diff --git a/POWER.md b/POWER.md index 5271b22c..e69cfbb6 100644 --- a/POWER.md +++ b/POWER.md @@ -52,9 +52,10 @@ two costs that dominate idle: Each knob is independent and each can be reverted with one command. The defaults reproduce the pre-power-feature behaviour exactly — light sleep off, -RX duty cycle off (continuous RX), CPU at 240 MHz — so an existing installation -sees no change until it opts in. `set radio.rxps on` and `powersaving on` are -one command each; `cpu.freq 0` restores the board default. +RX duty cycle off (continuous RX), CPU at the board's compiled clock +(`ESP32_CPU_FREQ` where a variant sets it, otherwise 240 MHz) — so an existing +installation sees no change until it opts in. `set radio.rxps on` and +`powersaving on` are one command each; `cpu.freq 0` restores the board default. ## Behaviour @@ -125,7 +126,9 @@ on-air protocol. `set cpu.freq ` caps the CPU clock while the node is awake. Supported values are **40, 80, 160 and 240**; `0` restores the frequency the board booted -with. The setting is applied immediately and again at boot. +with. A new install defaults to `0`, so a variant's compiled `ESP32_CPU_FREQ` +(80/160 MHz on many boards) is preserved until the operator asks otherwise. The +setting is applied immediately and again at boot. Repeater work is I/O-bound: packet handling is dominated by SPI and airtime, and the filter's pattern matcher is bounded by a **step budget**, not a time diff --git a/src/helpers/CommonCLI.h b/src/helpers/CommonCLI.h index 4c39689f..03374bb1 100644 --- a/src/helpers/CommonCLI.h +++ b/src/helpers/CommonCLI.h @@ -58,7 +58,7 @@ public: char bridge_secret[16]; // for XOR encryption of bridge packets (ESP-NOW only) // Power setting uint8_t powersaving_enabled = 0; // boolean - uint16_t cpu_freq_mhz = 240; // ESP32 default; 0 = whatever the board booted with + uint16_t cpu_freq_mhz = 0; // 0 = whatever the board booted with (pre-feature default) // Gps settings uint8_t gps_enabled = 0; uint32_t gps_interval = 0; // in seconds diff --git a/src/helpers/PowerProfile.cpp b/src/helpers/PowerProfile.cpp index 84211ea7..f90f82c1 100644 --- a/src/helpers/PowerProfile.cpp +++ b/src/helpers/PowerProfile.cpp @@ -25,10 +25,13 @@ void powerApplyCpuFrequency(const NodePrefs& prefs) { void powerApplyDefaults(NodePrefs& prefs) { // Pre-power-feature behaviour: continuous RX, no CPU cap. The level/preamble // defaults are carried so `set radio.rxps on` has something sane to start - // from, but nothing is armed until the operator asks for it. + // from, but nothing is armed until the operator asks for it. "No CPU cap" + // means the board's own clock (ESP32_CPU_FREQ where a variant sets it), not + // an assumed 240 MHz. prefs.rxps.enabled = 0; prefs.rxps.level = RX_POWERSAVING_BALANCED_LEVEL; prefs.rxps.preamble = RX_POWERSAVING_PROFILE_PREAMBLE; + prefs.cpu_freq_mhz = 0; } void powerApplyRadioProfile(NodePrefs& prefs) {