From: Keith Packard Date: Thu, 14 May 2009 03:38:11 +0000 (-0700) Subject: Split out ao_state_names to separate file X-Git-Tag: 0.2~3 X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=commitdiff_plain;h=05493b98eb1ae4d30cb0b600849d70b03fa33594 Split out ao_state_names to separate file Allows state names to be used in programs without monitoring enabled. Signed-off-by: Keith Packard --- diff --git a/Makefile b/Makefile index d574c67c..6fda8965 100644 --- a/Makefile +++ b/Makefile @@ -44,7 +44,8 @@ ALTOS_DRIVER_SRC = \ ao_usb.c TELE_COMMON_SRC = \ - ao_gps_print.c + ao_gps_print.c \ + ao_state.c # # Receiver code diff --git a/ao_monitor.c b/ao_monitor.c index 5930afaa..2f6584bc 100644 --- a/ao_monitor.c +++ b/ao_monitor.c @@ -17,11 +17,6 @@ #include "ao.h" -const char const * const ao_state_names[] = { - "startup", "idle", "pad", "boost", "coast", - "apogee", "drogue", "main", "landed", "invalid" -}; - __xdata uint8_t ao_monitoring; __pdata uint8_t ao_monitor_led; diff --git a/ao_state.c b/ao_state.c new file mode 100644 index 00000000..96b4c1a4 --- /dev/null +++ b/ao_state.c @@ -0,0 +1,23 @@ +/* + * Copyright © 2009 Keith Packard + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. + */ + +#include "ao.h" + +const char const * const ao_state_names[] = { + "startup", "idle", "pad", "boost", "coast", + "apogee", "drogue", "main", "landed", "invalid" +};