initial state of crash detect and filament sensor is ON
slowed down return speed from crash detect after home Added babystep apply after return from crash detect (don’t know if it’s accurate) Added D10 to set machine to XYZ correctly calibrated Added resume debug directive to mask additional menu item
This commit is contained in:
parent
39f6e746dc
commit
73cc1c9c8a
@ -586,6 +586,7 @@ void crashdet_stop_and_save_print()
|
|||||||
void crashdet_restore_print_and_continue()
|
void crashdet_restore_print_and_continue()
|
||||||
{
|
{
|
||||||
restore_print_from_ram_and_continue(0); //XYZ = orig, E - no change
|
restore_print_from_ram_and_continue(0); //XYZ = orig, E - no change
|
||||||
|
babystep_apply();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -614,7 +615,7 @@ void fsensor_restore_print_and_continue()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool fsensor_enabled = false;
|
bool fsensor_enabled = true;
|
||||||
bool fsensor_ignore_error = true;
|
bool fsensor_ignore_error = true;
|
||||||
bool fsensor_M600 = false;
|
bool fsensor_M600 = false;
|
||||||
long fsensor_prev_pos_e = 0;
|
long fsensor_prev_pos_e = 0;
|
||||||
@ -1053,10 +1054,11 @@ void setup()
|
|||||||
eeprom_write_byte((uint8_t*)EEPROM_UVLO, 0);
|
eeprom_write_byte((uint8_t*)EEPROM_UVLO, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef DEBUG_DISABLE_STARTMSGS
|
|
||||||
check_babystep(); //checking if Z babystep is in allowed range
|
check_babystep(); //checking if Z babystep is in allowed range
|
||||||
setup_uvlo_interrupt();
|
setup_uvlo_interrupt();
|
||||||
|
|
||||||
|
#ifndef DEBUG_DISABLE_STARTMSGS
|
||||||
|
|
||||||
if (calibration_status() == CALIBRATION_STATUS_ASSEMBLED ||
|
if (calibration_status() == CALIBRATION_STATUS_ASSEMBLED ||
|
||||||
calibration_status() == CALIBRATION_STATUS_UNKNOWN) {
|
calibration_status() == CALIBRATION_STATUS_UNKNOWN) {
|
||||||
// Reset the babystepping values, so the printer will not move the Z axis up when the babystepping is enabled.
|
// Reset the babystepping values, so the printer will not move the Z axis up when the babystepping is enabled.
|
||||||
@ -5754,6 +5756,9 @@ case 404: //M404 Enter the nominal filament width (3mm, 1.75mm ) N<3.0> or disp
|
|||||||
MYSERIAL.print("selectedSerialPort = ");
|
MYSERIAL.print("selectedSerialPort = ");
|
||||||
MYSERIAL.println(selectedSerialPort, DEC);
|
MYSERIAL.println(selectedSerialPort, DEC);
|
||||||
break;
|
break;
|
||||||
|
case 10: // D10 - Tell the printer that XYZ calibration went OK
|
||||||
|
calibration_status_store(CALIBRATION_STATUS_LIVE_ADJUST);
|
||||||
|
break;
|
||||||
case 999:
|
case 999:
|
||||||
{
|
{
|
||||||
MYSERIAL.println("D999 - crash");
|
MYSERIAL.println("D999 - crash");
|
||||||
@ -7298,7 +7303,7 @@ void stop_and_save_print_to_ram(float z_move, float e_move)
|
|||||||
// card.closefile();
|
// card.closefile();
|
||||||
saved_printing = true;
|
saved_printing = true;
|
||||||
sei();
|
sei();
|
||||||
if ((z_move != 0) || (e_move != 0)) { // extruder and z move
|
if ((z_move != 0) || (e_move != 0)) { // extruder or z move
|
||||||
#if 1
|
#if 1
|
||||||
// Rather than calling plan_buffer_line directly, push the move into the command queue,
|
// Rather than calling plan_buffer_line directly, push the move into the command queue,
|
||||||
char buf[48];
|
char buf[48];
|
||||||
@ -7332,7 +7337,7 @@ void restore_print_from_ram_and_continue(float e_move)
|
|||||||
feedrate = saved_feedrate2; //restore feedrate
|
feedrate = saved_feedrate2; //restore feedrate
|
||||||
float e = saved_pos[E_AXIS] - e_move;
|
float e = saved_pos[E_AXIS] - e_move;
|
||||||
plan_set_e_position(e);
|
plan_set_e_position(e);
|
||||||
plan_buffer_line(saved_pos[X_AXIS], saved_pos[Y_AXIS], saved_pos[Z_AXIS], saved_pos[E_AXIS], homing_feedrate[Z_AXIS], active_extruder);
|
plan_buffer_line(saved_pos[X_AXIS], saved_pos[Y_AXIS], saved_pos[Z_AXIS], saved_pos[E_AXIS], homing_feedrate[Z_AXIS]/10, active_extruder);
|
||||||
st_synchronize();
|
st_synchronize();
|
||||||
memcpy(current_position, saved_pos, sizeof(saved_pos));
|
memcpy(current_position, saved_pos, sizeof(saved_pos));
|
||||||
memcpy(destination, current_position, sizeof(destination));
|
memcpy(destination, current_position, sizeof(destination));
|
||||||
|
@ -56,7 +56,7 @@ uint32_t tmc2130_sg_pos[4] = {0, 0, 0, 0};
|
|||||||
|
|
||||||
uint8_t sg_homing_axes_mask = 0x00;
|
uint8_t sg_homing_axes_mask = 0x00;
|
||||||
|
|
||||||
bool tmc2130_sg_stop_on_crash = false;
|
bool tmc2130_sg_stop_on_crash = true;
|
||||||
bool tmc2130_sg_crash = false;
|
bool tmc2130_sg_crash = false;
|
||||||
uint8_t tmc2130_diag_mask = 0x00;
|
uint8_t tmc2130_diag_mask = 0x00;
|
||||||
uint16_t tmc2130_sg_err[4] = {0, 0, 0, 0};
|
uint16_t tmc2130_sg_err[4] = {0, 0, 0, 0};
|
||||||
|
@ -105,9 +105,9 @@ int8_t SDscrool = 0;
|
|||||||
|
|
||||||
int8_t SilentModeMenu = 0;
|
int8_t SilentModeMenu = 0;
|
||||||
|
|
||||||
int8_t FSensorStateMenu = 0;
|
int8_t FSensorStateMenu = 1;
|
||||||
|
|
||||||
int8_t CrashDetectMenu = 0;
|
int8_t CrashDetectMenu = 1;
|
||||||
|
|
||||||
extern void fsensor_enable();
|
extern void fsensor_enable();
|
||||||
extern void fsensor_disable();
|
extern void fsensor_disable();
|
||||||
@ -3869,10 +3869,12 @@ static void lcd_main_menu()
|
|||||||
|
|
||||||
MENU_ITEM(back, MSG_WATCH, lcd_status_screen);
|
MENU_ITEM(back, MSG_WATCH, lcd_status_screen);
|
||||||
|
|
||||||
|
#ifdef RESUME_DEBUG
|
||||||
if (!saved_printing)
|
if (!saved_printing)
|
||||||
MENU_ITEM(function, PSTR("tst - Save"), lcd_menu_test_save);
|
MENU_ITEM(function, PSTR("tst - Save"), lcd_menu_test_save);
|
||||||
else
|
else
|
||||||
MENU_ITEM(function, PSTR("tst - Restore"), lcd_menu_test_restore);
|
MENU_ITEM(function, PSTR("tst - Restore"), lcd_menu_test_restore);
|
||||||
|
#ifdef //RESUME_DEBUG
|
||||||
|
|
||||||
#ifdef TMC2130_DEBUG
|
#ifdef TMC2130_DEBUG
|
||||||
MENU_ITEM(function, PSTR("recover print"), recover_print);
|
MENU_ITEM(function, PSTR("recover print"), recover_print);
|
||||||
|
Loading…
Reference in New Issue
Block a user