From 47a58cc934888273a7758eb80f6ded140b7d0490 Mon Sep 17 00:00:00 2001 From: Stanley Huang Date: Thu, 14 Jan 2016 23:18:47 +1100 Subject: Minor update --- megalogger/megalogger.ino | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'megalogger') 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) { -- cgit v1.2.3