summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2009-05-13 20:38:11 -0700
committerKeith Packard <keithp@keithp.com>2009-05-13 20:38:11 -0700
commit05493b98eb1ae4d30cb0b600849d70b03fa33594 (patch)
tree4b5e47b0d0305bdb593fefd71811a7dcbb803867
parentd085d43701e3cdd2119e947a9ae45baa78c80318 (diff)
Split out ao_state_names to separate file
Allows state names to be used in programs without monitoring enabled. Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r--Makefile3
-rw-r--r--ao_monitor.c5
-rw-r--r--ao_state.c23
3 files changed, 25 insertions, 6 deletions
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 <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"
+};