These variables only range from 0 to 255
For the menus we currently need to convert fanSpeed to int16_t.
Change in memory:
Flash: -160 bytes
SRAM: -2 bytes
This fixes the spurious feedback when rotating the knob
because lcd_update is called much often than the interval
at which the lcd rendering is updated
Change in memory
Flash: -88 bytes
SRAM: -9 bytes
Valid values range from -100 to 100. Storing this value as four bytes
(int32_t) is not efficient.
Instead we can store G80 user input temporarily as int32_t and check
if the value is within the allowed range. If it is, then we convert the
int32_t (4 bytes) to int8_t (1 byte).
Change in memory:
Flash: -78 bytes
SRAM: 0 bytes
This way doesn't add any more flash memory.
Calculating the string length or checking for a null byte
will end up increasing flash consumption overall.
This gets rid of float conversion.
We just need to check the 6th character when M862 is detected. This
character gives us the digit after the dot.
Change in memory:
Flash: -20 bytes
SRAM: 0 bytes
For non-time critical code it is more effcient to call a function
rather inlining each division operation.
Change in memory:
Flash: -122 bytes
SRAM: 0 bytes
Noticed this when exploring another optimisation
By specification exactly which overloaded function to use
we save some memory
Seems to have something to do with doing arithmetic in the function argument
Change in memory:
Flash: -156 bytes
SRAM: 0 bytes
There is no need to repeat:
lcd_update_enable(true);
lcd_update(2);
Also lcd_clear() is redundant because lcd_update(2) will clear the LCD
Change in memory:
Flash: -16 bytes
SRAM: 0 bytes
Previously when the firmware called M701/M702 manually
there was no Z lift. But after we added support for the Z
parameter we set the default to 50mm.
Change strings "M701" to "M701 Z0" and "M702" to "M702 Z0"
to restore the previous behavior from before 3.13.
Also pulled the gcodes into PROGMEM in message.cpp
along with M83 and M84 to save memory.
Change in memory:
Flash: -34 bytes
SRAM: 0 bytes
When the extruder lifts up after completing the Purge line,
the baby stepping is not allowed for a short time. This dismisses
the menu. We don't want this behavior, so only apply the Z-axis requirement
when printing.
Change in memory:
Flash: +8 bytes
SRAM: 0 bytes
Add lcd_commands_type == LcdCommands::Layer1Cal
just in case blocks_queued() is 0 for one instant between
lcd_command steps
Change in memory:
Flash: +8 bytes
SRAM: 0 bytes
Fixes an issue with running first layer calibration twice in a row.
Improvements:
Now the Z baby step menu closes automatically when first layer calibration is done.
No need to wait for a timeout or close the menu manually by setting a variable
If the baby stepping menu is open, and suddenly
the printer enters a state where baby stepping
is not allowed.
The printer will save the last value before closing the menu.
When LcdCommands != Idle, don't dismiss
the Z baby step menu. This saves 20B
Change in memory:
Flash: -130 bytes
SRAM: 0 bytes
* M600 used 1°C threshold, which may increase the waiting time a bit
* Wizard used 3°C
Sync both to use TEMP_HYSTERESIS for consistancy
No change in memory footprint
- Expose TEMP_MODEL_fS and TEMP_MODEL_LAG as D and L respectively,
initializing the default values based on the previous hard-coded
values.
- Always round L to the effective sample lag to future-proof model
upgrades or changes (the stored value _is_ the effective value).
- Introduce UV as a new linear term for PTC heaters, defaulting
to an identity for model backward-compatibility.