From 77244665315e2210d173d0de45edb8d0353d7094 Mon Sep 17 00:00:00 2001 From: macvenez Date: Fri, 28 Mar 2025 18:32:44 +0100 Subject: [PATCH] Possible fix for use of pin 0 as PIN_GPS_EN --- src/gps/GPS.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gps/GPS.cpp b/src/gps/GPS.cpp index 41a2ff980..59ef2c547 100644 --- a/src/gps/GPS.cpp +++ b/src/gps/GPS.cpp @@ -1370,7 +1370,7 @@ GPS *GPS::createGps() GpioVirtPin *virtPin = new GpioVirtPin(); new_gps->enablePin = virtPin; // Always at least populate a virtual pin - if (_en_gpio) { + #if defined(PIN_GPS_EN) GpioPin *p = new GpioHwPin(_en_gpio); if (!GPS_EN_ACTIVE) { // Need to invert the pin before hardware @@ -1382,7 +1382,7 @@ GPS *GPS::createGps() virtPin, p); // We just leave this created object on the heap so it can stay watching virtPin and driving en_gpio } - } + #endif #ifdef PIN_GPS_PPS // pulse per second