Browse Source

Fix: current_command_args contains command

@thinkyhead
Hi Scott,
your code from a0f362c@thinkyhead is great, but you forgot to skip the
command.
Symptom `M117 Test`shows `M117 Test` on LCD instead of `Test`.

see also
https://github.com/MarlinFirmware/Marlin/commit/a0f362c735
6f8e3c2f17 lines 941, 2851 and so on

Greetings and welcome back

Jochen
CONSULitAS 9 years ago
parent
commit
ea8409ad5d
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      Marlin/Marlin_main.cpp

+ 1
- 1
Marlin/Marlin_main.cpp View File

@@ -5714,7 +5714,7 @@ void process_next_command() {
5714 5714
 
5715 5715
   // Args pointer optimizes code_seen, especially those taking XYZEF
5716 5716
   // This wastes a little cpu on commands that expect no arguments.
5717
-  current_command_args = current_command;
5717
+  current_command_args = current_command+2; // skip two chars for command code and first digit
5718 5718
   while (*current_command_args >= '0' && *current_command_args <= '9') ++current_command_args;
5719 5719
   while (*current_command_args == ' ') ++current_command_args;
5720 5720
 

Loading…
Cancel
Save