minor tweak eliminates 'ok' message after errors

This commit is contained in:
Simen Svale Skogsrud 2011-02-10 17:01:07 +01:00
parent f95f48763a
commit 9b022a6f4f
2 changed files with 4 additions and 9 deletions

View File

@ -1,5 +1,5 @@
socat -d -d READLINE /dev/tty.usbmodem26221,nonblock=1,clocal=1 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-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.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 #socat -d -d READLINE /dev/tty.FireFly-A964-SPP-1,clocal=1,nonblock=1,cread=1,cs8,ixon=1,ixoff=1

View File

@ -43,21 +43,17 @@ void status_message(int status_code) {
printPgmString(PSTR("error: Unsupported statement\n\r")); break; printPgmString(PSTR("error: Unsupported statement\n\r")); break;
case GCSTATUS_FLOATING_POINT_ERROR: case GCSTATUS_FLOATING_POINT_ERROR:
printPgmString(PSTR("error: Floating point error\n\r")); break; 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() void sp_init()
{ {
beginSerial(BAUD_RATE); beginSerial(BAUD_RATE);
printPgmString(PSTR("\r\nGrbl ")); printPgmString(PSTR("\r\nGrbl " GRBL_VERSION));
printPgmString(PSTR(GRBL_VERSION));
printPgmString(PSTR("\r\n")); printPgmString(PSTR("\r\n"));
prompt();
} }
void sp_process() void sp_process()
@ -69,7 +65,6 @@ void sp_process()
line[char_counter] = 0; // treminate string line[char_counter] = 0; // treminate string
status_message(gc_execute_line(line)); status_message(gc_execute_line(line));
char_counter = 0; // reset line buffer index char_counter = 0; // reset line buffer index
prompt();
} else if (c <= ' ') { // Throw away whitepace and control characters } else if (c <= ' ') { // Throw away whitepace and control characters
} else if (c >= 'a' && c <= 'z') { // Upcase lowercase } else if (c >= 'a' && c <= 'z') { // Upcase lowercase
line[char_counter++] = c-'a'+'A'; line[char_counter++] = c-'a'+'A';