From: Keith Packard Date: Mon, 10 Dec 2012 02:28:33 +0000 (-0800) Subject: altos: Use alt_t value to hold displayed height in micropeak X-Git-Tag: micropeak-build-2012-12-09 X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=commitdiff_plain;h=c233ef67f42c14cb1d0e0542a9523b279f826af5 altos: Use alt_t value to hold displayed height in micropeak Heights are 32 bits (to get .1 meter resolution) in micropeak; make sure we have enough bits while blinking out the computed value. Signed-off-by: Keith Packard --- diff --git a/src/micropeak/ao_report_tiny.c b/src/micropeak/ao_report_tiny.c index 109af1ed..bdcc131e 100644 --- a/src/micropeak/ao_report_tiny.c +++ b/src/micropeak/ao_report_tiny.c @@ -38,8 +38,8 @@ ao_report_digit(uint8_t digit) __reentrant void ao_report_altitude(void) { - __pdata int16_t agl = ao_max_height; - __xdata uint8_t digits[10]; + __pdata alt_t agl = ao_max_height; + static __xdata uint8_t digits[11]; __pdata uint8_t ndigits, i; if (agl < 0)