summaryrefslogtreecommitdiff
path: root/CommandTerminal
diff options
context:
space:
mode:
authorLeon Lindenfelser <llindenfelser@multitech.com>2015-11-20 10:23:26 -0600
committerLeon Lindenfelser <llindenfelser@multitech.com>2015-11-20 10:23:26 -0600
commit393317f7d04753d6e9773393a96c311a88a27f7b (patch)
tree07b95a83d17e455b4f2b2678dd9f41c197763a77 /CommandTerminal
parenteb527712baa96d65f0a4bd5d0ce3ec19a708f6f7 (diff)
downloadmtdot-box-evb-factory-firmware-393317f7d04753d6e9773393a96c311a88a27f7b.tar.gz
mtdot-box-evb-factory-firmware-393317f7d04753d6e9773393a96c311a88a27f7b.tar.bz2
mtdot-box-evb-factory-firmware-393317f7d04753d6e9773393a96c311a88a27f7b.zip
AT commands are working in modeConfig.
Diffstat (limited to 'CommandTerminal')
-rw-r--r--CommandTerminal/CommandTerminal.cpp35
1 files changed, 1 insertions, 34 deletions
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<std::string> 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) {