allow GPS modules to redefine GPS::hasLock()

This commit is contained in:
a-f-G-U-C 2021-09-02 13:11:11 +00:00 committed by GitHub
parent 8a7a3ec668
commit 25841c072a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -80,6 +80,8 @@ GPS::~GPS()
notifyDeepSleepObserver.unobserve(); notifyDeepSleepObserver.unobserve();
} }
bool GPS::hasLock() { return hasValidLocation; }
// Allow defining the polarity of the WAKE output. default is active high // Allow defining the polarity of the WAKE output. default is active high
#ifndef GPS_WAKE_ACTIVE #ifndef GPS_WAKE_ACTIVE
#define GPS_WAKE_ACTIVE 1 #define GPS_WAKE_ACTIVE 1

View File

@ -57,8 +57,8 @@ class GPS : private concurrency::OSThread
*/ */
virtual bool setup(); virtual bool setup();
/// Returns ture if we have acquired GPS lock. /// Returns true if we have acquired GPS lock.
bool hasLock() const { return hasValidLocation; } virtual bool hasLock();
/// Return true if we are connected to a GPS /// Return true if we are connected to a GPS
bool isConnected() const { return hasGPS; } bool isConnected() const { return hasGPS; }