crash detection: turn off nozzle when waiting for user
This commit is contained in:
parent
e559404448
commit
2f5bb80e98
2 changed files with 19 additions and 12 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -9,3 +9,4 @@ Firmware/Doc
|
||||||
/Firmware/Firmware.sln
|
/Firmware/Firmware.sln
|
||||||
/Firmware/Firmware.vcxproj
|
/Firmware/Firmware.vcxproj
|
||||||
/Firmware/Firmware.vcxproj.filters
|
/Firmware/Firmware.vcxproj.filters
|
||||||
|
/Firmware/Firmware - Shortcut.lnk
|
||||||
|
|
|
@ -686,7 +686,6 @@ void crashdet_detected(uint8_t mask)
|
||||||
st_synchronize();
|
st_synchronize();
|
||||||
static uint8_t crashDet_counter = 0;
|
static uint8_t crashDet_counter = 0;
|
||||||
bool automatic_recovery_after_crash = true;
|
bool automatic_recovery_after_crash = true;
|
||||||
bool yesno;
|
|
||||||
|
|
||||||
if (crashDet_counter++ == 0) {
|
if (crashDet_counter++ == 0) {
|
||||||
crashDetTimer.start();
|
crashDetTimer.start();
|
||||||
|
@ -727,18 +726,25 @@ void crashdet_detected(uint8_t mask)
|
||||||
gcode_G28(true, true, false, false); //home X and Y
|
gcode_G28(true, true, false, false); //home X and Y
|
||||||
st_synchronize();
|
st_synchronize();
|
||||||
|
|
||||||
if(automatic_recovery_after_crash)
|
if (automatic_recovery_after_crash) {
|
||||||
yesno = true;
|
|
||||||
else
|
|
||||||
yesno = lcd_show_fullscreen_message_yes_no_and_wait_P(_i("Crash detected. Resume print?"), false);
|
|
||||||
lcd_update_enable(true);
|
|
||||||
if (yesno)
|
|
||||||
{
|
|
||||||
enquecommand_P(PSTR("CRASH_RECOVER"));
|
enquecommand_P(PSTR("CRASH_RECOVER"));
|
||||||
}
|
}else{
|
||||||
else
|
HotendTempBckp = degTargetHotend(active_extruder);
|
||||||
{
|
setTargetHotend(0, active_extruder);
|
||||||
enquecommand_P(PSTR("CRASH_CANCEL"));
|
bool yesno = lcd_show_fullscreen_message_yes_no_and_wait_P(_i("Crash detected. Resume print?"), false);
|
||||||
|
lcd_update_enable(true);
|
||||||
|
if (yesno)
|
||||||
|
{
|
||||||
|
char cmd1[10];
|
||||||
|
strcpy(cmd1, "M109 S");
|
||||||
|
strcat(cmd1, ftostr3(HotendTempBckp));
|
||||||
|
enquecommand(cmd1);
|
||||||
|
enquecommand_P(PSTR("CRASH_RECOVER"));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
enquecommand_P(PSTR("CRASH_CANCEL"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue