prusa3d / Prusa-Firmware

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

reprint: reduce duplicate code #4552

Closed gudnimg closed 7 months ago

gudnimg commented 7 months ago

restore_file_from_sd function now supports any filename extension. This was not the case when the reprint feature was merged.

If a print was finished (to allow reprinting) then the EEPROM filename and extension should always be valid.

Change in memory: Flash: -312 bytes SRAM: 0 bytes

github-actions[bot] commented 7 months ago

All values in bytes. Δ Delta to base

Target ΔFlash ΔSRAM Used Flash Used SRAM Free Flash Free SRAM
MK3S_MULTILANG -312 0 246734 5656 7218 2536
MK3_MULTILANG -312 0 246024 5663 7928 2529
gudnimg commented 7 months ago

Pinging @jfestrada author of the reprint function.

3d-gussner commented 7 months ago

@jfestrada Please have a look at this PR and let us know if you approve it or not.

jfestrada commented 7 months ago

It's OK, and it make sense, this change will solve the issue with the filename extensions and will save some bytes and CPU usage will be lower.