You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have used Adafruit_FONA library for my project.
Now I want to change getGPS() function according to my need. Actually, I want more GPS parameters from GPS response string. like GNSS satellite used etc.
But whenever I change that function, I get an error like this.
C:\Users\Bprajapati\Documents\Arduino\libraries\Code\Adafruit_FONA.cpp:932:9: error: prototype for 'boolean Adafruit_FONA::getGPS(float*, float*, float*, float*, float*, float*)' does not match any in class 'Adafruit_FONA'
You have to change it in both the Adafruit_FONA.cpp AND the function declaration in Adafruit_FONA.h. Seems like you forgot to include the change to getGPS with regards to the float *timestamp parameter. Once you add that parameter to your header files, you should be ok.
Hello,
I have used Adafruit_FONA library for my project.
Now I want to change getGPS() function according to my need. Actually, I want more GPS parameters from GPS response string. like GNSS satellite used etc.
But whenever I change that function, I get an error like this.
C:\Users\Bprajapati\Documents\Arduino\libraries\Code\Adafruit_FONA.cpp:932:9: error: prototype for 'boolean Adafruit_FONA::getGPS(float*, float*, float*, float*, float*, float*)' does not match any in class 'Adafruit_FONA'
boolean Adafruit_FONA::getGPS(float *lat, float *lon, float *speed_kph, float *heading, float *altitude, float *timestamp) {
In file included from C:\Users\Bprajapati\Documents\Arduino\libraries\Code\Adafruit_FONA.cpp:19:0:
C:\Users\Bprajapati\Documents\Arduino\libraries\Code\Adafruit_FONA.h:158:11: error: candidates are: boolean Adafruit_FONA::getGPS(float*, float*, float*, float*, float*)
boolean getGPS(float *lat, float *lon, float *speed_kph=0, float *heading=0, float *altitude=0);
Change in library is like this,
boolean Adafruit_FONA::getGPS(float *lat, float *lon, float *speed_kph, float *heading, float *altitude, float *timestamp) {
It doesn't work.
Can I change function like this?
Thanks!!
The text was updated successfully, but these errors were encountered: