mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-03-16 08:29:15 +01:00
LP-212 extra parenthesis, throw compile error if local defines are already defined
This commit is contained in:
parent
a73b7720c5
commit
ed0e879b7c
@ -290,16 +290,15 @@ static void parse_dji_gps(struct DJIPacket *dji, GPSPositionSensorData *gpsPosit
|
|||||||
}
|
}
|
||||||
gpsPosition->SensorType = GPSPOSITIONSENSOR_SENSORTYPE_DJI;
|
gpsPosition->SensorType = GPSPOSITIONSENSOR_SENSORTYPE_DJI;
|
||||||
gpsPosition->AutoConfigStatus = GPSPOSITIONSENSOR_AUTOCONFIGSTATUS_DISABLED;
|
gpsPosition->AutoConfigStatus = GPSPOSITIONSENSOR_AUTOCONFIGSTATUS_DISABLED;
|
||||||
// gpsPosition->BaudRate = GPSPOSITIONSENSOR_BAUDRATE_115200;
|
|
||||||
GPSPositionSensorSet(gpsPosition);
|
GPSPositionSensorSet(gpsPosition);
|
||||||
|
|
||||||
#if !defined(PIOS_GPS_MINIMAL)
|
#if !defined(PIOS_GPS_MINIMAL)
|
||||||
// Time is valid, set GpsTime
|
// Time is valid, set GpsTime
|
||||||
GPSTimeData gpsTime;
|
GPSTimeData gpsTime;
|
||||||
// the lowest bit of day and the highest bit of hour overlap (xored? no stranger than that)
|
// the lowest bit of day and the highest bit of hour overlap (xored? no, stranger than that)
|
||||||
// this causes strange day/hour changes
|
// this causes strange day/hour changes
|
||||||
// we could track it here and even if we guess wrong initially
|
// we could track it here and even if we guess wrong initially
|
||||||
// we can massage the data so that time doesn't jump
|
// we can massage the data so that time doesn't jump at least
|
||||||
// and maybe make the assumption that most people will fly at 5pm, not 1am
|
// and maybe make the assumption that most people will fly at 5pm, not 1am
|
||||||
// this is part of the DJI protocol
|
// this is part of the DJI protocol
|
||||||
// see DJI.h for further info
|
// see DJI.h for further info
|
||||||
|
@ -61,10 +61,14 @@ PERF_DEFINE_COUNTER(counterBytesIn);
|
|||||||
PERF_DEFINE_COUNTER(counterRate);
|
PERF_DEFINE_COUNTER(counterRate);
|
||||||
PERF_DEFINE_COUNTER(counterParse);
|
PERF_DEFINE_COUNTER(counterParse);
|
||||||
|
|
||||||
|
#if defined(ANY_GPS_PARSER) || defined(ANY_FULL_GPS_PARSER) || defined(ANY_FULL_MAG_PARSER)
|
||||||
|
#error ANY_GPS_PARSER ANY_FULL_GPS_PARSER and ANY_FULL_MAG_PARSER should all be undefined at this point.
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(PIOS_INCLUDE_GPS_NMEA_PARSER) || defined(PIOS_INCLUDE_GPS_UBX_PARSER) || defined(PIOS_INCLUDE_GPS_DJI_PARSER)
|
#if defined(PIOS_INCLUDE_GPS_NMEA_PARSER) || defined(PIOS_INCLUDE_GPS_UBX_PARSER) || defined(PIOS_INCLUDE_GPS_DJI_PARSER)
|
||||||
#define ANY_GPS_PARSER
|
#define ANY_GPS_PARSER
|
||||||
#endif
|
#endif
|
||||||
#if (defined(ANY_GPS_PARSER)) && !defined(PIOS_GPS_MINIMAL)
|
#if defined(ANY_GPS_PARSER) && !defined(PIOS_GPS_MINIMAL)
|
||||||
#define ANY_FULL_GPS_PARSER
|
#define ANY_FULL_GPS_PARSER
|
||||||
#endif
|
#endif
|
||||||
#if (defined(PIOS_INCLUDE_HMC5X83) || defined(PIOS_INCLUDE_GPS_UBX_PARSER) || defined(PIOS_INCLUDE_GPS_DJI_PARSER)) && !defined(PIOS_GPS_MINIMAL)
|
#if (defined(PIOS_INCLUDE_HMC5X83) || defined(PIOS_INCLUDE_GPS_UBX_PARSER) || defined(PIOS_INCLUDE_GPS_DJI_PARSER)) && !defined(PIOS_GPS_MINIMAL)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user