Merge pull request #2451 from wavexx/fix_printstats_reset

Do not clear last print fail stats prematurely
This commit is contained in:
DRracer 2020-02-03 11:21:41 +01:00 committed by GitHub
commit 685c8156b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 18 additions and 6 deletions

View File

@ -5576,10 +5576,15 @@ if(eSoundMode!=e_SOUND_MODE_SILENT)
lcd_resume_print();
else
{
failstats_reset_print();
if (!card.get_sdpos())
{
// A new print has started from scratch, reset stats
failstats_reset_print();
#ifndef LA_NOCOMPAT
la10c_reset();
la10c_reset();
#endif
}
card.startFileprint();
starttime=_millis();
}
@ -5689,12 +5694,19 @@ if(eSoundMode!=e_SOUND_MODE_SILENT)
if(code_seen('S'))
if(strchr_pointer<namestartpos) //only if "S" is occuring _before_ the filename
card.setIndex(code_value_long());
#ifndef LA_NOCOMPAT
la10c_reset();
#endif
card.startFileprint();
if(!call_procedure)
starttime=_millis(); //procedure calls count as normal print time.
{
if(!card.get_sdpos())
{
// A new print has started from scratch, reset stats
failstats_reset_print();
#ifndef LA_NOCOMPAT
la10c_reset();
#endif
}
starttime=_millis(); // procedure calls count as normal print time.
}
}
} break;