From a1166364a72bf035519664b615c0df3f92b5319f Mon Sep 17 00:00:00 2001 From: geeksville Date: Fri, 17 Jan 2020 15:19:18 -0800 Subject: [PATCH] altitudeGps is an integer, fix the format string. /home/kevinh/development/lora/ttgo-tbeam-ttn-tracker/main/gps.ino: In function 'void buildPacket(uint8_t*)': /home/kevinh/development/lora/ttgo-tbeam-ttn-tracker/main/gps.ino:83:42: warning: format '%f' expects argument of type 'double', but argument 3 has type 'int' [-Wformat=] sprintf(t, "Alt: %f", altitudeGps); --- main/gps.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/gps.ino b/main/gps.ino index ca40a8f..69e4d6a 100644 --- a/main/gps.ino +++ b/main/gps.ino @@ -80,7 +80,7 @@ static void gps_loop() { Serial.println(t); sprintf(t, "Lng: %f", _gps.location.lng()); Serial.println(t); - sprintf(t, "Alt: %f", altitudeGps); + sprintf(t, "Alt: %d", altitudeGps); Serial.println(t); sprintf(t, "Hdop: %d", hdopGps); Serial.println(t);