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.
On printers without the MMU no error screen should occur and no attempts of communication with the MMU should be performed -> EEPROM_MMU_ENABLED should default to 0.
PFW-1418
Use "echo:" for thermal model error reporting to avoid octoprint
automatically sending a M112 kill.
Keep using "error:" instead for other thermal errors (MAXTEMP/etc).
This should allow resuming a thermal mode pause with the default
octoprint settings.
Main changes:
* setAllTargetHotends() is removed
* setTargetHotendSafe() is removed
* Extruder parameter on setTargetHotend() is dropped
Change in memory:
Flash: -192 bytes
SRAM: 0 bytes
The function adds a bit of overhead compared to code_value()
I suspect this function is a relic of the past.
Change in memory:
Flash: -82 bytes
SRAM: 0 bytes
This fixes#3891 without having to set the calibration bit, meaning
that if the model is later re-enabled without a real calibration, a
prompt is shown as expected.
It was only enabled when multiple extruders are enabled
The firmware doesn't support it
and even if the M218 gcode could be used, the code does not compile
Follow Marlin's behavior and simply insert a delay for the requested
duration when using M300 S0.
When S is not specified, use the default tone instead.
Fixes#3856
Instead of checking for explicit versions, resume the wizard if some
(new) wizard is missing.
This handles both the old SELFTEST check, the new thermal model
and any future check in the same fashion.
Update the eeprom FW version as soon as migration is complete, to avoid
resetting the CALIBRATION_V2 variable at each reset.
Do not implicitly reset the calibration steps for WizState::Run: do this
only for the menu action.
- Handle the conversion from the V1 calibration status to the V2 bitmap
for all past FW versions.
- Allow to run the wizard in "Restore" mode (for example during upgrade
or service prep) to complete any missing steps.
- Fix service prep to use the above feature by clearing the appropriate
calibration bits.
- Remove exceptions for FW 3.2.0.4 which can now be handled cleanly.
Simplify status tracking:
- S::Restore to continue to the next logical wizard item
- S::Finish for a successful failure
- S::Failed to exit while showing a failure
- Generalize force_selftest_if_fw_version() so we can check when upgrading
between arbitrary FW versions.
- Do not call update_current_firmware_version_to_eeprom() prematurely
when forcing self-test (if a reset happens before self-test completes,
the check would be incorrectly skipped on the next run).
Expect these to be always at the start of the command (which is now
stripped of the extra line number), reducing the number of corner cases
due to these not following the g-code spec.
Set a menu block for fatal thermal errors instead of abusing
lcd_return_to_status() to kick the user out of the menus.
This now allows a thermal model error to be recoverable through menu
access.
We allow resuming from the LCD via start print and resume print,
it makes sense to clear the error on stop too.
For this reason distinguish whether the action is performed
automatically or manually (ie: interactively).
The error is only cleared when the command is run interactively.
In M600 and M702, the Z-lift is taken care of outside this function
so it makes no sense to have a Z-lift within unload_filament()
Only exception to this is in the wizard, there I moved the Z-lift to
happen before we start heating the nozzle.
Change in memory:
Flash: -12 bytes
SRAM: 0 bytes