prusa3d / Prusa-Firmware

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

optimisation: initialise `axis_ustep_resolution` in EEPROM #4613

Closed gudnimg closed 2 months ago

gudnimg commented 4 months ago

A minor optimisation I found.

When the cs variable is loaded into RAM, cs.axis_ustep_resolution will always have some value and none of the 0xFF values.

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

gudnimg commented 4 months ago

For some reason omitting sudo apt-get update started being a problem: https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/customizing-github-hosted-runners#installing-software-on-ubuntu-runners

Note: Always run sudo apt-get update before installing a package. In case the apt index is stale, this command fetches and re-indexes any available packages, which helps prevent package installation failures.

I created a separate PR to resolve this since the change has nothing to do with firmware code.

github-actions[bot] commented 4 months ago

All values in bytes. Δ Delta to base

Target ΔFlash ΔSRAM Used Flash Used SRAM Free Flash Free SRAM
MK3S_MULTILANG -40 0 246988 5654 6964 2538
MK3_MULTILANG -40 0 246270 5661 7682 2531