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

error parsing time #758

Closed
yazantab opened this issue Oct 31, 2023 · 0 comments · Fixed by #761
Closed

error parsing time #758

yazantab opened this issue Oct 31, 2023 · 0 comments · Fixed by #761

Comments

@yazantab
Copy link

yazantab commented Oct 31, 2023

if (waitResponse(10000L, GF(GSM_NL "+QGPSLOC:")) != 1) {

on line 357, GF(GSM_NL "+QGPSLOC:" should be replaced by GF(GSM_NL "+QGPSLOC: " (with a space at the end before the dopple quotation mark) to solve a parsing problem. when you try to get the time the data will be wrong, because out of a NMEA-msg:
+QGPSLOC: 083244.0 ......
the time should be as following:
hh: 08
mm: 32
ss: 44

however because of the space the getGPS method will consider the space as a digit and give for that reason the following time:
hh: 0
mm: 83
ss: 244

ihour = streamGetIntLength(2); // Two digit hour
here the space will be considers as digit

the suggested solution at the top would solve the problem

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

Successfully merging a pull request may close this issue.

1 participant