File tree Expand file tree Collapse file tree 1 file changed +13
-8
lines changed
Expand file tree Collapse file tree 1 file changed +13
-8
lines changed Original file line number Diff line number Diff line change @@ -414,17 +414,22 @@ void processSerialInput()
414414 // Process serial into either rx buffer or command buffer
415415 if (inCommandMode == true )
416416 {
417- if (incoming == ' \r ' && commandLength > 0 )
417+ // Check for end of command
418+ if (incoming == ' \r ' )
418419 {
419- printerEndpoint = PRINT_TO_SERIAL;
420- systemPrintln ();
421- if (settings.debugSerial )
420+ // Ignore end of command if no command in the buffer
421+ if (commandLength > 0 )
422422 {
423- systemPrint (" processSerialInput moved " );
424- systemPrint (commandLength);
425- systemPrintln (" from serialReceiveBuffer into commandBuffer" );
423+ systemPrintln ();
424+ if (settings.debugSerial )
425+ {
426+ systemPrint (" processSerialInput moved " );
427+ systemPrint (commandLength);
428+ systemPrintln (" from serialReceiveBuffer into commandBuffer" );
429+ }
430+ checkCommand (); // Process command buffer
431+ break ;
426432 }
427- checkCommand (); // Process command buffer
428433 }
429434 else if (incoming == ' \n ' )
430435 ; // Do nothing
You can’t perform that action at this time.
0 commit comments