diff --git a/flight/modules/GPS/DJI.c b/flight/modules/GPS/DJI.c index f12c34ffb..a02e8301c 100644 --- a/flight/modules/GPS/DJI.c +++ b/flight/modules/GPS/DJI.c @@ -290,16 +290,15 @@ static void parse_dji_gps(struct DJIPacket *dji, GPSPositionSensorData *gpsPosit } gpsPosition->SensorType = GPSPOSITIONSENSOR_SENSORTYPE_DJI; gpsPosition->AutoConfigStatus = GPSPOSITIONSENSOR_AUTOCONFIGSTATUS_DISABLED; - // gpsPosition->BaudRate = GPSPOSITIONSENSOR_BAUDRATE_115200; GPSPositionSensorSet(gpsPosition); #if !defined(PIOS_GPS_MINIMAL) // Time is valid, set 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 // 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 // this is part of the DJI protocol // see DJI.h for further info diff --git a/flight/modules/GPS/GPS.c b/flight/modules/GPS/GPS.c index 4bf899378..04a38f8f4 100644 --- a/flight/modules/GPS/GPS.c +++ b/flight/modules/GPS/GPS.c @@ -61,10 +61,14 @@ PERF_DEFINE_COUNTER(counterBytesIn); PERF_DEFINE_COUNTER(counterRate); 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) #define ANY_GPS_PARSER #endif -#if (defined(ANY_GPS_PARSER)) && !defined(PIOS_GPS_MINIMAL) +#if defined(ANY_GPS_PARSER) && !defined(PIOS_GPS_MINIMAL) #define ANY_FULL_GPS_PARSER #endif #if (defined(PIOS_INCLUDE_HMC5X83) || defined(PIOS_INCLUDE_GPS_UBX_PARSER) || defined(PIOS_INCLUDE_GPS_DJI_PARSER)) && !defined(PIOS_GPS_MINIMAL)