Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't able to change library function getGPS() !! #97

Open
Bhavikjp opened this issue Jul 27, 2018 · 1 comment
Open

Can't able to change library function getGPS() !! #97

Bhavikjp opened this issue Jul 27, 2018 · 1 comment

Comments

@Bhavikjp
Copy link

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!!

@Dygear
Copy link

Dygear commented Jul 2, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants