]> git.droids-corp.org - protos/xbee-avr.git/commitdiff
prevent going in raw mode when monitor/range is running
authorOlivier Matz <zer0@droids-corp.org>
Wed, 26 Feb 2014 18:16:23 +0000 (19:16 +0100)
committerOlivier Matz <zer0@droids-corp.org>
Sun, 9 Mar 2014 21:13:08 +0000 (22:13 +0100)
commands.c

index 54e56d70fc88a04ebac813d34ec9b1822dea9b97..10b62cc0feababd678c8a89414befca09cbee76d 100644 (file)
@@ -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;