mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-31 15:10:40 +00:00
Merge branch 'dev'
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
|
||||
#include "GPS.h"
|
||||
#include "configuration.h"
|
||||
#include "timing.h"
|
||||
#include <assert.h>
|
||||
#include <time.h>
|
||||
|
||||
@@ -36,7 +35,7 @@ void readFromRTC()
|
||||
struct timeval tv; /* btw settimeofday() is helpfull here too*/
|
||||
|
||||
if (!gettimeofday(&tv, NULL)) {
|
||||
uint32_t now = timing::millis();
|
||||
uint32_t now = millis();
|
||||
|
||||
DEBUG_MSG("Read RTC time as %ld (cur millis %u) valid=%d\n", tv.tv_sec, now, timeSetFromGPS);
|
||||
timeStartMsec = now;
|
||||
@@ -79,7 +78,7 @@ void perhapsSetRTC(struct tm &t)
|
||||
|
||||
uint32_t getTime()
|
||||
{
|
||||
return ((timing::millis() - timeStartMsec) / 1000) + zeroOffsetSecs;
|
||||
return ((millis() - timeStartMsec) / 1000) + zeroOffsetSecs;
|
||||
}
|
||||
|
||||
uint32_t getValidTime()
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#include "NMEAGPS.h"
|
||||
#include "configuration.h"
|
||||
#include "timing.h"
|
||||
|
||||
static int32_t toDegInt(RawDegrees d)
|
||||
{
|
||||
@@ -19,7 +18,7 @@ void NMEAGPS::loop()
|
||||
reader.encode(c);
|
||||
}
|
||||
|
||||
uint32_t now = timing::millis();
|
||||
uint32_t now = millis();
|
||||
if ((now - lastUpdateMsec) > 20 * 1000) { // Ugly hack for now - limit update checks to once every 20 secs (but still consume
|
||||
// serial chars at whatever rate)
|
||||
lastUpdateMsec = now;
|
||||
|
||||
Reference in New Issue
Block a user