Add G-code "backspace" support
This commit is contained in:
		@@ -387,10 +387,16 @@ inline void process_stream_char(const char c, uint8_t &sis, char (&buff)[MAX_CMD
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
  #endif
 | 
					  #endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  // Backspace erases previous characters
 | 
				
			||||||
 | 
					  if (c == 0x08) {
 | 
				
			||||||
 | 
					    if (ind) buff[--ind] = '\0';
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					  else {
 | 
				
			||||||
    buff[ind++] = c;
 | 
					    buff[ind++] = c;
 | 
				
			||||||
    if (ind >= MAX_CMD_SIZE - 1)
 | 
					    if (ind >= MAX_CMD_SIZE - 1)
 | 
				
			||||||
      sis = PS_EOL;             // Skip the rest on overflow
 | 
					      sis = PS_EOL;             // Skip the rest on overflow
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * Handle a line being completed. For an empty line
 | 
					 * Handle a line being completed. For an empty line
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user