diff --git a/src/lorawan.cpp b/src/lorawan.cpp index 48781d8c..f06ba289 100644 --- a/src/lorawan.cpp +++ b/src/lorawan.cpp @@ -12,6 +12,12 @@ static const char TAG[] = "lora"; #warning CLOCK_ERROR_PROCENTAGE value in lmic_config.h is too high; values > 7 will cause side effects #endif +#if (TIME_SYNC_LORAWAN) +#ifndef LMIC_ENABLE_DeviceTimeReq +#define LMIC_ENABLE_DeviceTimeReq 1 +#endif +#endif + osjob_t sendjob; QueueHandle_t LoraSendQueue; diff --git a/src/timesync.cpp b/src/timesync.cpp index b38f8c34..92af0906 100644 --- a/src/timesync.cpp +++ b/src/timesync.cpp @@ -9,7 +9,7 @@ algorithm in applications without granted license by the patent holder. */ -#ifdef TIME_SYNC_TIMESERVER +#if(TIME_SYNC_TIMESERVER) #include "timesync.h"