mageshms / arducopter

Automatically exported from code.google.com/p/arducopter
0 stars 0 forks source link

Missing definition of GPS_PROTOCOL_AUTO #168

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Arducoper NG or ACM? ACM
What steps will reproduce the problem?
1. set GPS_PROTOCOL_AUTO as GPS_PROTOCOL_NMEA
2.
3.

What is the expected output? What do you see instead?
The GPS can not be configured as NMEA.

What version of the product are you using? On what operating system?
ACM 2

Please provide any additional information below.

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 in ArduCopterMega.pde:

#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 ACM. What I suggest is add 
a definition of GPS_PROTOCOL_AUTO in defines.h, e.g.
#define GPS_PROTOCOL_AUTO 7 // or whatever else

I fixed the same problem in APMv2, but I don't have write access to the ACM 
code, so please check the problem and make some necessary change.

Original issue reported on code.google.com by hazy...@gmail.com on 25 May 2011 at 4:59

GoogleCodeExporter commented 8 years ago
ok, np.

Original comment by jasonshort on 27 May 2011 at 5:05