fixed first load failing due to def being extruder 0 instead of -10. e.g. something other than one of the extruder values
This commit is contained in:
parent
bdfe509bc3
commit
1f1b72f3bb
File diff suppressed because it is too large
Load Diff
|
|
@ -32,9 +32,9 @@ bool mmu_ready = false;
|
||||||
//bool mmuFilamentLoadSeen = false;
|
//bool mmuFilamentLoadSeen = false;
|
||||||
bool mmuFilamentMK3Moving = false;
|
bool mmuFilamentMK3Moving = false;
|
||||||
bool mmuFSensorLoading = false;
|
bool mmuFSensorLoading = false;
|
||||||
int lastLoadedFilament = 0;
|
int lastLoadedFilament = -10;
|
||||||
|
|
||||||
static int8_t mmu_state = 0;
|
int8_t mmu_state = 0;
|
||||||
|
|
||||||
uint8_t mmu_cmd = 0;
|
uint8_t mmu_cmd = 0;
|
||||||
|
|
||||||
|
|
@ -230,7 +230,6 @@ void mmu_loop(void)
|
||||||
#ifdef MMU_DEBUG
|
#ifdef MMU_DEBUG
|
||||||
printf_P(PSTR("MMU <= 'T%d'\n"), filament);
|
printf_P(PSTR("MMU <= 'T%d'\n"), filament);
|
||||||
#endif //MMU_DEBUG
|
#endif //MMU_DEBUG
|
||||||
mmu_printf_P(PSTR("T%d\n"), filament);
|
|
||||||
if (lastLoadedFilament != filament) {
|
if (lastLoadedFilament != filament) {
|
||||||
mmuFSensorLoading = true;
|
mmuFSensorLoading = true;
|
||||||
fsensor_enable();
|
fsensor_enable();
|
||||||
|
|
@ -238,6 +237,7 @@ void mmu_loop(void)
|
||||||
mmuFilamentMK3Moving = false;
|
mmuFilamentMK3Moving = false;
|
||||||
lastLoadedFilament = filament;
|
lastLoadedFilament = filament;
|
||||||
}
|
}
|
||||||
|
mmu_printf_P(PSTR("T%d\n"), filament);
|
||||||
mmu_state = 3; // wait for response
|
mmu_state = 3; // wait for response
|
||||||
}
|
}
|
||||||
else if ((mmu_cmd >= MMU_CMD_L0) && (mmu_cmd <= MMU_CMD_L4))
|
else if ((mmu_cmd >= MMU_CMD_L0) && (mmu_cmd <= MMU_CMD_L4))
|
||||||
|
|
@ -254,6 +254,7 @@ void mmu_loop(void)
|
||||||
#ifdef MMU_DEBUG
|
#ifdef MMU_DEBUG
|
||||||
printf_P(PSTR("MMU <= 'C0'\n"));
|
printf_P(PSTR("MMU <= 'C0'\n"));
|
||||||
#endif //MMU_DEBUG
|
#endif //MMU_DEBUG
|
||||||
|
delay(200);
|
||||||
mmu_puts_P(PSTR("C0\n")); //send 'continue loading'
|
mmu_puts_P(PSTR("C0\n")); //send 'continue loading'
|
||||||
mmu_state = 3;
|
mmu_state = 3;
|
||||||
}
|
}
|
||||||
|
|
@ -290,7 +291,7 @@ void mmu_loop(void)
|
||||||
#ifdef MMU_DEBUG
|
#ifdef MMU_DEBUG
|
||||||
puts_P(PSTR("MMU <= 'P0'"));
|
puts_P(PSTR("MMU <= 'P0'"));
|
||||||
#endif //MMU_DEBUG
|
#endif //MMU_DEBUG
|
||||||
mmu_puts_P(PSTR("P0\n")); //send 'read finda' request
|
mmu_puts_P(PSTR("P0\n")); //send 'read finda' request
|
||||||
mmu_state = 2;
|
mmu_state = 2;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
|
@ -325,6 +326,7 @@ void mmu_loop(void)
|
||||||
mmu_state = 1;
|
mmu_state = 1;
|
||||||
} else if (mmuFilamentMK3Moving) {
|
} else if (mmuFilamentMK3Moving) {
|
||||||
printf_P(PSTR("MMU => 'ok'\n"));
|
printf_P(PSTR("MMU => 'ok'\n"));
|
||||||
|
mmu_puts_P(PSTR("FS\n"));
|
||||||
mmu_ready = true;
|
mmu_ready = true;
|
||||||
mmu_state = 1;
|
mmu_state = 1;
|
||||||
} else printf_P(PSTR("MMU => 'waiting for filament @ MK3 Sensor'\n"));
|
} else printf_P(PSTR("MMU => 'waiting for filament @ MK3 Sensor'\n"));
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue