From 58822b8f01bbc479c273d2c440e6415c754cba9e Mon Sep 17 00:00:00 2001 From: Olivier Matz Date: Wed, 26 Feb 2014 19:16:23 +0100 Subject: [PATCH] prevent going in raw mode when monitor/range is running --- commands.c | 5 +++++ 1 file changed, 5 insertions(+) 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; -- 2.39.5