From 25841c072a78888441ce153e2c56cfa980351597 Mon Sep 17 00:00:00 2001 From: a-f-G-U-C <65810997+a-f-G-U-C@users.noreply.github.com> Date: Thu, 2 Sep 2021 13:11:11 +0000 Subject: [PATCH] allow GPS modules to redefine GPS::hasLock() --- src/gps/GPS.cpp | 2 ++ src/gps/GPS.h | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gps/GPS.cpp b/src/gps/GPS.cpp index 4446540a3..0019bf307 100644 --- a/src/gps/GPS.cpp +++ b/src/gps/GPS.cpp @@ -80,6 +80,8 @@ GPS::~GPS() notifyDeepSleepObserver.unobserve(); } +bool GPS::hasLock() { return hasValidLocation; } + // Allow defining the polarity of the WAKE output. default is active high #ifndef GPS_WAKE_ACTIVE #define GPS_WAKE_ACTIVE 1 diff --git a/src/gps/GPS.h b/src/gps/GPS.h index 6de72f29c..63d594863 100644 --- a/src/gps/GPS.h +++ b/src/gps/GPS.h @@ -57,8 +57,8 @@ class GPS : private concurrency::OSThread */ virtual bool setup(); - /// Returns ture if we have acquired GPS lock. - bool hasLock() const { return hasValidLocation; } + /// Returns true if we have acquired GPS lock. + virtual bool hasLock(); /// Return true if we are connected to a GPS bool isConnected() const { return hasGPS; }