diff --git a/src/lmic_config.h b/src/lmic_config.h index d7759a03..d8a88c7a 100644 --- a/src/lmic_config.h +++ b/src/lmic_config.h @@ -21,7 +21,7 @@ #define LMIC_USE_INTERRUPTS 1 // time sync via LoRaWAN network, note: not supported by TTNv2 -//#define LMIC_ENABLE_DeviceTimeReq 1 +#define LMIC_ENABLE_DeviceTimeReq 1 // use callback event handlers, not onEvent() reference #define LMIC_ENABLE_onEvent 0 diff --git a/src/paxcounter.conf b/src/paxcounter.conf index ac392f24..3cc7f2e3 100644 --- a/src/paxcounter.conf +++ b/src/paxcounter.conf @@ -72,15 +72,15 @@ #define OTA_MIN_BATT 3600 // minimum battery level for OTA [millivolt] #define RESPONSE_TIMEOUT_MS 60000 // firmware binary server connection timeout [milliseconds] -// settings for syncing time of node with external time source +// settings for syncing time of node with a time source (network / gps / rtc / timeserver) +#define TIME_SYNC_LORAWAN 1 // set to 1 to use LORA network as time source, 0 means off [default = 1] #define TIME_SYNC_INTERVAL 60 // sync time attempt each .. minutes from time source (GPS/LORA/RTC) [default = 60], 0 means off #define TIME_SYNC_INTERVAL_RETRY 10 // retry time sync after lost sync each .. minutes [default = 10], 0 means off #define TIME_SYNC_COMPILEDATE 0 // set to 1 to use compile date to initialize RTC after power outage [default = 0] -#define TIME_SYNC_LORAWAN 0 // set to 1 to use LORA network as time source, 0 means off [default = 0] -#define TIME_SYNC_LORASERVER 0 // set to 1 to use LORA timeserver as time source, 0 means off [default = 0] -// settings for syncing time with timeserver applications -#define TIME_SYNC_SAMPLES 1 // number of time requests for averaging +// specific settings for syncing time of node with a timeserver +#define TIME_SYNC_LORASERVER 0 // set to 1 to use LORA timeserver as time source, 0 means off [default = 0] +#define TIME_SYNC_SAMPLES 1 // number of time requests for averaging, max. 255 #define TIME_SYNC_CYCLE 60 // delay between two time samples [seconds] #define TIME_SYNC_TIMEOUT 300 // timeout waiting for timeserver answer [seconds]