summaryrefslogtreecommitdiff
path: root/ao_cmd.c
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2009-04-26 00:11:32 -0700
committerKeith Packard <keithp@keithp.com>2009-04-26 00:11:32 -0700
commit38a0b61b0a0b3c00f064c8d562950a17a6ddff4a (patch)
treeee099db3cfa30d5fe7a94523fe1e7a46f64d238d /ao_cmd.c
parentc65f1a1acd2ca00758833cec5d3f8056d303d3e2 (diff)
Add configuration support
Current config variables: Main deploy altitude above launch (in meters) Acceleration zero g calibration (manual or automatic) Radio channel (freq = 435.550MHz + channel * 100kHz) Callsign (max 8 characters) Supporting this involved shuffling code around so that the non-telemetrum builds could include only the stuff they needed.
Diffstat (limited to 'ao_cmd.c')
-rw-r--r--ao_cmd.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/ao_cmd.c b/ao_cmd.c
index 7f786536..91abe7f0 100644
--- a/ao_cmd.c
+++ b/ao_cmd.c
@@ -152,9 +152,8 @@ ao_cmd_hex(void)
ao_cmd_status = r;
}
-#if 0
-static void
-decimal(void)
+void
+ao_cmd_decimal(void)
{
__xdata uint8_t r = ao_cmd_lex_error;
@@ -162,7 +161,7 @@ decimal(void)
ao_cmd_white();
for(;;) {
if ('0' <= ao_cmd_lex_c && ao_cmd_lex_c <= '9')
- ao_cmd_lex_i = (ao_cmd_lex_i * 10 ) | (ao_cmd_lex_c - '0');
+ ao_cmd_lex_i = (ao_cmd_lex_i * 10) + (ao_cmd_lex_c - '0');
else
break;
r = ao_cmd_success;
@@ -171,7 +170,6 @@ decimal(void)
if (r != ao_cmd_success)
ao_cmd_status = r;
}
-#endif
static void
eol(void)