If vSense changes at runtime due to Run current
being changed. Then we must always shift the Hold current
correctly. Whether the vSense is changing 1 -> 0 or 0 ->1
Change in memory (with TMC2130_SERVICE_CODES_M910_M918):
Flash: +76 bytes
SRAM: 0 bytes
If no power panic occurred during M600 we should
clear isPartialBackupAvailable to let the power panic
code know to not use the partial backup. We want the
partial backup ONLY when the extruder is parked after a print is saved.
Change in memory:
Flash: +4 bytes
SRAM: 0 bytes
Remove loading_flag and check for eFilamentAction instead which already
flags both load/unload (in addition to mmu actions).
Correctly transition from AutoLoad to Load as soon as the operation
cannot be cancelled anymore as opposed to resetting it.
All custom commands are transitory and eventually switch back to Idle
state by themselves.
It doesn't make any sense to explicitly check for Layer1Cal: any
non-idle state is active by design.
Fix this check in the main menu. This is probably incomplete (Layer1Cal
is incorrectly used in several other places).
- Always re-calculate the Vsense flag when the currents are changed
- Make sure Hold current is not larger than Run current
- Added SetCurrents() function from MMU FW
- Added MotorCurrents structure from MMU FW
- Various code size optimisations e.g. in power panic
Change in memory:
Flash: -10 bytes
SRAM: +4 bytes
A partial backup is needed in scenarios where the extruder may be
parked after a print is saved. For example during a blocking wait for the user in M600
Or during a MMU error screen.
A sudden power panic at this point would previously save the parked position
into EEPROM. When the print is recovered it would print in mid air.
This allows us to restore the position of all axis saved in RAM
If the extruder had been parked to the side for example
due to filament runout. Then the original position (before parking)
should now be restored
Change in memory:
Flash: +40 bytes
SRAM: 0 bytes
If a print has been saved to RAM such as during a filament runout,
do not overwrite these saved values if a sudden
power panic appears.
Additionally, change the saved types to be the same as power panic when saving to RAM:
- Bed target temperature is uint8_t (0 to 255) instead of float
- Extruder target temperature is uint16_t instead of float
Doing this change allows us to re-use the same global variables and
avoid creating local variables during power panic.
Change in memory:
Flash: -246 bytes
SRAM: -5 bytes
These functions should be able to be re-used during a power panic
- save_print_file_state
- restore_print_file_state
No functional change at the moment.