PFW-1519 Hide Preload to MMU menu item if filament is detected

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
This commit is contained in:
Guðni Már Gilbert 2023-07-23 11:58:25 +00:00 committed by DRracer
parent d4733664a8
commit 57d780ccf9
1 changed files with 5 additions and 1 deletions

View File

@ -5224,7 +5224,11 @@ static void lcd_main_menu()
if ( ! ( printJobOngoing() || (lcd_commands_type == LcdCommands::Layer1Cal || Stopped) ) ) {
if (MMU2::mmu2.Enabled()) {
MENU_ITEM_SUBMENU_P(_T(MSG_PRELOAD_TO_MMU), mmu_preload_filament_menu);
if(!MMU2::mmu2.FindaDetectsFilament() && !fsensor.getFilamentPresent()) {
// The MMU 'Load filament' state machine will reject the command if any
// filament sensor is reporting a detected filament
MENU_ITEM_SUBMENU_P(_T(MSG_PRELOAD_TO_MMU), mmu_preload_filament_menu);
}
MENU_ITEM_SUBMENU_P(_i("Load to nozzle"), lcd_mmuLoadFilament);////MSG_LOAD_TO_NOZZLE c=18
MENU_ITEM_SUBMENU_P(_T(MSG_UNLOAD_FILAMENT), lcd_mmuUnloadFilament);
MENU_ITEM_SUBMENU_P(_T(MSG_EJECT_FROM_MMU), lcd_mmuEjectFilament);