GPS Library does not compile
Moderators: adafruit_support_bill, adafruit

GPS Library does not compile

by kpharg on Tue Nov 06, 2012 10:53 pm

Just got the latest version of the GPS library and I get this when trying to compile any example.

Applications/Arduino.app/Contents/Resources/Java/libraries/Adafruit_GPS/Adafruit_GPS.cpp:350: error: no 'boolean Adafruit_GPS::standby()' member function declared in class 'Adafruit_GPS'
/Applications/Arduino.app/Contents/Resources/Java/libraries/Adafruit_GPS/Adafruit_GPS.cpp:362: error: no 'boolean Adafruit_GPS::wakeup()' member function declared in class 'Adafruit_GPS'
kpharg
 
Posts: 6
Joined: Fri Aug 24, 2012 4:38 pm

Re: GPS Library does not compile

by matsup on Wed Nov 07, 2012 7:28 am

I met the same situation.

I solved the problem as follows;

(1) you should add 2 lines in Adafruit_GPS.h.
In your case, Adafruit_GPS.h will be at
Applications/Arduino.app/Contents/Resources/Java/libraries/Adafruit_GPS/Adafruit_GPS.h

Following 2 lines should be added in class Adafruit_GPS { } (Maybe after the line including "boolean paused;")
boolean standby();
boolean wakeup();

(2) You should also add
#define PMTK_STANDBY "$PMTK161,0*28"
in Adafruit_GPS.h, line 55 or somewhere. You need this one in Adafruit_GPS.cpp.

(3) Maybe you need PMTK_AWAKE also in Adafruit_GPS.cpp.
But I do now know what strings should be defined.
Therefore I modified in Adafruit_GPS.cpp
return waitForSentence(PMTK_AWAKE);
to
return waitForSentence("PMTK_AWAKE");
(I think this is not the BEST solution. I think we should define PMTK_AWAKE in Adafruit_GPS.h,
but I do not know the GPS unit response against to wakeup. )
matsup
 
Posts: 2
Joined: Tue Oct 30, 2012 7:14 am

Re: GPS Library does not compile

by kpharg on Thu Nov 08, 2012 1:29 am

Yeah I just removed the two methods to get it to compile.

Shouldn't this be fixed in the git repository?
kpharg
 
Posts: 6
Joined: Fri Aug 24, 2012 4:38 pm

Re: GPS Library does not compile

by matsup on Thu Nov 08, 2012 2:48 am

The git repository should be fixed, but I do not know how and who can do it. (I don't know the git system....)
I commented through "Feedback and Corrections" of the tutorial site of "Adafruit Ultimate GPS".
matsup
 
Posts: 2
Joined: Tue Oct 30, 2012 7:14 am

Re: GPS Library does not compile

by adafruit_support_bill on Thu Nov 08, 2012 7:23 am

You can also post an issue on the Git repository.
User avatar
adafruit_support_bill
 
Posts: 32625
Joined: Sat Feb 07, 2009 10:11 am