|
@@ -572,18 +572,18 @@ extern int8_t CrashDetectMenu;
|
|
|
|
|
|
void crashdet_enable()
|
|
|
{
|
|
|
- MYSERIAL.println("crashdet_enable");
|
|
|
+ MYSERIAL.println("crashdet_enable");
|
|
|
tmc2130_sg_stop_on_crash = true;
|
|
|
- eeprom_update_byte((uint8_t*)EEPROM_CRASH_DET, 0xFF);
|
|
|
+ eeprom_update_byte((uint8_t*)EEPROM_CRASH_DET, 0xFF);
|
|
|
CrashDetectMenu = 1;
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
|
|
|
void crashdet_disable()
|
|
|
{
|
|
|
- MYSERIAL.println("crashdet_disable");
|
|
|
+ MYSERIAL.println("crashdet_disable");
|
|
|
tmc2130_sg_stop_on_crash = false;
|
|
|
- eeprom_update_byte((uint8_t*)EEPROM_CRASH_DET, 0x00);
|
|
|
+ eeprom_update_byte((uint8_t*)EEPROM_CRASH_DET, 0x00);
|
|
|
CrashDetectMenu = 0;
|
|
|
}
|
|
|
|
|
@@ -651,7 +651,7 @@ void fsensor_enable()
|
|
|
fsensor_enabled = true;
|
|
|
fsensor_ignore_error = true;
|
|
|
fsensor_M600 = false;
|
|
|
- eeprom_update_byte((uint8_t*)EEPROM_FSENSOR, 0xFF);
|
|
|
+ eeprom_update_byte((uint8_t*)EEPROM_FSENSOR, 0xFF);
|
|
|
FSensorStateMenu = 1;
|
|
|
}
|
|
|
|
|
@@ -659,7 +659,7 @@ void fsensor_disable()
|
|
|
{
|
|
|
MYSERIAL.println("fsensor_disable");
|
|
|
fsensor_enabled = false;
|
|
|
- eeprom_update_byte((uint8_t*)EEPROM_FSENSOR, 0x00);
|
|
|
+ eeprom_update_byte((uint8_t*)EEPROM_FSENSOR, 0x00);
|
|
|
FSensorStateMenu = 0;
|
|
|
}
|
|
|
|
|
@@ -1135,33 +1135,33 @@ void setup()
|
|
|
lcd_setstatuspgm(WELCOME_MSG);
|
|
|
}
|
|
|
*/
|
|
|
- manage_heater(); // Update temperatures
|
|
|
-#ifdef DEBUG_UVLO_AUTOMATIC_RECOVER
|
|
|
- MYSERIAL.println("Power panic detected!");
|
|
|
- MYSERIAL.print("Current bed temp:");
|
|
|
- MYSERIAL.println(degBed());
|
|
|
- MYSERIAL.print("Saved bed temp:");
|
|
|
- MYSERIAL.println((float)eeprom_read_byte((uint8_t*)EEPROM_UVLO_TARGET_BED));
|
|
|
-#endif
|
|
|
- if ( degBed() > ( (float)eeprom_read_byte((uint8_t*)EEPROM_UVLO_TARGET_BED) - AUTOMATIC_UVLO_BED_TEMP_OFFSET) ){
|
|
|
- #ifdef DEBUG_UVLO_AUTOMATIC_RECOVER
|
|
|
- MYSERIAL.println("Automatic recovery!");
|
|
|
- #endif
|
|
|
- recover_print(1);
|
|
|
- }
|
|
|
- else{
|
|
|
- #ifdef DEBUG_UVLO_AUTOMATIC_RECOVER
|
|
|
- MYSERIAL.println("Normal recovery!");
|
|
|
- #endif
|
|
|
- if ( lcd_show_fullscreen_message_yes_no_and_wait_P(MSG_RECOVER_PRINT, false) ) recover_print(0);
|
|
|
- else {
|
|
|
- eeprom_update_byte((uint8_t*)EEPROM_UVLO, 0);
|
|
|
- lcd_update_enable(true);
|
|
|
- lcd_update(2);
|
|
|
- lcd_setstatuspgm(WELCOME_MSG);
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
+ manage_heater(); // Update temperatures
|
|
|
+#ifdef DEBUG_UVLO_AUTOMATIC_RECOVER
|
|
|
+ MYSERIAL.println("Power panic detected!");
|
|
|
+ MYSERIAL.print("Current bed temp:");
|
|
|
+ MYSERIAL.println(degBed());
|
|
|
+ MYSERIAL.print("Saved bed temp:");
|
|
|
+ MYSERIAL.println((float)eeprom_read_byte((uint8_t*)EEPROM_UVLO_TARGET_BED));
|
|
|
+#endif
|
|
|
+ if ( degBed() > ( (float)eeprom_read_byte((uint8_t*)EEPROM_UVLO_TARGET_BED) - AUTOMATIC_UVLO_BED_TEMP_OFFSET) ){
|
|
|
+ #ifdef DEBUG_UVLO_AUTOMATIC_RECOVER
|
|
|
+ MYSERIAL.println("Automatic recovery!");
|
|
|
+ #endif
|
|
|
+ recover_print(1);
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ #ifdef DEBUG_UVLO_AUTOMATIC_RECOVER
|
|
|
+ MYSERIAL.println("Normal recovery!");
|
|
|
+ #endif
|
|
|
+ if ( lcd_show_fullscreen_message_yes_no_and_wait_P(MSG_RECOVER_PRINT, false) ) recover_print(0);
|
|
|
+ else {
|
|
|
+ eeprom_update_byte((uint8_t*)EEPROM_UVLO, 0);
|
|
|
+ lcd_update_enable(true);
|
|
|
+ lcd_update(2);
|
|
|
+ lcd_setstatuspgm(WELCOME_MSG);
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
|
|
|
}
|
|
|
|
|
@@ -5827,8 +5827,8 @@ case 404: //M404 Enter the nominal filament width (3mm, 1.75mm ) N<3.0> or disp
|
|
|
MYSERIAL.print("selectedSerialPort = ");
|
|
|
MYSERIAL.println(selectedSerialPort, DEC);
|
|
|
break;
|
|
|
- case 10: // D10 - Tell the printer that XYZ calibration went OK
|
|
|
- calibration_status_store(CALIBRATION_STATUS_LIVE_ADJUST);
|
|
|
+ case 10: // D10 - Tell the printer that XYZ calibration went OK
|
|
|
+ calibration_status_store(CALIBRATION_STATUS_LIVE_ADJUST);
|
|
|
break;
|
|
|
case 999:
|
|
|
{
|
|
@@ -7099,10 +7099,10 @@ void recover_print(uint8_t automatic) {
|
|
|
|
|
|
recover_machine_state_after_power_panic();
|
|
|
|
|
|
- // Set the target bed and nozzle temperatures.
|
|
|
- sprintf_P(cmd, PSTR("M104 S%d"), target_temperature[active_extruder]);
|
|
|
- enquecommand(cmd);
|
|
|
- sprintf_P(cmd, PSTR("M140 S%d"), target_temperature_bed);
|
|
|
+ // Set the target bed and nozzle temperatures.
|
|
|
+ sprintf_P(cmd, PSTR("M104 S%d"), target_temperature[active_extruder]);
|
|
|
+ enquecommand(cmd);
|
|
|
+ sprintf_P(cmd, PSTR("M140 S%d"), target_temperature_bed);
|
|
|
enquecommand(cmd);
|
|
|
|
|
|
// Lift the print head, so one may remove the excess priming material.
|
|
@@ -7117,9 +7117,9 @@ void recover_print(uint8_t automatic) {
|
|
|
enquecommand(cmd);
|
|
|
enquecommand_P(PSTR("M83")); //E axis relative mode
|
|
|
//enquecommand_P(PSTR("G1 E5 F120")); //Extrude some filament to stabilize pessure
|
|
|
- // If not automatically recoreverd (long power loss), extrude extra filament to stabilize
|
|
|
- if(automatic == 0){
|
|
|
- enquecommand_P(PSTR("G1 E5 F120")); //Extrude some filament to stabilize pessure
|
|
|
+ // If not automatically recoreverd (long power loss), extrude extra filament to stabilize
|
|
|
+ if(automatic == 0){
|
|
|
+ enquecommand_P(PSTR("G1 E5 F120")); //Extrude some filament to stabilize pessure
|
|
|
}
|
|
|
enquecommand_P(PSTR("G1 E" STRINGIFY(-DEFAULT_RETRACTION)" F480"));
|
|
|
// Mark the power panic status as inactive.
|