Reset sdpos_atomic when starting a new SD print

Fix an incorrect SD offset on the first G-Code command when the second
SD print is started.
This commit is contained in:
Yuri D'Elia 2022-08-06 22:16:50 +02:00
parent c0b5fea525
commit a533ba3574

View File

@ -5675,6 +5675,7 @@ eeprom_update_word((uint16_t*)EEPROM_NOZZLE_DIAMETER_uM,0xFFFF);
{
// A new print has started from scratch, reset stats
failstats_reset_print();
sdpos_atomic = 0;
#ifndef LA_NOCOMPAT
la10c_reset();
#endif
@ -5802,6 +5803,7 @@ eeprom_update_word((uint16_t*)EEPROM_NOZZLE_DIAMETER_uM,0xFFFF);
{
// A new print has started from scratch, reset stats
failstats_reset_print();
sdpos_atomic = 0;
#ifndef LA_NOCOMPAT
la10c_reset();
#endif