prusa3d / Prusa-Firmware

Firmware for Original Prusa i3 3D printer by PrusaResearch
GNU General Public License v3.0
2.02k stars 1.05k forks source link

PFW-1553 fix regression where SD card file is not closed when stopping paused print #4583

Closed gudnimg closed 8 months ago

gudnimg commented 8 months ago

When a print is paused, card.sdprinting is set to false. Instead we can check if the SD card has been mounted and try to close the file.

The closefile() method will check internally whether or not the file is open.

Regression seems to have been introduced here: 3ad40f02064f1870cdec7fe4d9ce1bd7a2ff6ec0

Steps to reproduce:

  1. Start a print
  2. Pause the print
  3. Stop the print
  4. Try to find "Print from SD" menu (it's gone now)
github-actions[bot] commented 8 months ago

All values in bytes. Δ Delta to base

Target ΔFlash ΔSRAM Used Flash Used SRAM Free Flash Free SRAM
MK3S_MULTILANG 0 0 246786 5657 7166 2535
MK3_MULTILANG 0 0 246068 5664 7884 2528