Browse Source

Allow N to take a negative argument (PR@2402)

pull/1/head
Scott Lahteine 10 years ago
committed by Richard Wackerbarth
parent
commit
2e0da8abdc
  1. 4
      Marlin/Marlin_main.cpp

4
Marlin/Marlin_main.cpp

@ -5307,8 +5307,8 @@ void process_next_command() {
// - Bypass N[0-9][0-9]*[ ]*
// - Overwrite * with nul to mark the end
while (*current_command == ' ') ++current_command;
if (*current_command == 'N' && current_command[1] >= '0' && current_command[1] <= '9') {
current_command += 2; // skip N[0-9]
if (*current_command == 'N' && ((current_command[1] >= '0' && current_command[1] <= '9') || current_command[1] == '-')) {
current_command += 2; // skip N[-0-9]
while (*current_command >= '0' && *current_command <= '9') ++current_command; // skip [0-9]*
while (*current_command == ' ') ++current_command; // skip [ ]*
}

Loading…
Cancel
Save