rodrigoenriquez / ardupilot-mega

Automatically exported from code.google.com/p/ardupilot-mega
0 stars 0 forks source link

Missing definition of GPS_PROTOCOL_AUTO #346

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I can not find any definition of GPS_PROTOCOL_AUTO in the source codes. The 
arduino seems to assumed it as 0, which is same as GPS_PROTOCOL_NMEA. Thus 
whenever I set GPS_PROTOCOL to be GPS_PROTOCOL_NMEA, it is actually set to be 
GPS_PROTOCOL_AUTO because of following code:

#if   GPS_PROTOCOL == GPS_PROTOCOL_AUTO   //which is also true when 
GPS_PROTOCOL == GPS_PROTOCOL_NMEA
AP_GPS_Auto     g_gps_driver(&Serial1, &g_gps);
#elif GPS_PROTOCOL == GPS_PROTOCOL_NMEA
AP_GPS_NMEA     g_gps_driver(&Serial1);

So basically the GPS can never configured as NMEA in APM v2. What I suggest is 
add a definition of GPS_PROTOCOL_AUTO in defines.h, e.g.
#define GPS_PROTOCOL_NMEA 7 // or whatever else

Original issue reported on code.google.com by hazy...@gmail.com on 19 May 2011 at 8:22

GoogleCodeExporter commented 8 years ago
I add the definition of GPS_PROTOCOL_AUTO, so it is fixed now

Original comment by hazy...@gmail.com on 25 May 2011 at 5:01

GoogleCodeExporter commented 8 years ago

Original comment by hazy...@gmail.com on 25 May 2011 at 6:18