From 393317f7d04753d6e9773393a96c311a88a27f7b Mon Sep 17 00:00:00 2001 From: Leon Lindenfelser Date: Fri, 20 Nov 2015 10:23:26 -0600 Subject: AT commands are working in modeConfig. --- CommandTerminal/CommandTerminal.cpp | 35 +---------------------------------- 1 file changed, 1 insertion(+), 34 deletions(-) (limited to 'CommandTerminal') diff --git a/CommandTerminal/CommandTerminal.cpp b/CommandTerminal/CommandTerminal.cpp index 9ca6b30..285b0fd 100644 --- a/CommandTerminal/CommandTerminal.cpp +++ b/CommandTerminal/CommandTerminal.cpp @@ -152,43 +152,10 @@ bool CommandTerminal::start() { int history_index = -1; std::vector args; - if (_dot->getStartUpMode() == mDot::SERIAL_MODE) { - std::string escape_buffer; - char ch; - - int escape_timeout = 1000; - Timer tmr; - Timer escape_tmr; - - // wait one second for possible escape - tmr.reset(); - tmr.start(); - escape_tmr.reset(); - escape_tmr.start(); - while (tmr.read_ms() < escape_timeout) { - if (_serial.readable()) { - _serial.read(&ch, 1); - escape_buffer += ch; - } - - if (escape_buffer.find(escape_sequence) != std::string::npos) { - _mode = mDot::COMMAND_MODE; - command.clear(); - break; - } - - if (escape_tmr.read_ms() > escape_timeout) - escape_buffer.clear(); - - osDelay(1); - } - - } - //Run terminal session while (running) { - osEvent e = Thread::signal_wait(buttonSignal); + osEvent e = Thread::signal_wait(buttonSignal, 20); if (e.status == osEventSignal) { ButtonHandler::ButtonEvent _be = _buttons->getButtonEvent(); switch (_be) { -- cgit v1.2.3