move resetSentTime out of extensions
potentially useful elsewhere, and small
This commit is contained in:
parent
4bfbd03b90
commit
8739f08ca6
|
|
@ -343,6 +343,14 @@ float Adafruit_GPS::secondsSinceTime() { return (millis() - lastTime) / 1000.; }
|
||||||
/**************************************************************************/
|
/**************************************************************************/
|
||||||
float Adafruit_GPS::secondsSinceDate() { return (millis() - lastDate) / 1000.; }
|
float Adafruit_GPS::secondsSinceDate() { return (millis() - lastDate) / 1000.; }
|
||||||
|
|
||||||
|
/**************************************************************************/
|
||||||
|
/*!
|
||||||
|
@brief Fakes time of receipt of a sentence. Use between build() and parse()
|
||||||
|
to make the timing look like the sentence arrived from the GPS.
|
||||||
|
*/
|
||||||
|
/**************************************************************************/
|
||||||
|
void Adafruit_GPS::resetSentTime() { sentTime = millis(); }
|
||||||
|
|
||||||
/**************************************************************************/
|
/**************************************************************************/
|
||||||
/*!
|
/*!
|
||||||
@brief How many bytes are available to read - part of 'Print'-class
|
@brief How many bytes are available to read - part of 'Print'-class
|
||||||
|
|
@ -845,14 +853,3 @@ static boolean strStartsWith(const char *str, const char *prefix) {
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef NMEA_EXTENSIONS
|
|
||||||
/**************************************************************************/
|
|
||||||
/*!
|
|
||||||
@brief Fakes time of receipt of a sentence. Use between build() and parse()
|
|
||||||
to make the timing look like the sentence arrived from the GPS.
|
|
||||||
*/
|
|
||||||
/**************************************************************************/
|
|
||||||
void Adafruit_GPS::resetSentTime() { sentTime = millis(); }
|
|
||||||
|
|
||||||
#endif // NMEA_EXTENSIONS
|
|
||||||
|
|
|
||||||
|
|
@ -104,7 +104,8 @@ public:
|
||||||
float secondsSinceFix();
|
float secondsSinceFix();
|
||||||
float secondsSinceTime();
|
float secondsSinceTime();
|
||||||
float secondsSinceDate();
|
float secondsSinceDate();
|
||||||
|
void resetSentTime();
|
||||||
|
|
||||||
boolean wakeup(void);
|
boolean wakeup(void);
|
||||||
boolean standby(void);
|
boolean standby(void);
|
||||||
|
|
||||||
|
|
@ -182,7 +183,6 @@ public:
|
||||||
// NMEA additional public functions
|
// NMEA additional public functions
|
||||||
char *build(char *nmea, const char *thisSource, const char *thisSentence,
|
char *build(char *nmea, const char *thisSource, const char *thisSentence,
|
||||||
char ref = 'R');
|
char ref = 'R');
|
||||||
void resetSentTime();
|
|
||||||
|
|
||||||
// NMEA additional public variables
|
// NMEA additional public variables
|
||||||
char txtTXT[63] = {0}; ///< text content from most recent TXT sentence
|
char txtTXT[63] = {0}; ///< text content from most recent TXT sentence
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue