altos: use %lu for APRS altitude in sprintf
authorKeith Packard <keithp@keithp.com>
Tue, 11 Sep 2018 07:06:44 +0000 (00:06 -0700)
committerKeith Packard <keithp@keithp.com>
Sat, 13 Oct 2018 15:21:58 +0000 (08:21 -0700)
It's a long.

Signed-off-by: Keith Packard <keithp@keithp.com>
src/drivers/ao_aprs.c

index a801667..2f17d04 100644 (file)
@@ -804,10 +804,10 @@ static int tncPositionPacket(void)
            /* Convert from meters to feet */
            alt = (alt * 328 + 50) / 100;
 
-           buf += sprintf((char *) tncBuffer, "!%02u%02u.%02u%c/%03u%02u.%02u%c'/A=%06u ",
+           buf += sprintf((char *) tncBuffer, "!%02u%02u.%02u%c/%03u%02u.%02u%c'/A=%06lu ",
                           lat_deg, lat_min, lat_frac, lat_sign,
                           lon_deg, lon_min, lon_frac, lon_sign,
-                          alt);
+                          (long) alt);
            break;
     }
     }