diff --git a/libraries/AP_NMEA_Output/AP_NMEA_Output.h b/libraries/AP_NMEA_Output/AP_NMEA_Output.h index 34e411ee07..4ea922d953 100644 --- a/libraries/AP_NMEA_Output/AP_NMEA_Output.h +++ b/libraries/AP_NMEA_Output/AP_NMEA_Output.h @@ -27,6 +27,10 @@ #if HAL_NMEA_OUTPUT_ENABLED +#ifndef NMEA_MAX_OUTPUTS +#define NMEA_MAX_OUTPUTS 3 +#endif + #include class AP_NMEA_Output { @@ -45,7 +49,7 @@ private: uint8_t _nmea_checksum(const char *str); uint8_t _num_outputs; - AP_HAL::UARTDriver* _uart[SERIALMANAGER_NUM_PORTS]; + AP_HAL::UARTDriver* _uart[NMEA_MAX_OUTPUTS]; uint32_t _last_run_ms; };