gpsread fixes

This commit is contained in:
cyberman54 2019-03-02 22:56:00 +01:00
parent 19dd7c8e33
commit 1ae444b342
3 changed files with 10 additions and 10 deletions

View File

@ -92,10 +92,13 @@ time_t get_gpstime(void) {
time_t t = 0;
if ((gps.time.age() < gpsDelay_ms) && (gps.time.isValid()) && (gps.date.isValid())) {
if ((gps.time.age() < gpsDelay_ms) && (gps.time.isValid()) &&
(gps.date.isValid())) {
ESP_LOGD(TAG, "GPS time age: %dms, second: %d, is valid: %s", gps.time.age(), gps.time.second(),
gps.time.isValid() ? "yes" : "no");
ESP_LOGD(TAG, "GPS time age: %dms, is valid: %s, second: %d,",
gps.time.age(),
(gps.time.isValid() && gps.date.isValid()) ? "yes" : "no",
gps.time.second());
t = tmConvert(gps.date.year(), gps.date.month(), gps.date.day(),
gps.time.hour(), gps.time.minute(), gps.time.second());

View File

@ -92,8 +92,6 @@ void IF482_Pulse(time_t t) {
static const TickType_t txDelay =
pdMS_TO_TICKS(IF482_PULSE_LENGTH - tx_Ticks(IF482_FRAME_SIZE, HAS_IF482));
//TickType_t startTime = xTaskGetTickCount();
//vTaskDelayUntil(&startTime, txDelay); // wait until moment to fire
vTaskDelay(txDelay); // wait until moment to fire
IF482.print(IF482_Frame(t + 1)); // note: if482 telegram for *next* second
}

View File

@ -101,7 +101,6 @@ void timepulse_start(void) {
void IRAM_ATTR CLOCKIRQ(void) {
BaseType_t xHigherPriorityTaskWoken;
time_t t = SyncToPPS(); // calibrates UTC systime, see Time.h
xHigherPriorityTaskWoken = pdFALSE;