diff --git a/src/loraconf_abp.cpp b/src/loraconf_abp.cpp index 76de2f73..675b90fa 100644 --- a/src/loraconf_abp.cpp +++ b/src/loraconf_abp.cpp @@ -39,8 +39,8 @@ void setABPParameters() { // devices' ping slots. LMIC does not have an easy way to define set this // frequency and support for class B is spotty and untested, so this // frequency is not configured here. - #elif defined(CFG_us915) - // NA-US channels 0-71 are configured automatically + #elif defined(CFG_us915) || defined(CFG_au915) + // NA-US and AU channels 0-71 are configured automatically // but only one group of 8 should (a subband) should be active // TTN recommends the second sub band, 1 in a zero based count. // https://github.com/TheThingsNetwork/gateway-conf/blob/master/US-global_conf.json diff --git a/src/timekeeper.cpp b/src/timekeeper.cpp index 6d8439ec..bc9e52b5 100644 --- a/src/timekeeper.cpp +++ b/src/timekeeper.cpp @@ -35,8 +35,10 @@ void calibrateTime(void) { timesync_request(); #endif - // (only!) if we lost time, we try to fallback to local time source RTS or GPS - if (timeSource == _unsynced) { + // if no LORA timesource is available, or if we lost time, then fallback to + // local time source RTS or GPS + if (((!TIME_SYNC_LORASERVER) && (!TIME_SYNC_LORAWAN)) || + (timeSource == _unsynced)) { // has RTC -> fallback to RTC time #ifdef HAS_RTC @@ -50,8 +52,7 @@ void calibrateTime(void) { timeSource = _gps; #endif - if (t) - setMyTime((uint32_t)t, t_msec, timeSource); // set time + setMyTime((uint32_t)t, t_msec, timeSource); // set time } // fallback