Merge pull request #1633 from mkbel/disable_cutter

Disable mmu filament cutter feature.
This commit is contained in:
PavelSindler 2019-03-15 12:04:08 +01:00 committed by GitHub
commit b2d2828c9d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 43 additions and 17 deletions

View File

@ -1365,6 +1365,7 @@ bFilamentAction=false; // NOT in "mmu_load_to_nozzle_
}
}
#ifdef MMU_HAS_CUTTER
void mmu_cut_filament(uint8_t filament_nr)
{
bFilamentAction=false; // NOT in "mmu_load_to_nozzle_menu()"
@ -1384,6 +1385,7 @@ bFilamentAction=false; // NOT in "mmu_load_to_nozzle_
show_preheat_nozzle_warning();
}
}
#endif //MMU_HAS_CUTTER
void mmu_eject_filament(uint8_t filament, bool recover)
{
@ -1457,11 +1459,13 @@ 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);
#ifdef MMU_HAS_CUTTER
if (1 == eeprom_read_byte((uint8_t*)EEPROM_MMU_CUTTER_ENABLED))
{
mmu_command(MmuCmd::K0 + tmp_extruder);
manage_response(true, true, MMU_UNLOAD_MOVE);
}
#endif //MMU_HAS_CUTTER
mmu_command(MmuCmd::T0 + tmp_extruder);
manage_response(true, true, MMU_TCODE_MOVE);

View File

@ -132,7 +132,9 @@ extern bool mmu_check_version();
extern void mmu_show_warning();
extern void lcd_mmu_load_to_nozzle(uint8_t filament_nr);
extern void mmu_eject_filament(uint8_t filament, bool recover);
#ifdef MMU_HAS_CUTTER
extern void mmu_cut_filament(uint8_t filament_nr);
#endif //MMU_HAS_CUTTER
extern void mmu_continue_loading();
extern void mmu_filament_ramming();
extern void mmu_wait_for_heater_blocking();

View File

@ -142,7 +142,9 @@ static void lcd_menu_fails_stats_mmu_total();
static void mmu_fil_eject_menu();
static void mmu_load_to_nozzle_menu();
#ifdef MMU_HAS_CUTTER
static void mmu_cut_filament_menu();
#endif //MMU_HAS_CUTTER
#if defined(TMC2130) || defined(FILAMENT_SENSOR)
static void lcd_menu_fails_stats();
@ -2295,6 +2297,7 @@ void lcd_set_fan_check() {
eeprom_update_byte((unsigned char *)EEPROM_FAN_CHECK_ENABLED, fans_check_enabled);
}
#ifdef MMU_HAS_CUTTER
void lcd_cutter_enabled()
{
if (1 == eeprom_read_byte((uint8_t*)EEPROM_MMU_CUTTER_ENABLED))
@ -2306,6 +2309,7 @@ void lcd_cutter_enabled()
eeprom_update_byte((uint8_t*)EEPROM_MMU_CUTTER_ENABLED, 1);
}
}
#endif //MMU_HAS_CUTTER
void lcd_set_filament_autoload() {
fsensor_autoload_set(!fsensor_autoload_enabled);
@ -2536,10 +2540,12 @@ if(current_temperature[0]>(target_temperature[0]*0.95))
menu_submenu(mmu_fil_eject_menu);
break;
case e_FILAMENT_ACTION_mmuCut:
#ifdef MMU_HAS_CUTTER
nLevel=bFilamentPreheatState?1:2;
bFilamentAction=true;
menu_back(nLevel);
menu_submenu(mmu_cut_filament_menu);
#endif //MMU_HAS_CUTTER
break;
case e_FILAMENT_ACTION_none:
break;
@ -5220,6 +5226,7 @@ do\
}\
while(0)\
#ifdef MMU_HAS_CUTTER
static bool settingsCutter()
{
if (mmu_enabled)
@ -5241,7 +5248,10 @@ do\
{\
if(settingsCutter()) return;\
}\
while(0)\
while(0)
#else
#define SETTINGS_CUTTER
#endif //MMU_HAS_CUTTER
#ifdef TMC2130
#define SETTINGS_SILENT_MODE \
@ -5919,6 +5929,7 @@ static void mmu_fil_eject_menu()
}
}
#ifdef MMU_HAS_CUTTER
template <uint8_t filament>
static void mmu_cut_filament()
{
@ -5950,6 +5961,7 @@ else {
else mFilamentMenu();
}
}
#endif //MMU_HAS_CUTTER
#ifdef SNMM
static void fil_unload_menu()
@ -6423,7 +6435,9 @@ static void lcd_main_menu()
//bFilamentFirstRun=true;
MENU_ITEM_SUBMENU_P(_T(MSG_UNLOAD_FILAMENT), extr_unload_);
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);
#endif //MMU_HAS_CUTTER
}
else
{

View File

@ -500,6 +500,7 @@
#define MMU_REQUIRED_FW_BUILDNR 132
#define MMU_FORCE_STEALTH_MODE
#define MMU_DEBUG //print communication between MMU2 and printer on serial
//#define MMU_HAS_CUTTER
#define MMU_IDLER_SENSOR_ATTEMPTS_NR 21 //max. number of attempts to load filament if first load failed; value for max bowden length and case when loading fails right at the beginning

View File

@ -501,6 +501,7 @@
#define MMU_REQUIRED_FW_BUILDNR 132
#define MMU_FORCE_STEALTH_MODE
#define MMU_DEBUG //print communication between MMU2 and printer on serial
//#define MMU_HAS_CUTTER
#define MMU_IDLER_SENSOR_ATTEMPTS_NR 21 //max. number of attempts to load filament if first load failed; value for max bowden length and case when loading fails right at the beginning

View File

@ -500,6 +500,7 @@
#define MMU_REQUIRED_FW_BUILDNR 132
#define MMU_FORCE_STEALTH_MODE
#define MMU_DEBUG //print communication between MMU2 and printer on serial
//#define MMU_HAS_CUTTER
#define MMU_IDLER_SENSOR_ATTEMPTS_NR 21 //max. number of attempts to load filament if first load failed; value for max bowden length and case when loading fails right at the beginning

View File

@ -501,6 +501,7 @@
#define MMU_REQUIRED_FW_BUILDNR 132
#define MMU_FORCE_STEALTH_MODE
#define MMU_DEBUG //print communication between MMU2 and printer on serial
//#define MMU_HAS_CUTTER
#define MMU_IDLER_SENSOR_ATTEMPTS_NR 21 //max. number of attempts to load filament if first load failed; value for max bowden length and case when loading fails right at the beginning

View File

@ -626,6 +626,7 @@
#define MMU_REQUIRED_FW_BUILDNR 83
#define MMU_HWRESET
#define MMU_DEBUG //print communication between MMU2 and printer on serial
//#define MMU_HAS_CUTTER
#define MMU_IDLER_SENSOR_ATTEMPTS_NR 21 //max. number of attempts to load filament if first load failed; value for max bowden length and case when loading fails right at the beginning
#endif //__CONFIGURATION_PRUSA_H

View File

@ -626,6 +626,7 @@
#define MMU_REQUIRED_FW_BUILDNR 83
#define MMU_HWRESET
#define MMU_DEBUG //print communication between MMU2 and printer on serial
//#define MMU_HAS_CUTTER
#define MMU_IDLER_SENSOR_ATTEMPTS_NR 21 //max. number of attempts to load filament if first load failed; value for max bowden length and case when loading fails right at the beginning
#endif //__CONFIGURATION_PRUSA_H