An example is when Unloading filament with MMU.
After the unload completes successfully, some menu items disappeared.
Because mFilamentBack() was not called
Change in memory:
Flash: -56 bytes
SRAM: 0 bytes
Kudos to @3d-gussner for finding the issue
Steps to reproduce:
1. reset printer
2. select Load filament
3. go back to main
4. LCD menu is very limited
5. To get all menus back select 6. Preheat
7. back to main
This commit is my proposed fix.
When eFilamentAction is equal to
FilamentAction::Load we must reset it to FilamentAction::None
when the Back button in Load Filament is selected
Change in memory:
Flash: -26 bytes
SRAM: 0 bytes
Proposal to fix some of the issues with the initial implementation
it is safer to use the status line code to print the message so
there aren't any conflicts in the LCD cursor position.
Allow inserting a byte into any position in the LCD status message
Also, add a variable to control from which index in the array
should the message start printing. This is very useful for progress
bars and messages which continually update. I think we can save some
memory by applying this to Mesh Bed Leveling later.
Change in memory:
Flash: +106 bytes
SRAM: +1 byte
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.
Do not blidnly clear the loading_flag, check for it!
Just disallowing the SD menu while loading is being performed is not
sufficient, since the menu can be entered also by inserting card while
loading is taking place.
This is also nicer in behavior, as we allow to navigate the SD card
while loading.
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).
This is by far the simplest solution to prevent the user from sending
a Load command to the MMU when the FINDA or Filament sensor
is detecting a filament. This may even happen if the sensors are poorly positioned.
Either way a Load in this scenario will make the MMU seem to hang as the
state machine will reject the command.
We could add a full screen message to let the use know
but it would require some memory resources.
For now, just hide the menu item.
Change in memory:
Flash: +16 bytes
SRAM: 0 bytes
bFilamentAction variable is never reset, even after
disabling the heaters.
Steps to reproduce:
1. Boot-up printer
2. Select Load to Nozzle.
3. Select PLA (215°C) target
4. Select Filament 1
5. Wait for load to be successful
6. Go to Preheat submenu and select Cooldown (last menu item)
7. Observe target temperature on the status screen is now 0°C
8. Select Load to Nozzle again.
9. Select Filament 2.
* Expected behavior target temperature IS NOT 0°C
* Actual behavior target temperature IS 0°C
Change in memory:
Flash: -26 bytes
SRAM: 0 bytes
Restores 3.12 sequence which was working well before.
M600 "L" parameter now works like M702 "U" parameter.
Removed a lot of the unused parameters which were copied
from Marlin 2.
Change in memory:
Flash: +96 bytes
Code size increases a bit but keep in mind the PR
that broke the behavior "saved" 182 bytes:
https://github.com/prusa3d/Prusa-Firmware/pull/4063
So I think this code size increase is OK
Change in memory:
Flash: +84 bytes
SRAM: 0 bytes