2 * Copyright © 2009 Keith Packard <keithp@keithp.com>
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
14 * You should have received a copy of the GNU General Public License along
15 * with this program; if not, write to the Free Software Foundation, Inc.,
16 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
21 static const char * __xdata flight_reports[] = {
22 "...", /* startup, 'S' */
24 ".--.", /* launchpad 'P' */
25 "-...", /* boost 'B' */
26 "-.-.", /* coast 'C' */
27 ".-", /* apogee 'A' */
28 "-..", /* drogue 'D' */
30 ".-..", /* landed 'L' */
31 ".-.-.-", /* invalid */
35 #define signal(time) ao_beep_for(AO_BEEP_MID, time)
37 #define signal(time) ao_led_for(AO_LED_RED, time)
39 #define pause(time) ao_delay(time)
44 char *r = flight_reports[ao_flight_state];
51 signal(AO_MS_TO_TICKS(200));
53 signal(AO_MS_TO_TICKS(600));
54 pause(AO_MS_TO_TICKS(200));
58 static __xdata ao_report_wait;
61 ao_report_notify(void)
63 ao_wakeup(&ao_report_wait);
71 ao_sleep(&ao_report_wait);
75 static __xdata struct ao_task ao_report_task;
80 ao_add_task(&ao_report_task, ao_report);