diff options
author | midopple <mdoppler@gmx.at> | 2012-04-23 07:56:14 +0200 |
---|---|---|
committer | midopple <mdoppler@gmx.at> | 2012-04-23 07:56:14 +0200 |
commit | ed9fe956a742a356bdd4b654b256830b310bacca (patch) | |
tree | caff2181da3fd0cd374fbccd03488e2fb3a65d10 /Sprinter | |
parent | 3a29ee97d134d5dbb101f6eac0e26746d0e59de1 (diff) |
Ignore ":" in comments.
Diffstat (limited to 'Sprinter')
-rw-r--r-- | Sprinter/Sprinter.pde | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Sprinter/Sprinter.pde b/Sprinter/Sprinter.pde index 13d0745..0589015 100644 --- a/Sprinter/Sprinter.pde +++ b/Sprinter/Sprinter.pde @@ -910,7 +910,7 @@ void get_command() while( Serial.available() > 0 && buflen < BUFSIZE) { serial_char = Serial.read(); - if(serial_char == '\n' || serial_char == '\r' || serial_char == ':' || serial_count >= (MAX_CMD_SIZE - 1) ) + if(serial_char == '\n' || serial_char == '\r' || (serial_char == ':' && comment_mode == false) || serial_count >= (MAX_CMD_SIZE - 1) ) { if(!serial_count) { //if empty line comment_mode = false; // for new command @@ -1021,7 +1021,7 @@ void get_command() serial_char = file.read(); read_char_int = (int)serial_char; - if(serial_char == '\n' || serial_char == '\r' || serial_char == ':' || serial_count >= (MAX_CMD_SIZE - 1) || read_char_int == -1) + if(serial_char == '\n' || serial_char == '\r' || (serial_char == ':' && comment_mode == false) || serial_count >= (MAX_CMD_SIZE - 1) || read_char_int == -1) { sdpos = file.curPosition(); if(sdpos >= filesize) |