Rolled back to working without unload sense and hedged recover from filament at boot for now

This commit is contained in:
MacBookPro 2018-11-02 22:39:01 +10:00
parent 6c56deae4f
commit b5d6642e10
4 changed files with 14223 additions and 14158 deletions

File diff suppressed because it is too large Load Diff

View File

@ -7361,7 +7361,7 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) //default argument s
} else {
if (mcode_in_progress != 600) //M600 not in progress
{
if ((lcd_commands_type != LCD_COMMAND_V2_CAL) && !wizard_active && mmuFilamentMK3Moving) {
if ((lcd_commands_type != LCD_COMMAND_V2_CAL) && !wizard_active && !mmuFilamentMK3Moving) {
fsensor_check_autoload();
} else {
fsensor_autoload_check_stop();
@ -9100,4 +9100,4 @@ if((eSoundMode==e_SOUND_MODE_LOUD)||(eSoundMode==e_SOUND_MODE_ONCE))
lcd_update_enable(false);
}
#define FIL_LOAD_LENGTH 60
#define FIL_LOAD_LENGTH 60

View File

@ -170,7 +170,7 @@ bool fsensor_enable(void)
fsensor_not_responding = false;
else
fsensor_not_responding = true;
fsensor_enabled = pat9125 ? true : false;
fsensor_enabled = true;
fsensor_autoload_enabled = true;
fsensor_oq_meassure = false;
fsensor_err_cnt = 0;
@ -286,11 +286,15 @@ bool fsensor_check_autoload(void)
{
puts_P(_N("fsensor_check_autoload = true !!!\n"));
if (mmu_enabled) {
mmu_puts_P(PSTR("FS\n"));
mmuFilamentMK3Moving = false;
fsensor_autoload_check_stop();
//mmu_puts_P(PSTR("FS\n"));
mmuFilamentMK3Moving = true;
fsensor_autoload_check_stop();
} else return true;
}
} else if ((fsensor_autoload_c <= -12) && (fsensor_autoload_sum < -20))
{
mmuFilamentMK3Moving = true;
fsensor_autoload_check_stop();
}
return false;
}
@ -542,4 +546,4 @@ void fsensor_setup_interrupt(void)
fsensor_int_pin_old = 0;
pciSetup(FSENSOR_INT_PIN);
}
}

View File

@ -139,13 +139,14 @@ void mmu_loop(void)
puts_P(PSTR("MMU => 'start'"));
puts_P(PSTR("MMU <= 'S1'"));
#endif //MMU_DEBUG
mmu_puts_P(PSTR("S1\n")); //send 'read version' request
mmu_puts_P(PSTR("S1\n")); //send 'read version' request
mmu_state = -2;
}else if (mmu_rx_sensFilatBoot() > 0)
{
printf_P(PSTR("MMU => '%Sensed Filament at Boot'\n"), mmu_finda);
enquecommand_front_P(PSTR("M104 S210"));
//enquecommand_front_P(PSTR("M104 S210"));
enquecommand_front_P(PSTR("M109 S210"));
delay(200);
extr_unload_at_boot();
mmu_puts_P(PSTR("FB\n")); //Advise unloaded to above bondtech for retraction
}
@ -232,8 +233,7 @@ void mmu_loop(void)
if (lastLoadedFilament != filament) {
fsensor_enable();
fsensor_autoload_enabled = true;
mmuFilamentMK3Moving = true;
//mmuFilamentLoadSeen = false;
mmuFilamentMK3Moving = false;
lastLoadedFilament = filament;
}
mmu_state = 3; // wait for response
@ -261,9 +261,8 @@ void mmu_loop(void)
printf_P(PSTR("MMU <= 'U0'\n"));
#endif //MMU_DEBUG
mmu_puts_P(PSTR("U0\n")); //send 'unload current filament'
fsensor_enable();
fsensor_autoload_enabled = true;
mmuFilamentMK3Moving = true;
mmuFilamentMK3Moving = false;
lastLoadedFilament = -10;
mmu_state = 3;
}
@ -320,13 +319,13 @@ void mmu_loop(void)
case 3: //response to mmu commands
if (mmu_rx_ok() > 0)
{
if (!mmuFilamentMK3Moving) {
if (mmuFilamentMK3Moving) {
printf_P(PSTR("MMU => 'ok'\n"));
mmu_ready = true;
mmu_state = 1;
}
} else if (mmu_rx_not_ok() > 0) {
printf_P(PSTR("MMU => 'not ok'\n"));
printf_P(PSTR("MMU => 'not ok/processing'\n"));
}
else if ((mmu_last_request + MMU_CMD_TIMEOUT) < millis())
{ //resend request after timeout (5 min)
@ -1183,4 +1182,4 @@ void mmu_eject_filament(uint8_t filament, bool recover)
{
puts_P(PSTR("Filament nr out of range!"));
}
}
}