mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-23 00:04:02 -04:00
GPS: exclude SIRF and NMEA on APM copter build
This only works for the centralised builder, the modified Arduino IDE will still include the NMEA and SIRF drivers meaning it will require approximately 4k additional flash which may push us over the limit on the APM2. Users will instead need to exclude other features to get below the APM1/2 flash limit.
This commit is contained in:
parent
527de3f2e4
commit
f630f9abc3
@ -193,7 +193,7 @@ AP_GPS::detect_instance(uint8_t instance)
|
||||
new_gps = new AP_GPS_SBP(*this, state[instance], port);
|
||||
}
|
||||
#endif // HAL_CPU_CLASS
|
||||
#if !defined( __AVR_ATmega1280__ )
|
||||
#if !defined(GPS_SKIP_SIRF_NMEA)
|
||||
// save a bit of code space on a 1280
|
||||
else if ((_type[instance] == GPS_TYPE_AUTO || _type[instance] == GPS_TYPE_SIRF) &&
|
||||
AP_GPS_SIRF::_detect(dstate->sirf_detect_state, data)) {
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include <AP_Param.h>
|
||||
#include <AP_Math.h>
|
||||
#include <GCS_MAVLink.h>
|
||||
#include <AP_Vehicle.h>
|
||||
#include "GPS_detect_state.h"
|
||||
|
||||
/**
|
||||
@ -42,6 +43,15 @@
|
||||
#define GPS_RTK_AVAILABLE 0
|
||||
#endif
|
||||
|
||||
/**
|
||||
* save flash by skipping NMEA and SIRF support on ArduCopter on APM1/2 or any frame type on AVR1280 CPUs
|
||||
*/
|
||||
#if HAL_CPU_CLASS < HAL_CPU_CLASS_75 && defined(APM_BUILD_DIRECTORY)
|
||||
#if (APM_BUILD_TYPE(APM_BUILD_ArduCopter) || defined(__AVR_ATmega1280__))
|
||||
#define GPS_SKIP_SIRF_NMEA
|
||||
#endif
|
||||
#endif
|
||||
|
||||
class DataFlash_Class;
|
||||
class AP_GPS_Backend;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user