X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fao_report.c;h=3cf558e1d97ff9d72018fe0f14167f2c6702d9e1;hb=01aee9ebe517ed657692e0a39a31ae0ddfb5b8b0;hp=4f7fd65786743fef7ba86b5fa3794c40b83bb545;hpb=7b009b2efe3af8722c358c304c2243652594e0d5;p=fw%2Faltos diff --git a/src/ao_report.c b/src/ao_report.c index 4f7fd657..3cf558e1 100644 --- a/src/ao_report.c +++ b/src/ao_report.c @@ -48,7 +48,7 @@ static const uint8_t flight_reports[] = { #endif #define pause(time) ao_delay(time) -static __xdata enum ao_flight_state ao_report_state; +static __pdata enum ao_flight_state ao_report_state; static void ao_report_beep(void) __reentrant @@ -87,9 +87,9 @@ ao_report_digit(uint8_t digit) __reentrant static void ao_report_altitude(void) { - __xdata int16_t agl = ao_max_height; + __pdata int16_t agl = ao_max_height; __xdata uint8_t digits[10]; - __xdata uint8_t ndigits, i; + __pdata uint8_t ndigits, i; if (agl < 0) agl = 0; @@ -109,6 +109,7 @@ ao_report_altitude(void) } } +#if HAS_IGNITE static uint8_t ao_report_igniter_ready(enum ao_igniter igniter) { @@ -146,6 +147,7 @@ ao_report_continuity(void) __reentrant while (c-- && ao_flight_state == ao_flight_pad) pause(AO_MS_TO_TICKS(100)); } +#endif void ao_report(void) @@ -155,10 +157,12 @@ ao_report(void) if (ao_flight_state == ao_flight_landed) ao_report_altitude(); ao_report_beep(); +#if HAS_IGNITE if (ao_flight_state == ao_flight_idle) ao_report_continuity(); while (ao_flight_state == ao_flight_pad) ao_report_continuity(); +#endif __critical { while (ao_report_state == ao_flight_state) ao_sleep(DATA_TO_XDATA(&ao_flight_state));