Merge pull request #1570 from PavelSindler/mmu_stealth_mode

mmu stealth mode
This commit is contained in:
mkbel 2019-03-04 17:09:11 +01:00 committed by GitHub
commit 27f69bb761
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 21 additions and 6 deletions

View File

@ -181,6 +181,17 @@ bool check_for_ir_sensor()
#endif //IR_SENSOR
}
static bool activate_stealth_mode()
{
#if defined (MMU_FORCE_STEALTH_MODE)
return true;
#elif defined (SILENT_MODE_STEALTH)
return (eeprom_read_byte((uint8_t*)EEPROM_SILENT) == SILENT_MODE_STEALTH);
#else
return false;
#endif
}
//mmu main loop - state machine processing
void mmu_loop(void)
{
@ -222,8 +233,8 @@ void mmu_loop(void)
bool version_valid = mmu_check_version();
if (!version_valid) mmu_show_warning();
else puts_P(PSTR("MMU version valid"));
if ((PRINTER_TYPE == PRINTER_MK3) || (PRINTER_TYPE == PRINTER_MK3_SNMM))
if (!activate_stealth_mode())
{
FDEBUG_PUTS_P(PSTR("MMU <= 'P0'"));
mmu_puts_P(PSTR("P0\n")); //send 'read finda' request

View File

@ -498,7 +498,8 @@
//#define SUPPORT_VERBOSITY
#define MMU_REQUIRED_FW_BUILDNR 132
//#define MMU_DEBUG //print communication between MMU2 and printer on serial
#define MMU_FORCE_STEALTH_MODE
#define MMU_DEBUG //print communication between MMU2 and printer on serial
#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

@ -499,7 +499,8 @@
//#define SUPPORT_VERBOSITY
#define MMU_REQUIRED_FW_BUILDNR 132
//#define MMU_DEBUG //print communication between MMU2 and printer on serial
#define MMU_FORCE_STEALTH_MODE
#define MMU_DEBUG //print communication between MMU2 and printer on serial
#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

@ -498,7 +498,8 @@
//#define SUPPORT_VERBOSITY
#define MMU_REQUIRED_FW_BUILDNR 132
//#define MMU_DEBUG //print communication between MMU2 and printer on serial
#define MMU_FORCE_STEALTH_MODE
#define MMU_DEBUG //print communication between MMU2 and printer on serial
#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

@ -499,7 +499,8 @@
//#define SUPPORT_VERBOSITY
#define MMU_REQUIRED_FW_BUILDNR 132
//#define MMU_DEBUG //print communication between MMU2 and printer on serial
#define MMU_FORCE_STEALTH_MODE
#define MMU_DEBUG //print communication between MMU2 and printer on serial
#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