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);
This commit is contained in:
geeksville 2020-01-17 15:19:18 -08:00
parent e36d706c95
commit a1166364a7

View File

@ -80,7 +80,7 @@ static void gps_loop() {
Serial.println(t); Serial.println(t);
sprintf(t, "Lng: %f", _gps.location.lng()); sprintf(t, "Lng: %f", _gps.location.lng());
Serial.println(t); Serial.println(t);
sprintf(t, "Alt: %f", altitudeGps); sprintf(t, "Alt: %d", altitudeGps);
Serial.println(t); Serial.println(t);
sprintf(t, "Hdop: %d", hdopGps); sprintf(t, "Hdop: %d", hdopGps);
Serial.println(t); Serial.println(t);