diff --git a/script/console b/script/console index e43a35b..b993317 100755 --- a/script/console +++ b/script/console @@ -1,5 +1,5 @@ socat -d -d READLINE /dev/tty.usbmodem26221,nonblock=1,clocal=1 -socat -d -d READLINE /dev/tty.usbmodem24121,nonblock=1,clocal=1 +socat -d -d READLINE /dev/tty.usbmodem621,nonblock=1,clocal=1 socat -d -d READLINE /dev/tty.usbserial-A700e0GO,clocal=1,nonblock=1,cread=1,cs8,ixon=1,ixoff=1 socat -d -d READLINE /dev/tty.usbserial-A9007QcR,clocal=1,nonblock=1,cread=1,cs8,ixon=1,ixoff=1 #socat -d -d READLINE /dev/tty.FireFly-A964-SPP-1,clocal=1,nonblock=1,cread=1,cs8,ixon=1,ixoff=1 diff --git a/serial_protocol.c b/serial_protocol.c index d62bb3b..b4db13a 100644 --- a/serial_protocol.c +++ b/serial_protocol.c @@ -43,21 +43,17 @@ void status_message(int status_code) { printPgmString(PSTR("error: Unsupported statement\n\r")); break; case GCSTATUS_FLOATING_POINT_ERROR: printPgmString(PSTR("error: Floating point error\n\r")); break; + default: + printPgmString(PSTR("ok\r\n")); } } } -void prompt() { - printPgmString(PSTR("ok\r\n")); -} - void sp_init() { beginSerial(BAUD_RATE); - printPgmString(PSTR("\r\nGrbl ")); - printPgmString(PSTR(GRBL_VERSION)); + printPgmString(PSTR("\r\nGrbl " GRBL_VERSION)); printPgmString(PSTR("\r\n")); - prompt(); } void sp_process() @@ -69,7 +65,6 @@ void sp_process() line[char_counter] = 0; // treminate string status_message(gc_execute_line(line)); char_counter = 0; // reset line buffer index - prompt(); } else if (c <= ' ') { // Throw away whitepace and control characters } else if (c >= 'a' && c <= 'z') { // Upcase lowercase line[char_counter++] = c-'a'+'A';