publish_gps.ino sample code

Post Reply
Posts: 2
Joined: Wed Jul 08, 2020 8:47 am

publish_gps.ino sample code

Post by watsys » Wed Jul 08, 2020 8:52 am

In your example code, Connect-ESP32-GPS-MQTT/publish_gps.ino I found line 84 snprintf format issues, and I think a decimal point is missing, "m1=%lf;%lf" should read "m1=%.lf;%.lf" - I used this example to publish other sensor data and had to add the decimal point to get the corrrect no of decimal places. Is this right?

Site Admin
Posts: 11
Joined: Sat Dec 15, 2018 5:14 pm

Re: publish_gps.ino sample code

Post by AskGuru » Wed Jul 08, 2020 10:04 pm

Hi watsys,

Normally you don't need to add the point to the variable. The actual code works fine.

Please take a look to this detailed guide: ... -6m-module/

Thank you.

Post Reply