Add saved controls for radio switching acceleration
This commit is contained in:
1 parent
5a4e81c4d5
commit
61d024bc72
78 files changed
+1696
-160
No files matched your search
@@ -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());
|
||||
|
||||
Reference in new issue
Block a user