From: Olivier Matz Date: Wed, 26 Feb 2014 18:16:23 +0000 (+0100) Subject: prevent going in raw mode when monitor/range is running X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=58822b8f01bbc479c273d2c440e6415c754cba9e;p=protos%2Fxbee-avr.git prevent going in raw mode when monitor/range is running --- diff --git a/commands.c b/commands.c index 54e56d7..10b62cc 100644 --- a/commands.c +++ b/commands.c @@ -1247,6 +1247,11 @@ static void cmd_raw_parsed(void *parsed_result, void *data) { (void)parsed_result; (void)data; + + if (range_running || monitor_running) { + printf_P(PSTR("stop running range or monitor first\r\n")); + return; + } printf_P(PSTR("switched to raw mode, CTRL-D to exit\r\n")); rdline_stop(&xbeeboard.rdl); /* don't display prompt when return */ xbee_raw = 1;