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