send "ATCN" when exiting from xbee raw mode
authorOlivier Matz <zer0@droids-corp.org>
Thu, 31 Oct 2013 18:43:24 +0000 (19:43 +0100)
committerOlivier Matz <zer0@droids-corp.org>
Thu, 31 Oct 2013 18:51:25 +0000 (19:51 +0100)
main.c

diff --git a/main.c b/main.c
index 6d1710f..0e52717 100644 (file)
--- a/main.c
+++ b/main.c
@@ -552,6 +552,11 @@ void xbee_mainloop(void)
                        /* from cmdline to xbee */
                        c = cmdline_dev_recv(NULL);
                        if (c == 4) { /* CTRL-d */
+                               xbee_dev_send('A', NULL);
+                               xbee_dev_send('T', NULL);
+                               xbee_dev_send('C', NULL);
+                               xbee_dev_send('N', NULL);
+                               xbee_dev_send('\n', NULL);
                                xbee_raw = 0;
                                rdline_newline(&xbeeboard.rdl,
                                               xbeeboard.prompt);