altos: Use alt_t value to hold displayed height in micropeak
[fw/altos] / src / micropeak / ao_report_tiny.c
index 5937508be239b20ec32775f6eb7f1366b423540f..bdcc131eacdc2f783e2d4c880f8051088f35d5a8 100644 (file)
@@ -17,7 +17,7 @@
 
 #include <ao.h>
 
-#define mid(time)      ao_led_for(AO_LED_BLUE, time)
+#define mid(time)      ao_led_for(AO_LED_REPORT, time)
 #define pause(time)    ao_delay(time)
 
 static void
@@ -25,21 +25,21 @@ ao_report_digit(uint8_t digit) __reentrant
 {
        if (!digit) {
                mid(AO_MS_TO_TICKS(600));
-               pause(AO_MS_TO_TICKS(200));
+               pause(AO_MS_TO_TICKS(300));
        } else {
                while (digit--) {
-                       mid(AO_MS_TO_TICKS(200));
-                       pause(AO_MS_TO_TICKS(200));
+                       mid(AO_MS_TO_TICKS(300));
+                       pause(AO_MS_TO_TICKS(300));
                }
        }
-       pause(AO_MS_TO_TICKS(300));
+       pause(AO_MS_TO_TICKS(600));
 }
 
 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)