Added adaptive coding rate support and unit tests

This commit is contained in:
Ben Meadors
2026-01-07 08:32:13 -06:00
parent 9f5170a0bc
commit dd5e0b74ba
13 changed files with 347 additions and 1 deletions

View File

@@ -1,6 +1,8 @@
#include "SerialConsole.h"
#include "concurrency/OSThread.h"
#include "gps/RTC.h"
#include "mesh/MeshRadio.h"
#include "mesh/NodeDB.h"
#include "TestUtil.h"
@@ -14,5 +16,19 @@ void initializeTestEnvironment()
tv.tv_usec = 0;
perhapsSetRTC(RTCQualityNTP, &tv);
#endif
concurrency::OSThread::setup();
}
void initializeTestEnvironmentMinimal()
{
// Only satisfy OSThread assertions; skip SerialConsole and platform-specific setup
concurrency::hasBeenSetup = true;
// Ensure region/config globals are sane before any RadioInterface instances compute slot timing
config.lora.region = meshtastic_Config_LoRaConfig_RegionCode_UNSET;
config.lora.use_preset = true;
config.lora.modem_preset = meshtastic_Config_LoRaConfig_ModemPreset_LONG_FAST;
initRegion();
concurrency::OSThread::setup();
}