From c233ef67f42c14cb1d0e0542a9523b279f826af5 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Sun, 9 Dec 2012 18:28:33 -0800 Subject: 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 --- src/micropeak/ao_report_tiny.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/micropeak/ao_report_tiny.c') 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) -- cgit v1.2.3 From d309fcff54fe6904fb860f33c15fcb7d1c96e91b Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Tue, 11 Dec 2012 14:41:53 -0800 Subject: altos: Increase MicroPeak blink times a bit make the 0 longer (1 sec now), and make the time between digits longer (also 1 sec now) Signed-off-by: Keith Packard --- src/micropeak/ao_report_tiny.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/micropeak/ao_report_tiny.c') diff --git a/src/micropeak/ao_report_tiny.c b/src/micropeak/ao_report_tiny.c index bdcc131e..0e8e287f 100644 --- a/src/micropeak/ao_report_tiny.c +++ b/src/micropeak/ao_report_tiny.c @@ -24,7 +24,7 @@ static void ao_report_digit(uint8_t digit) __reentrant { if (!digit) { - mid(AO_MS_TO_TICKS(600)); + mid(AO_MS_TO_TICKS(1000)); pause(AO_MS_TO_TICKS(300)); } else { while (digit--) { @@ -32,7 +32,7 @@ ao_report_digit(uint8_t digit) __reentrant pause(AO_MS_TO_TICKS(300)); } } - pause(AO_MS_TO_TICKS(600)); + pause(AO_MS_TO_TICKS(1000)); } void -- cgit v1.2.3