summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2011-04-19 14:01:19 -0700
committerKeith Packard <keithp@keithp.com>2011-04-19 14:01:19 -0700
commit2ebdb888f6792de70b3132950a988d49752d264e (patch)
tree5ed77eab9e2ecdf0c748d6de42f3986a0b8a3618 /src
parent7f5c9986dfa2d130b6c8c14308638cce49391a6e (diff)
altosui: Eliminate ao_cmd_filter hook
Disabling status messages means we don't need to filter them out of the input stream. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src')
-rw-r--r--src/ao_btm.c31
-rw-r--r--src/ao_cmd.c5
-rw-r--r--src/ao_pins.h1
3 files changed, 0 insertions, 37 deletions
diff --git a/src/ao_btm.c b/src/ao_btm.c
index 491e4be3..db0ff6b0 100644
--- a/src/ao_btm.c
+++ b/src/ao_btm.c
@@ -17,13 +17,9 @@
#include "ao.h"
-uint8_t ao_btm_running;
int8_t ao_btm_stdio;
__xdata uint8_t ao_btm_connected;
-void
-ao_btm_putchar(char c);
-
#define AO_BTM_MAX_REPLY 16
__xdata char ao_btm_reply[AO_BTM_MAX_REPLY];
@@ -82,32 +78,6 @@ ao_btm_echo(uint8_t echo)
}
/*
- * A command line pre-processor to detect connect/disconnect messages
- * and update the internal state
- */
-
-uint8_t
-ao_cmd_filter(void)
-{
- if (ao_cur_stdio != ao_btm_stdio)
- return 0;
- ao_cmd_lex();
- while (ao_cmd_lex_c != '\n') {
- if (ao_match_word("CONNECT"))
- return 1;
- if (ao_match_word("DISCONNECT"))
- return 1;
- if (ao_match_word("ERROR"))
- return 1;
- if (ao_match_word("OK"))
- return 1;
- ao_cmd_lex();
- }
- ao_cmd_status = 0;
- return 0;
-}
-
-/*
* Delay between command charaters; the BT module
* can't keep up with 57600 baud
*/
@@ -226,7 +196,6 @@ ao_btm(void)
NULL);
ao_btm_echo(0);
- ao_btm_running = 1;
for (;;) {
while (!ao_btm_connected)
ao_sleep(&ao_btm_connected);
diff --git a/src/ao_cmd.c b/src/ao_cmd.c
index c738a3e0..23346c3d 100644
--- a/src/ao_cmd.c
+++ b/src/ao_cmd.c
@@ -274,11 +274,6 @@ ao_cmd(void)
for (;;) {
readline();
-#if HAS_CMD_FILTER
- if (ao_cmd_filter())
- continue;
- cmd_i = 0;
-#endif
ao_cmd_lex();
ao_cmd_white();
c = ao_cmd_lex_c;
diff --git a/src/ao_pins.h b/src/ao_pins.h
index 1344dcaa..9ee5bdb4 100644
--- a/src/ao_pins.h
+++ b/src/ao_pins.h
@@ -224,7 +224,6 @@
#define HAS_BEEP 0
#define HAS_SERIAL_1 1
#define USE_SERIAL_STDIN 1
- #define HAS_CMD_FILTER 1
#define HAS_ADC 0
#define HAS_DBG 1
#define HAS_EEPROM 0