issue #774
This commit is contained in:
parent
b483d0279d
commit
7d401697f6
@ -50,7 +50,7 @@
|
||||
|
||||
#define _seconds() millis() / 1000.0
|
||||
|
||||
enum timesource_t { _gps, _rtc, _lora, _unsynced };
|
||||
enum timesource_t { _gps, _rtc, _lora, _set, _unsynced };
|
||||
enum snifftype_t { MAC_SNIFF_WIFI, MAC_SNIFF_BLE, MAC_SNIFF_BLE_ENS };
|
||||
enum runmode_t {
|
||||
RUNMODE_POWERCYCLE,
|
||||
|
@ -163,7 +163,8 @@ void gps_loop(void *pvParameters) {
|
||||
|
||||
// (only) while device time is not set or unsynched, and we have a valid
|
||||
// GPS time, we trigger a device time update to poll time from GPS
|
||||
if (timeSource == _unsynced && gpstime.isUpdated()) {
|
||||
if ((timeSource == _unsynced || timeSource == _set) &&
|
||||
gpstime.isUpdated()) {
|
||||
now();
|
||||
calibrateTime();
|
||||
}
|
||||
|
@ -357,7 +357,7 @@ void set_time(uint8_t val[]) {
|
||||
// swap byte order from msb to lsb, note: this is a platform dependent hack
|
||||
uint32_t t = __builtin_bswap32(*(uint32_t *)(val));
|
||||
ESP_LOGI(TAG, "Remote command: set time to %d", t);
|
||||
setMyTime(t, 0, _unsynced);
|
||||
setMyTime(t, 0, _set);
|
||||
};
|
||||
|
||||
void set_flush(uint8_t val[]) {
|
||||
|
@ -12,7 +12,7 @@
|
||||
static const char TAG[] = __FILE__;
|
||||
|
||||
// symbol to display current time source
|
||||
const char timeSetSymbols[] = {'G', 'R', 'L', '?'};
|
||||
const char timeSetSymbols[] = {'G', 'R', 'L', 'S', '?'};
|
||||
|
||||
#ifdef HAS_IF482
|
||||
#if (HAS_SDS011)
|
||||
|
Loading…
Reference in New Issue
Block a user