diff --git a/sw/airborne/subsystems/gps/gps_nmea.c b/sw/airborne/subsystems/gps/gps_nmea.c index 7cb4643e0f1..5ac2fd4c801 100644 --- a/sw/airborne/subsystems/gps/gps_nmea.c +++ b/sw/airborne/subsystems/gps/gps_nmea.c @@ -47,6 +47,14 @@ #include #include +#ifndef NMEA_PRINT +#define NMEA_PRINT(...) {}; +#endif + +#if NMEA_PRINT == printf +#include +#endif + struct GpsNmea gps_nmea; static void nmea_parse_GSA(void); diff --git a/sw/airborne/subsystems/gps/gps_nmea.h b/sw/airborne/subsystems/gps/gps_nmea.h index b710f509ab5..07ae0c32254 100644 --- a/sw/airborne/subsystems/gps/gps_nmea.h +++ b/sw/airborne/subsystems/gps/gps_nmea.h @@ -32,10 +32,6 @@ #include "mcu_periph/uart.h" -#ifndef DEBUG_NMEA -#define NMEA_PRINT(...) {}; -#endif - #define GPS_NB_CHANNELS 12 #define NMEA_MAXLEN 255