Commit 5ad5ba2f authored by MagoKimbra's avatar MagoKimbra

Fix

parent 518f9d0b
...@@ -5250,6 +5250,9 @@ DaveX plan for Teensylu/printrboard-type pinouts (ref teensylu & sprinter) for a ...@@ -5250,6 +5250,9 @@ DaveX plan for Teensylu/printrboard-type pinouts (ref teensylu & sprinter) for a
#define SCK_PIN 76 #define SCK_PIN 76
#else #else
#define DUE_SOFTWARE_SPI #define DUE_SOFTWARE_SPI
#define MOSI_PIN 51
#define MISO_PIN 50
#define SCK_PIN 52
#endif #endif
#endif #endif
/****************************************************************************************/ /****************************************************************************************/
......
...@@ -6857,13 +6857,13 @@ void process_next_command() { ...@@ -6857,13 +6857,13 @@ void process_next_command() {
// Sanitize the current command: // Sanitize the current command:
// - Skip leading spaces // - Skip leading spaces
// - 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 == 'n') && current_command[1] >= '0' && current_command[1] <= '9') { if ((*current_command == 'N' || *current_command == 'n') && ((current_command[1] >= '0' && current_command[1] <= '9') || 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 (*current_command >= '0' && *current_command <= '9') ++current_command; // skip [0-9]*
while (*current_command == ' ') ++current_command; 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
if (starpos) while (*starpos == ' ' || *starpos == '*') *starpos-- = '\0'; // nullify '*' and ' ' if (starpos) while (*starpos == ' ' || *starpos == '*') *starpos-- = '\0'; // nullify '*' and ' '
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment