From 3a541488b2bb179d1eb7286781c83e1695d7254c Mon Sep 17 00:00:00 2001 From: Marek Bel Date: Thu, 12 Sep 2019 18:40:02 +0200 Subject: [PATCH] Rename extr_unload_() to mmu_unload_filament() and move it to ultralcd.cpp as it is menu. --- Firmware/mmu.cpp | 12 ------------ Firmware/mmu.h | 3 +-- Firmware/ultralcd.cpp | 16 +++++++++++++++- 3 files changed, 16 insertions(+), 15 deletions(-) diff --git a/Firmware/mmu.cpp b/Firmware/mmu.cpp index e08ddd32..d8ae497b 100755 --- a/Firmware/mmu.cpp +++ b/Firmware/mmu.cpp @@ -1074,18 +1074,6 @@ void mmu_filament_ramming() } } -//-// -void extr_unload_() -{ - eFilamentAction = FilamentAction::MmuUnLoad; - bFilamentFirstRun = false; - if (target_temperature[0] >= EXTRUDE_MINTEMP) - { - bFilamentPreheatState = true; - mFilamentItem(target_temperature[0], target_temperature_bed); - } - else lcd_generic_preheat_menu(); -} //! @brief show which filament is currently unloaded void extr_unload_view() diff --git a/Firmware/mmu.h b/Firmware/mmu.h index 0f8784ba..ad508c2a 100644 --- a/Firmware/mmu.h +++ b/Firmware/mmu.h @@ -105,8 +105,7 @@ extern int get_ext_nr(); extern void display_loading(); extern void extr_adj(uint8_t extruder); extern void extr_unload(); -//-// -extern void extr_unload_(); + extern void extr_adj_0(); extern void extr_adj_1(); extern void extr_adj_2(); diff --git a/Firmware/ultralcd.cpp b/Firmware/ultralcd.cpp index c01991cb..b5769a14 100755 --- a/Firmware/ultralcd.cpp +++ b/Firmware/ultralcd.cpp @@ -131,6 +131,8 @@ static void lcd_menu_fails_stats_mmu_print(); static void lcd_menu_fails_stats_mmu_total(); //static void lcd_menu_show_sensors_state(); // NOT static due to using inside "Marlin_main" module ("manage_inactivity()") +static void mmu_unload_filament(); + static void mmu_fil_eject_menu(); static void mmu_load_to_nozzle_menu(); #ifdef MMU_HAS_CUTTER @@ -2373,6 +2375,18 @@ void lcd_unLoadFilament() else lcd_generic_preheat_menu(); } +static void mmu_unload_filament() +{ + eFilamentAction = FilamentAction::MmuUnLoad; + bFilamentFirstRun = false; + if (target_temperature[0] >= EXTRUDE_MINTEMP) + { + bFilamentPreheatState = true; + mFilamentItem(target_temperature[0], target_temperature_bed); + } + else lcd_generic_preheat_menu(); +} + void lcd_wait_interact() { @@ -6543,7 +6557,7 @@ static void lcd_main_menu() MENU_ITEM_SUBMENU_P(_i("Load to nozzle"), mmu_load_to_nozzle_menu); //-// MENU_ITEM_FUNCTION_P(_T(MSG_UNLOAD_FILAMENT), extr_unload); //bFilamentFirstRun=true; - MENU_ITEM_SUBMENU_P(_T(MSG_UNLOAD_FILAMENT), extr_unload_); + MENU_ITEM_SUBMENU_P(_T(MSG_UNLOAD_FILAMENT), mmu_unload_filament); MENU_ITEM_SUBMENU_P(_i("Eject filament"), mmu_fil_eject_menu); #ifdef MMU_HAS_CUTTER MENU_ITEM_SUBMENU_P(_i("Cut filament"), mmu_cut_filament_menu);