Remove duplicit incrementation of consecutive comment lines

It was left in the code in one of the refactoring/optimization passes.
It really didn't do any harm, but was limiting the performance of the
skipping algorithm.

+ some verification code added - will be removed after successful tests
This commit is contained in:
D.R.racer 2021-02-02 07:57:06 +01:00
parent caf58b16b6
commit 15d76a7501

View file

@ -151,7 +151,9 @@ int16_t SdFile::readFilteredGcode(){
if( ! gfEnsureBlock() )goto eof_or_fail; // fetch it into RAM
rdPtr = start = blockBuffBegin;
} else {
if(++consecutiveCommentLines == 255){
if(consecutiveCommentLines >= 250){
// SERIAL_ECHO("ccl=");
// SERIAL_ECHOLN((int)consecutiveCommentLines);
// SERIAL_PROTOCOLLN(sd->curPosition_);
--rdPtr; // unget the already consumed newline
goto emit_char;