Skip to content

Commit

Permalink
[MMU3] Updated MMU menu item order to better match Prusa documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
eoyilmaz committed Jan 17, 2024
1 parent bd565dc commit 983724b
Showing 1 changed file with 19 additions and 15 deletions.
34 changes: 19 additions & 15 deletions Marlin/src/lcd/menu/menu_mmu2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,8 @@ void menu_mmu2() {

START_MENU();
BACK_ITEM(MSG_MAIN_MENU);

// MMU2/MMU3 Commands
if (!busy && TERN1(HAS_PRUSA_MMU3, MMU2::mmu2.mmu_hw_enabled)){
SUBMENU(MSG_MMU2_LOAD_FILAMENT, menu_mmu2_load_filament);
SUBMENU(MSG_MMU2_LOAD_TO_NOZZLE, menu_mmu2_load_to_nozzle);
Expand All @@ -313,7 +315,22 @@ void menu_mmu2() {
}

#if HAS_PRUSA_MMU3
// SUBMENU(MSG_MMU_CUTTER_MODE, menu_mmu2_cutter);
// MMU3 Enable/Disable
#ifndef __AVR__
editable.state = MMU2::mmu2.mmu_hw_enabled;
EDIT_ITEM_F(bool, F("MMU"), &MMU2::mmu2.mmu_hw_enabled, []{
if(editable.state){
MMU2::mmu2.Stop();
} else {
MMU2::mmu2.Start();
}
});
#endif

// SpoolJoin Enable/Disable
EDIT_ITEM(bool, MSG_MMU_SPOOL_JOIN, &SpoolJoin::spooljoin.enabled, spool_join_status);

// Cutter Enable/Disable
bool cutter_enabled = MMU2::mmu2.cutter_mode != 0;
editable.state = cutter_enabled;
EDIT_ITEM(bool, MSG_MMU_CUTTER, &cutter_enabled, []{
Expand All @@ -322,28 +339,15 @@ void menu_mmu2() {
if (!busy && MMU2::cutter_enabled() && MMU2::mmu2.mmu_hw_enabled){
SUBMENU(MSG_MMU2_CUT_FILAMENT, menu_mmu2_cut_filament);
}
EDIT_ITEM(bool, MSG_MMU_SPOOL_JOIN, &SpoolJoin::spooljoin.enabled, spool_join_status);

// Statistics
SUBMENU(MSG_MMU_STATISTICS, menu_mmu2_statistics);
#endif

if (TERN1(HAS_PRUSA_MMU3, MMU2::mmu2.mmu_hw_enabled)){
ACTION_ITEM(MSG_MMU2_RESET, action_mmu2_reset);
}

#if HAS_PRUSA_MMU3
#ifndef __AVR__
editable.state = MMU2::mmu2.mmu_hw_enabled;
EDIT_ITEM_F(bool, F("MMU"), &MMU2::mmu2.mmu_hw_enabled, []{
if(editable.state){
MMU2::mmu2.Stop();
} else {
MMU2::mmu2.Start();
}
});
#endif
#endif

END_MENU();
}

Expand Down

0 comments on commit 983724b

Please sign in to comment.