send continue loading commands periodically if initial load fails
This commit is contained in:
parent
041ed172a0
commit
e52e53d1eb
3 changed files with 18 additions and 2 deletions
Firmware
|
@ -129,6 +129,7 @@
|
|||
#include "sound.h"
|
||||
|
||||
#include "cmdqueue.h"
|
||||
#include "io_atmega2560.h"
|
||||
|
||||
// Macros for bit masks
|
||||
#define BIT(b) (1<<(b))
|
||||
|
@ -6911,8 +6912,16 @@ if((eSoundMode==e_SOUND_MODE_LOUD)||(eSoundMode==e_SOUND_MODE_ONCE))
|
|||
mmu_command(MMU_CMD_T0 + tmp_extruder);
|
||||
|
||||
manage_response(true, true);
|
||||
mmu_command(MMU_CMD_C0);
|
||||
mmu_extruder = tmp_extruder; //filament change is finished
|
||||
#ifdef MMU_IDLER_SENSOR_PIN
|
||||
for (int i = 0; i < MMU_IDLER_SENSOR_ATTEMPTS_NR; i++) {
|
||||
if (PIN_GET(MMU_IDLER_SENSOR_PIN) == 0) break;
|
||||
mmu_command(MMU_CMD_C0);
|
||||
manage_response(true, true);
|
||||
}
|
||||
#else
|
||||
mmu_command(MMU_CMD_C0);
|
||||
#endif //MMU_IDLER_SENSOR_PIN
|
||||
mmu_extruder = tmp_extruder; //filament change is finished
|
||||
|
||||
if (load_to_nozzle)// for single material usage with mmu
|
||||
{
|
||||
|
|
|
@ -237,6 +237,9 @@ void mmu_loop(void)
|
|||
#endif //MMU_DEBUG
|
||||
mmu_puts_P(PSTR("C0\n")); //send 'continue loading'
|
||||
mmu_state = 3;
|
||||
#ifdef MMU_IDLER_SENSOR_PIN
|
||||
mmu_idl_sens = 1; //enable idler sensor
|
||||
#endif //MMU_IDLER_SENSOR_PIN
|
||||
}
|
||||
else if (mmu_cmd == MMU_CMD_U0)
|
||||
{
|
||||
|
@ -303,6 +306,9 @@ void mmu_loop(void)
|
|||
{
|
||||
if (PIN_GET(MMU_IDLER_SENSOR_PIN) == 0)
|
||||
{
|
||||
#ifdef MMU_DEBUG
|
||||
printf_P(PSTR("MMU <= 'A'\n"), mmu_finda);
|
||||
#endif //MMU_DEBUG
|
||||
mmu_puts_P(PSTR("A\n")); //send 'abort' request
|
||||
mmu_idl_sens = 0;
|
||||
//printf_P(PSTR("MMU IDLER_SENSOR = 0 - ABORT\n"));
|
||||
|
|
|
@ -615,5 +615,6 @@
|
|||
#define MMU_HWRESET
|
||||
//#define MMU_DEBUG //print communication between MMU2 and printer on serial
|
||||
#define MMU_IDLER_SENSOR_PIN 62 //idler sensor @PK0 (digital pin 62/A8)
|
||||
#define MMU_IDLER_SENSOR_ATTEMPTS_NR 4 //max. number of attempts to load filament if first load failed
|
||||
|
||||
#endif //__CONFIGURATION_PRUSA_H
|
||||
|
|
Loading…
Reference in a new issue