diff options
author | Stanley Huang <stanleyhuangyc@gmail.com> | 2016-01-14 23:18:47 +1100 |
---|---|---|
committer | Stanley Huang <stanleyhuangyc@gmail.com> | 2016-01-14 23:18:47 +1100 |
commit | 47a58cc934888273a7758eb80f6ded140b7d0490 (patch) | |
tree | 17dcdcfda9932908223561c5933e938feed44414 | |
parent | feafc75f10ee241ad4ddce9bb2d0b5067e545b8b (diff) | |
download | 2021-arduino-obd-47a58cc934888273a7758eb80f6ded140b7d0490.tar.gz 2021-arduino-obd-47a58cc934888273a7758eb80f6ded140b7d0490.tar.bz2 2021-arduino-obd-47a58cc934888273a7758eb80f6ded140b7d0490.zip |
Minor update
-rw-r--r-- | megalogger/megalogger.ino | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/megalogger/megalogger.ino b/megalogger/megalogger.ino index 8626dd0..14e15bb 100644 --- a/megalogger/megalogger.ino +++ b/megalogger/megalogger.ino @@ -280,7 +280,7 @@ void initScreen() lcd.setCursor(280, 19); lcd.print("SAT:"); lcd.setCursor(184, 20); - lcd.print("LON:"); + lcd.print("LNG:"); lcd.setFontSize(FONT_SIZE_SMALL); lcd.setCursor(184, 22); @@ -393,8 +393,8 @@ void processGPS() } logger.logData(PID_GPS_TIME, (int32_t)time); - int32_t lat, lon; - gps.get_position(&lat, &lon, 0); + int32_t lat, lng; + gps.get_position(&lat, &lng, 0); byte sat = gps.satellites(); @@ -420,17 +420,13 @@ void processGPS() // display latitude lcd.setCursor(214, 19); - lcd.print(lat / 100000); - lcd.write('.'); - lcd.printLong(abs(lat) % 100000, 5); + lcd.print((float)lat / 100000, 5); // display longitude lcd.setCursor(214, 20); - lcd.print(lon / 100000); - lcd.write('.'); - lcd.printLong(abs(lon) % 100000, 5); + lcd.print((float)lng / 100000, 5); // log latitude/longitude logger.logData(PID_GPS_LATITUDE, lat); - logger.logData(PID_GPS_LONGITUDE, lon); + logger.logData(PID_GPS_LONGITUDE, lng); // display number of satellites if (sat < 100) { |