Boot into Special jam mode by default (NVS jamMode=special each power-up)

Made-with: Cursor
This commit is contained in:
drjones
2026-04-02 05:58:35 -07:00
parent 88f3d4d442
commit 9d36430474

View File

@@ -2596,9 +2596,11 @@ void setup() {
jamPower = kPowerTable[jamPowerIdx]; jamPower = kPowerTable[jamPowerIdx];
preferences.putInt("jamPowerIdx", (int)jamPowerIdx); preferences.putInt("jamPowerIdx", (int)jamPowerIdx);
capHistoryLoad(); capHistoryLoad();
jamMode = jamModeFromU8(preferences.getUChar("jamMode", 0)); // Boot policy: always start in Special jam (60 B PRNG / 10 ms); persists to NVS for startJamming().
jamMode = JamMode::SPECIAL;
preferences.putUChar("jamMode", (uint8_t)jamMode);
logLine("[NVS] jam at boot: always ON | jamPower=" + String(jamPower) + " dBm | jam_mode=" + logLine("[NVS] jam at boot: always ON | jamPower=" + String(jamPower) + " dBm | jam_mode=" +
String(jamModeToCstr(jamMode))); String(jamModeToCstr(jamMode)) + " (default on power-up)");
logLine("[BOOT] CC1101 Key-Fob Jammer starting"); logLine("[BOOT] CC1101 Key-Fob Jammer starting");
logLine("[BOOT] ESP32-S3 DevKitC-1"); logLine("[BOOT] ESP32-S3 DevKitC-1");