From fa1d3eac1a2450d6c3d945e33b87d84615ff5b7b Mon Sep 17 00:00:00 2001 From: Stanley Huang Date: Fri, 6 Sep 2013 12:12:41 +0800 Subject: fix LAT/LNG display bug --- megalogger/megalogger.ino | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'megalogger') diff --git a/megalogger/megalogger.ino b/megalogger/megalogger.ino index 5fba25a..8beb80f 100644 --- a/megalogger/megalogger.ino +++ b/megalogger/megalogger.ino @@ -374,10 +374,10 @@ private: lcd.setFont(FONT_SIZE_MEDIUM); char buf[16]; - sprintf(buf, "%d.%ld", (int)(lat / 100000), lat % 100000); + sprintf(buf, "%d.%ld", (int)(lat / 100000), abs(lat) % 100000); lcd.setCursor(50, 18); lcd.print(buf); - sprintf(buf, "%d.%ld", (int)(lon / 100000), lon % 100000); + sprintf(buf, "%d.%ld", (int)(lon / 100000), abs(lon) % 100000); lcd.setCursor(50, 21); lcd.print(buf); int32_t alt = gps.altitude(); -- cgit v1.2.3