PIN_GPS_EN power toggling (#2592)

* PIN_GPS_EN

* Remove extra digitalWrite

* GPS_POWER_TOGGLE macro enabled. Added WSLv3 too

* Update variant.h

* Update variant.h

* Fixed macro guard
This commit is contained in:
Ben Meadors
2023-07-08 21:01:00 -05:00
committed by GitHub
parent 65aafe7ea1
commit de53280ffc
6 changed files with 17 additions and 8 deletions

View File

@@ -419,13 +419,12 @@ bool GPS::setupGPS()
bool GPS::setup()
{
// Master power for the GPS
#ifdef PIN_GPS_EN
digitalWrite(PIN_GPS_EN, 1);
pinMode(PIN_GPS_EN, OUTPUT);
#endif
#ifdef HAS_PMU
#if defined(HAS_PMU) || defined(PIN_GPS_EN)
if (config.position.gps_enabled) {
#ifdef PIN_GPS_EN
pinMode(PIN_GPS_EN, OUTPUT);
#endif
setGPSPower(true);
}
#endif