From 0b0996bbb09d04808a82cb77c9e67b2d64e481bd Mon Sep 17 00:00:00 2001 From: Rick Sellens Date: Wed, 29 Jan 2020 09:59:47 -0500 Subject: [PATCH] Add NMEA_EXTRAS for command line compile control --- src/Adafruit_GPS.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/Adafruit_GPS.h b/src/Adafruit_GPS.h index fc980fc..75cf7b3 100644 --- a/src/Adafruit_GPS.h +++ b/src/Adafruit_GPS.h @@ -31,8 +31,14 @@ Comment out the definition of NMEA_EXTENSIONS to make the library use as little memory as possible for GPS functionality only. The ARDUINO_ARCH_AVR test should leave it out of any compilations for the UNO and similar. */ -#ifndef ARDUINO_ARCH_AVR -#define NMEA_EXTENSIONS ///< if defined will include more NMEA sentences +#ifndef NMEA_EXTRAS // inject on the compile command line to force extensions + #ifndef ARDUINO_ARCH_AVR + #define NMEA_EXTENSIONS ///< if defined will include more NMEA sentences + #endif +#else + #if(NMEA_EXTRAS > 0) + #define NMEA_EXTENSIONS ///< if defined will include more NMEA sentences + #endif #endif #define USE_SW_SERIAL ///< comment this out if you don't want to include