Segemented config works for me (TM)

Small GPS Fix that cropped up while testing included.
This commit is contained in:
Thomas Göttgens
2022-05-21 22:38:33 +02:00
parent 33938f73a6
commit 53e9f4df46
27 changed files with 146 additions and 119 deletions

View File

@@ -11,7 +11,7 @@
extern DeviceState devicestate;
extern ChannelFile channelFile;
extern MyNodeInfo &myNodeInfo;
extern Config config;
extern LocalConfig config;
extern ModuleConfig moduleConfig;
extern User &owner;
@@ -161,7 +161,7 @@ extern NodeDB nodeDB;
// Our delay functions check for this for times that should never expire
#define NODE_DELAY_FOREVER 0xffffffff
#define IF_ROUTER(routerVal, normalVal) ((config.payloadVariant.device.role == Config_DeviceConfig_Role_Router) ? (routerVal) : (normalVal))
#define IF_ROUTER(routerVal, normalVal) ((config.device.role == Config_DeviceConfig_Role_Router) ? (routerVal) : (normalVal))
#define default_broadcast_interval_secs IF_ROUTER(12 * 60 * 60, 15 * 60)
#define default_wait_bluetooth_secs IF_ROUTER(1, 60)