mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
Merge pull request #1633 from weebl2000/fix/gps-uart-power-leak
Fix GPS UART consuming +8mA when disabled (nRF52)
This commit is contained in:
commit
d7ad89046b
2 changed files with 7 additions and 2 deletions
|
|
@ -707,7 +707,9 @@ void EnvironmentSensorManager::loop() {
|
||||||
static long next_gps_update = 0;
|
static long next_gps_update = 0;
|
||||||
|
|
||||||
#if ENV_INCLUDE_GPS
|
#if ENV_INCLUDE_GPS
|
||||||
_location->loop();
|
if (gps_active) {
|
||||||
|
_location->loop();
|
||||||
|
}
|
||||||
if (millis() > next_gps_update) {
|
if (millis() > next_gps_update) {
|
||||||
|
|
||||||
if(gps_active){
|
if(gps_active){
|
||||||
|
|
|
||||||
|
|
@ -79,6 +79,9 @@ public :
|
||||||
if (_pin_en != -1) {
|
if (_pin_en != -1) {
|
||||||
digitalWrite(_pin_en, !PIN_GPS_EN_ACTIVE);
|
digitalWrite(_pin_en, !PIN_GPS_EN_ACTIVE);
|
||||||
}
|
}
|
||||||
|
if (_pin_reset != -1) {
|
||||||
|
digitalWrite(_pin_reset, GPS_RESET_FORCE);
|
||||||
|
}
|
||||||
if (_peripher_power) _peripher_power->release();
|
if (_peripher_power) _peripher_power->release();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue