2020-02-01 08:59:16 -08:00
|
|
|
#pragma once
|
|
|
|
|
|
2020-02-02 12:45:32 -08:00
|
|
|
#include "MemoryPool.h"
|
2020-02-03 09:13:19 -08:00
|
|
|
#include "MeshTypes.h"
|
2020-03-18 19:15:51 -07:00
|
|
|
#include "PointerQueue.h"
|
2020-02-04 08:17:44 -08:00
|
|
|
#include "configuration.h"
|
2020-02-01 11:25:07 -08:00
|
|
|
|
2020-09-25 12:52:08 -07:00
|
|
|
// Map from old region names to new region enums
|
|
|
|
|
struct RegionInfo {
|
2022-05-07 20:31:21 +10:00
|
|
|
Config_LoRaConfig_RegionCode code;
|
2022-02-14 19:32:31 -08:00
|
|
|
float freqStart;
|
|
|
|
|
float freqEnd;
|
|
|
|
|
float dutyCycle;
|
2020-09-25 12:52:08 -07:00
|
|
|
float spacing;
|
2022-02-14 19:32:31 -08:00
|
|
|
uint8_t powerLimit; // Or zero for not set
|
|
|
|
|
bool audioPermitted;
|
|
|
|
|
bool freqSwitching;
|
2020-09-25 12:52:08 -07:00
|
|
|
const char *name; // EU433 etc
|
|
|
|
|
};
|
|
|
|
|
|
2020-10-21 17:27:13 +08:00
|
|
|
extern const RegionInfo regions[];
|
|
|
|
|
extern const RegionInfo *myRegion;
|
|
|
|
|
|
|
|
|
|
extern void initRegion();
|