Restore GPS control shutdown for externally started receivers
This commit is contained in:
1 parent
36ec9b8bd3
commit
e0f46a5014
4 files changed
+42
-6
No files matched your search
@@ -146,14 +146,16 @@ public :
|
||||
|
||||
void stop() override {
|
||||
_stop_calls++;
|
||||
if (!_started) return;
|
||||
_started = false;
|
||||
// RAK discovery and board code can power GPS without begin(). Always
|
||||
// force the control pins off; only release a claim acquired here.
|
||||
if (_pin_en != -1) {
|
||||
digitalWrite(_pin_en, !GPS_EN_ACTIVE);
|
||||
}
|
||||
if (_pin_reset != -1) {
|
||||
digitalWrite(_pin_reset, GPS_RESET_ACTIVE);
|
||||
}
|
||||
if (!_started) return;
|
||||
_started = false;
|
||||
release();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user