Split out ao_state_names to separate file
authorKeith Packard <keithp@keithp.com>
Thu, 14 May 2009 03:38:11 +0000 (20:38 -0700)
committerKeith Packard <keithp@keithp.com>
Thu, 14 May 2009 03:38:11 +0000 (20:38 -0700)
Allows state names to be used in programs without monitoring enabled.

Signed-off-by: Keith Packard <keithp@keithp.com>
Makefile
ao_monitor.c
ao_state.c [new file with mode: 0644]

index d574c67cd442e528a850041fdb1021dc11b92cc4..6fda8965dd2a3c6c7d4e0a467eeb8bfb0ee52dbc 100644 (file)
--- 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
index 5930afaa85b8c01af4dbcb1b6480253c23535370..2f6584bc3dc29f7d37e9ea8d42b5ca787d12c32b 100644 (file)
 
 #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 (file)
index 0000000..96b4c1a
--- /dev/null
@@ -0,0 +1,23 @@
+/*
+ * Copyright © 2009 Keith Packard <keithp@keithp.com>
+ *
+ * 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"
+};