|
@ -1060,7 +1060,7 @@ bool code_has_value() { |
|
|
while (c == ' ') c = seen_pointer[++i]; |
|
|
while (c == ' ') c = seen_pointer[++i]; |
|
|
if (c == '-' || c == '+') c = seen_pointer[++i]; |
|
|
if (c == '-' || c == '+') c = seen_pointer[++i]; |
|
|
if (c == '.') c = seen_pointer[++i]; |
|
|
if (c == '.') c = seen_pointer[++i]; |
|
|
return (c >= '0' && c <= '9'); |
|
|
return NUMERIC(c); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
float code_value() { |
|
|
float code_value() { |
|
@ -6066,9 +6066,9 @@ void process_next_command() { |
|
|
// - Bypass N[-0-9][0-9]*[ ]*
|
|
|
// - Bypass N[-0-9][0-9]*[ ]*
|
|
|
// - Overwrite * with nul to mark the end
|
|
|
// - Overwrite * with nul to mark the end
|
|
|
while (*current_command == ' ') ++current_command; |
|
|
while (*current_command == ' ') ++current_command; |
|
|
if (*current_command == 'N' && ((current_command[1] >= '0' && current_command[1] <= '9') || current_command[1] == '-')) { |
|
|
if (*current_command == 'N' && NUMERIC_SIGNED(current_command[1])) { |
|
|
current_command += 2; // skip N[-0-9]
|
|
|
current_command += 2; // skip N[-0-9]
|
|
|
while (*current_command >= '0' && *current_command <= '9') ++current_command; // skip [0-9]*
|
|
|
while (NUMERIC(*current_command)) ++current_command; // skip [0-9]*
|
|
|
while (*current_command == ' ') ++current_command; // skip [ ]*
|
|
|
while (*current_command == ' ') ++current_command; // skip [ ]*
|
|
|
} |
|
|
} |
|
|
char* starpos = strchr(current_command, '*'); // * should always be the last parameter
|
|
|
char* starpos = strchr(current_command, '*'); // * should always be the last parameter
|
|
@ -6668,7 +6668,7 @@ void ok_to_send() { |
|
|
if (*p == 'N') { |
|
|
if (*p == 'N') { |
|
|
SERIAL_PROTOCOL(' '); |
|
|
SERIAL_PROTOCOL(' '); |
|
|
SERIAL_ECHO(*p++); |
|
|
SERIAL_ECHO(*p++); |
|
|
while ((*p >= '0' && *p <= '9') || *p == '-') |
|
|
while (NUMERIC_SIGNED(*p)) |
|
|
SERIAL_ECHO(*p++); |
|
|
SERIAL_ECHO(*p++); |
|
|
} |
|
|
} |
|
|
SERIAL_PROTOCOLPGM(" P"); SERIAL_PROTOCOL(int(BLOCK_BUFFER_SIZE - movesplanned() - 1)); |
|
|
SERIAL_PROTOCOLPGM(" P"); SERIAL_PROTOCOL(int(BLOCK_BUFFER_SIZE - movesplanned() - 1)); |
|
|