mirror of
https://github.com/meshtastic/firmware.git
synced 2026-01-16 06:47:52 +00:00
Added adaptive coding rate support and unit tests
This commit is contained in:
@@ -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();
|
||||
}
|
||||
Reference in New Issue
Block a user