move resetSentTime out of extensions

potentially useful elsewhere, and small
This commit is contained in:
Rick Sellens 2020-01-19 08:06:26 -05:00
parent 4bfbd03b90
commit 8739f08ca6
2 changed files with 10 additions and 13 deletions

View File

@ -343,6 +343,14 @@ float Adafruit_GPS::secondsSinceTime() { return (millis() - lastTime) / 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
@ -845,14 +853,3 @@ static boolean strStartsWith(const char *str, const char *prefix) {
}
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

View File

@ -104,7 +104,8 @@ public:
float secondsSinceFix();
float secondsSinceTime();
float secondsSinceDate();
void resetSentTime();
boolean wakeup(void);
boolean standby(void);
@ -182,7 +183,6 @@ public:
// NMEA additional public functions
char *build(char *nmea, const char *thisSource, const char *thisSentence,
char ref = 'R');
void resetSentTime();
// NMEA additional public variables
char txtTXT[63] = {0}; ///< text content from most recent TXT sentence