diff --git a/Firmware/Marlin.h b/Firmware/Marlin.h index 2d469a76..ff9335ac 100644 --- a/Firmware/Marlin.h +++ b/Firmware/Marlin.h @@ -285,6 +285,7 @@ void setPwmFrequency(uint8_t pin, int val); #endif //CRITICAL_SECTION_START extern bool fans_check_enabled; +extern bool cutter_enabled; extern float homing_feedrate[]; extern bool axis_relative_modes[]; extern int feedmultiply; diff --git a/Firmware/Marlin_main.cpp b/Firmware/Marlin_main.cpp index fc53b204..ee00f35b 100644 --- a/Firmware/Marlin_main.cpp +++ b/Firmware/Marlin_main.cpp @@ -510,6 +510,7 @@ void servo_init() bool fans_check_enabled = true; +bool cutter_enabled = false; #ifdef TMC2130 diff --git a/Firmware/mmu.cpp b/Firmware/mmu.cpp index 07ea844a..37bd631d 100644 --- a/Firmware/mmu.cpp +++ b/Firmware/mmu.cpp @@ -1439,6 +1439,12 @@ void mmu_continue_loading() if(mmu_load_fail < 255) eeprom_update_byte((uint8_t*)EEPROM_MMU_LOAD_FAIL, mmu_load_fail + 1); if(mmu_load_fail_tot < 65535) eeprom_update_word((uint16_t*)EEPROM_MMU_LOAD_FAIL_TOT, mmu_load_fail_tot + 1); + if (cutter_enabled) + { + mmu_command(MmuCmd::K0 + tmp_extruder); + manage_response(true, true, MMU_UNLOAD_MOVE); + } + mmu_command(MmuCmd::T0 + tmp_extruder); manage_response(true, true, MMU_TCODE_MOVE); load_more(); diff --git a/Firmware/ultralcd.cpp b/Firmware/ultralcd.cpp index 5dba1384..57300241 100644 --- a/Firmware/ultralcd.cpp +++ b/Firmware/ultralcd.cpp @@ -199,6 +199,7 @@ static void fil_unload_menu(); #endif // SNMM || SNMM_V2 static void lcd_disable_farm_mode(); static void lcd_set_fan_check(); +static void lcd_cutter_enabled(); static char snmm_stop_print_menu(); #ifdef SDCARD_SORT_ALPHA static void lcd_sort_type_set(); @@ -2292,6 +2293,10 @@ void lcd_set_fan_check() { eeprom_update_byte((unsigned char *)EEPROM_FAN_CHECK_ENABLED, fans_check_enabled); } +void lcd_cutter_enabled() { + cutter_enabled = !cutter_enabled; +} + void lcd_set_filament_autoload() { fsensor_autoload_set(!fsensor_autoload_enabled); } @@ -5207,6 +5212,11 @@ static void lcd_settings_menu() SETTINGS_AUTO_DEPLETE; + if (cutter_enabled == true) + MENU_ITEM_FUNCTION_P(_i("Cutter [on]"), lcd_cutter_enabled);////MSG_FANS_CHECK_ON c=17 r=1 + else + MENU_ITEM_FUNCTION_P(_i("Cutter [off]"), lcd_cutter_enabled);////MSG_FANS_CHECK_OFF c=17 r=1 + if (fans_check_enabled == true) MENU_ITEM_FUNCTION_P(_i("Fans check [on]"), lcd_set_fan_check);////MSG_FANS_CHECK_ON c=17 r=1 else