diff --git a/Firmware/mmu.cpp b/Firmware/mmu.cpp index ebed61ecc..3e71737aa 100644 --- a/Firmware/mmu.cpp +++ b/Firmware/mmu.cpp @@ -173,39 +173,51 @@ void mmu_loop(void) if ((mmu_cmd >= MMU_CMD_T0) && (mmu_cmd <= MMU_CMD_T4)) { filament = mmu_cmd - MMU_CMD_T0; +#ifdef MMU_DEBUG printf_P(PSTR("MMU <= 'T%d'\n"), filament); +#endif //MMU_DEBUG mmu_printf_P(PSTR("T%d\n"), filament); mmu_state = 3; // wait for response } else if ((mmu_cmd >= MMU_CMD_L0) && (mmu_cmd <= MMU_CMD_L4)) { filament = mmu_cmd - MMU_CMD_L0; +#ifdef MMU_DEBUG printf_P(PSTR("MMU <= 'L%d'\n"), filament); +#endif //MMU_DEBUG mmu_printf_P(PSTR("L%d\n"), filament); mmu_state = 3; // wait for response } else if (mmu_cmd == MMU_CMD_C0) { +#ifdef MMU_DEBUG printf_P(PSTR("MMU <= 'C0'\n")); +#endif //MMU_DEBUG mmu_puts_P(PSTR("C0\n")); //send 'continue loading' mmu_state = 3; } else if (mmu_cmd == MMU_CMD_U0) { +#ifdef MMU_DEBUG printf_P(PSTR("MMU <= 'U0'\n")); +#endif //MMU_DEBUG mmu_puts_P(PSTR("U0\n")); //send 'unload current filament' mmu_state = 3; } else if ((mmu_cmd >= MMU_CMD_E0) && (mmu_cmd <= MMU_CMD_E4)) { int filament = mmu_cmd - MMU_CMD_E0; +#ifdef MMU_DEBUG printf_P(PSTR("MMU <= 'E%d'\n"), filament); +#endif //MMU_DEBUG mmu_printf_P(PSTR("E%d\n"), filament); //send eject filament mmu_state = 3; // wait for response } else if (mmu_cmd == MMU_CMD_R0) { +#ifdef MMU_DEBUG printf_P(PSTR("MMU <= 'R0'\n")); +#endif //MMU_DEBUG mmu_puts_P(PSTR("R0\n")); //send recover after eject mmu_state = 3; // wait for response } @@ -224,7 +236,9 @@ void mmu_loop(void) if (mmu_rx_ok() > 0) { fscanf_P(uart2io, PSTR("%hhu"), &mmu_finda); //scan finda from buffer +#ifdef MMU_DEBUG printf_P(PSTR("MMU => '%dok'\n"), mmu_finda); +#endif //MMU_DEBUG //printf_P(PSTR("Eact: %d\n"), int(e_active())); if (!mmu_finda && CHECK_FINDA && fsensor_enabled) { fsensor_stop_and_save_print(); @@ -244,7 +258,9 @@ void mmu_loop(void) case 3: //response to mmu commands if (mmu_rx_ok() > 0) { +#ifdef MMU_DEBUG printf_P(PSTR("MMU => 'ok'\n")); +#endif //MMU_DEBUG mmu_ready = true; mmu_state = 1; } diff --git a/Firmware/variants/1_75mm_MK25-RAMBo10a-E3Dv6full.h b/Firmware/variants/1_75mm_MK25-RAMBo10a-E3Dv6full.h index 304cde4bf..626c64e8d 100644 --- a/Firmware/variants/1_75mm_MK25-RAMBo10a-E3Dv6full.h +++ b/Firmware/variants/1_75mm_MK25-RAMBo10a-E3Dv6full.h @@ -481,4 +481,6 @@ //#define SUPPORT_VERBOSITY +//#define MMU_DEBUG //print communication between MMU2 and printer on serial + #endif //__CONFIGURATION_PRUSA_H diff --git a/Firmware/variants/1_75mm_MK25-RAMBo13a-E3Dv6full.h b/Firmware/variants/1_75mm_MK25-RAMBo13a-E3Dv6full.h index 9fccbfc2a..cb13e8ad9 100644 --- a/Firmware/variants/1_75mm_MK25-RAMBo13a-E3Dv6full.h +++ b/Firmware/variants/1_75mm_MK25-RAMBo13a-E3Dv6full.h @@ -482,4 +482,6 @@ //#define SUPPORT_VERBOSITY +//#define MMU_DEBUG //print communication between MMU2 and printer on serial + #endif //__CONFIGURATION_PRUSA_H diff --git a/Firmware/variants/1_75mm_MK3-EINSy10a-E3Dv6full.h b/Firmware/variants/1_75mm_MK3-EINSy10a-E3Dv6full.h index 7cde630b7..ea1951f48 100644 --- a/Firmware/variants/1_75mm_MK3-EINSy10a-E3Dv6full.h +++ b/Firmware/variants/1_75mm_MK3-EINSy10a-E3Dv6full.h @@ -613,4 +613,6 @@ //#define SUPPORT_VERBOSITY +//#define MMU_DEBUG //print communication between MMU2 and printer on serial + #endif //__CONFIGURATION_PRUSA_H