mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-20 17:52:35 +00:00
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:
@@ -99,6 +99,10 @@ void setGPSPower(bool on)
|
||||
{
|
||||
LOG_INFO("Setting GPS power=%d\n", on);
|
||||
|
||||
#ifdef PIN_GPS_EN
|
||||
digitalWrite(PIN_GPS_EN, on ? 1 : 0);
|
||||
#endif
|
||||
|
||||
#ifdef HAS_PMU
|
||||
if (pmu_found && PMU) {
|
||||
uint8_t model = PMU->getChipModel();
|
||||
@@ -185,7 +189,7 @@ static void waitEnterSleep()
|
||||
|
||||
void doGPSpowersave(bool on)
|
||||
{
|
||||
#ifdef HAS_PMU
|
||||
#if defined(HAS_PMU) || defined(PIN_GPS_EN)
|
||||
if (on) {
|
||||
LOG_INFO("Turning GPS back on\n");
|
||||
gps->forceWake(1);
|
||||
|
||||
Reference in New Issue
Block a user