Add saved controls for radio switching acceleration

This commit is contained in:
mikecarper committed 2026-10-23 10:41:26 -07:00
1 parent 5a4e81c4d5
commit 61d024bc72
78 files changed
+1696 -160

No files matched your search

+5 -1
View File
@@ -224,7 +224,11 @@ MESH_COMPANION_HELP_BEGIN
" set espnow.channel <1-13>\r\n"
MESH_COMPANION_HELP_END
#endif
// Keep native USB producer writes within 256 bytes without changing help text.
// Keep native USB producer writes within 256 bytes.
MESH_COMPANION_HELP_BEGIN
" get radio.fast / get radio.fast.caps (supported saved controls)\r\n"
" set radio.fast <on|off> / set radio.fast.spi <0|2|4|8|16>\r\n"
MESH_COMPANION_HELP_END
MESH_COMPANION_HELP_BEGIN
" get radio.rxps.config\r\n"
" get/set radio.rxps <off|on|level 1-10 [preamble 16|32]|rx_us sleep_us>\r\n"
+1
View File
@@ -3654,6 +3654,7 @@ void setup() {
if (!mesh::power::beginRegulatorSettings(board, radio_driver, regulator_prefs_fs)) {
MESH_DEBUG_PRINTLN("Regulator selection could not be applied");
}
mesh::RadioProfileCLI::configureBootTuning(regulator_prefs_fs, radio_driver);
#ifdef DISPLAY_CLASS
+1
View File
@@ -221,6 +221,7 @@ void setup() {
if (!mesh::power::beginRegulatorSettings(board, radio_driver, regulator_prefs_fs)) {
MESH_DEBUG_PRINTLN("Regulator selection could not be applied");
}
mesh::RadioProfileCLI::configureBootTuning(regulator_prefs_fs, radio_driver);
mesh::hilStartupTrace("fs_ready");
#ifdef DISPLAY_CLASS
mesh::hilStartupTrace("display_begin");
+1
View File
@@ -155,6 +155,7 @@ void setup() {
if (!mesh::power::beginRegulatorSettings(board, radio_driver, regulator_prefs_fs)) {
MESH_DEBUG_PRINTLN("Regulator selection could not be applied");
}
mesh::RadioProfileCLI::configureBootTuning(regulator_prefs_fs, radio_driver);
#ifdef DISPLAY_CLASS
mesh::ui::loadDisplayPowerSettings(fs, false);
#if defined(OLED_AUTO_DETECT) && OLED_AUTO_DETECT
+21 -18
View File
@@ -765,22 +765,10 @@ void setup() {
external_watchdog.begin();
#endif
int radioinit_attempts = 0;
while (!radio_init()) {
++radioinit_attempts;
MESH_DEBUG_PRINTLN("Radio init failed! (attempt %d)", radioinit_attempts);
if (radioinit_attempts >= 3) {
MESH_DEBUG_PRINTLN("Radio init failed 3x - rebooting");
board.reboot();
}
delay(500);
}
fast_rng.begin(radio_driver.getRngSeed());
#if defined(NRF52_PLATFORM)
FILESYSTEM* primary_fs = &InternalFS;
FILESYSTEM* primary_fs;
bool volatile_primary_fs = false;
#if defined(NRF52_PLATFORM)
primary_fs = &InternalFS;
mesh::storage::RamFallbackFileSystem* ram_primary_fs = nullptr;
const auto primary_fs_boot =
mesh::storage::beginInternalPrimaryFilesystemSafely(InternalFS);
@@ -794,16 +782,31 @@ void setup() {
primary_fs = &ram_primary_fs->filesystem();
volatile_primary_fs = true;
}
the_mesh.begin(*primary_fs, volatile_primary_fs);
#elif defined(RP2040_PLATFORM)
LittleFS.begin();
the_mesh.begin(LittleFS);
primary_fs = &LittleFS;
#elif defined(ESP32)
SPIFFS.begin(true);
the_mesh.begin(SPIFFS);
primary_fs = &SPIFFS;
#else
#error "need to define filesystem"
#endif
mesh::RadioProfileCLI::configureBootTuning(
volatile_primary_fs ? nullptr : primary_fs, radio_driver);
int radioinit_attempts = 0;
while (!radio_init()) {
++radioinit_attempts;
MESH_DEBUG_PRINTLN("Radio init failed! (attempt %d)", radioinit_attempts);
if (radioinit_attempts >= 3) {
MESH_DEBUG_PRINTLN("Radio init failed 3x - rebooting");
board.reboot();
}
delay(500);
}
fast_rng.begin(radio_driver.getRngSeed());
the_mesh.begin(*primary_fs, volatile_primary_fs);
radio_driver.setParams(the_mesh.getFreqPref(), LORA_BW, LORA_SF, LORA_CR);
radio_driver.setTxPower(the_mesh.getTxPowerPref());
+1
View File
@@ -176,6 +176,7 @@ void setup() {
if (!mesh::power::beginRegulatorSettings(board, radio_driver, regulator_prefs_fs)) {
MESH_DEBUG_PRINTLN("Regulator selection could not be applied");
}
mesh::RadioProfileCLI::configureBootTuning(regulator_prefs_fs, radio_driver);
#ifdef DISPLAY_CLASS
mesh::ui::loadDisplayPowerSettings(fs, false);
#if defined(OLED_AUTO_DETECT) && OLED_AUTO_DETECT