Merge pull request #496 from XPila/MK3-accurate_homming
fix - Z movement speed in selftest
This commit is contained in:
commit
841ebfd4f9
5 changed files with 18 additions and 2 deletions
|
@ -136,6 +136,10 @@ const bool Z_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic o
|
|||
#endif /* DEBUG_BUILD */
|
||||
|
||||
//#define EXPERIMENTAL_FEATURES
|
||||
//#define TMC2130_LINEARITY_CORRECTION
|
||||
//#define TMC2130_VARIABLE_RESOLUTION
|
||||
|
||||
|
||||
|
||||
/*------------------------------------
|
||||
TMC2130 default settings
|
||||
|
|
|
@ -1033,6 +1033,7 @@ void setup()
|
|||
MYSERIAL.println("CrashDetect DISABLED");
|
||||
}
|
||||
|
||||
#ifdef TMC2130_LINEARITY_CORRECTION
|
||||
tmc2130_wave_fac[X_AXIS] = eeprom_read_byte((uint8_t*)EEPROM_TMC2130_WAVE_X_FAC);
|
||||
tmc2130_wave_fac[Y_AXIS] = eeprom_read_byte((uint8_t*)EEPROM_TMC2130_WAVE_Y_FAC);
|
||||
tmc2130_wave_fac[Z_AXIS] = eeprom_read_byte((uint8_t*)EEPROM_TMC2130_WAVE_Z_FAC);
|
||||
|
@ -1041,7 +1042,9 @@ void setup()
|
|||
if (tmc2130_wave_fac[Y_AXIS] == 0xff) tmc2130_wave_fac[Y_AXIS] = 0;
|
||||
if (tmc2130_wave_fac[Z_AXIS] == 0xff) tmc2130_wave_fac[Z_AXIS] = 0;
|
||||
if (tmc2130_wave_fac[E_AXIS] == 0xff) tmc2130_wave_fac[E_AXIS] = 0;
|
||||
#endif //TMC2130_LINEARITY_CORRECTION
|
||||
|
||||
#ifdef TMC2130_VARIABLE_RESOLUTION
|
||||
tmc2130_mres[X_AXIS] = eeprom_read_byte((uint8_t*)EEPROM_TMC2130_X_MRES);
|
||||
tmc2130_mres[Y_AXIS] = eeprom_read_byte((uint8_t*)EEPROM_TMC2130_Y_MRES);
|
||||
tmc2130_mres[Z_AXIS] = eeprom_read_byte((uint8_t*)EEPROM_TMC2130_Z_MRES);
|
||||
|
@ -1054,6 +1057,12 @@ void setup()
|
|||
eeprom_update_byte((uint8_t*)EEPROM_TMC2130_Y_MRES, tmc2130_mres[Y_AXIS]);
|
||||
eeprom_update_byte((uint8_t*)EEPROM_TMC2130_Z_MRES, tmc2130_mres[Z_AXIS]);
|
||||
eeprom_update_byte((uint8_t*)EEPROM_TMC2130_E_MRES, tmc2130_mres[E_AXIS]);
|
||||
#else //TMC2130_VARIABLE_RESOLUTION
|
||||
tmc2130_mres[X_AXIS] = tmc2130_usteps2mres(TMC2130_USTEPS_XY);
|
||||
tmc2130_mres[Y_AXIS] = tmc2130_usteps2mres(TMC2130_USTEPS_XY);
|
||||
tmc2130_mres[Z_AXIS] = tmc2130_usteps2mres(TMC2130_USTEPS_Z);
|
||||
tmc2130_mres[E_AXIS] = tmc2130_usteps2mres(TMC2130_USTEPS_E);
|
||||
#endif //TMC2130_VARIABLE_RESOLUTION
|
||||
|
||||
#endif //TMC2130
|
||||
|
||||
|
|
|
@ -471,7 +471,7 @@ void checkFanSpeed()
|
|||
if ((fan_speed[0] == 0) && (current_temperature[0] > EXTRUDER_AUTO_FAN_TEMPERATURE)) fan_speed_errors[0]++;
|
||||
else fan_speed_errors[0] = 0;
|
||||
|
||||
if ((fan_speed[1] == 0) && (block_buffer[block_buffer_tail].fan_speed > MIN_PRINT_FAN_SPEED)) fan_speed_errors[1]++;
|
||||
if ((fan_speed[1] == 0) && ((blocks_queued()?block_buffer[block_buffer_tail].fan_speed:fanSpeed) > MIN_PRINT_FAN_SPEED)) fan_speed_errors[1]++;
|
||||
else fan_speed_errors[1] = 0;
|
||||
|
||||
if ((fan_speed_errors[0] > 5) && fans_check_enabled) {
|
||||
|
|
|
@ -185,10 +185,13 @@ void tmc2130_init()
|
|||
tmc2130_sg_cnt[2] = 0;
|
||||
tmc2130_sg_cnt[3] = 0;
|
||||
|
||||
#ifdef TMC2130_LINEARITY_CORRECTION
|
||||
tmc2130_set_wave(X_AXIS, 247, tmc2130_wave_fac[X_AXIS]);
|
||||
tmc2130_set_wave(Y_AXIS, 247, tmc2130_wave_fac[Y_AXIS]);
|
||||
tmc2130_set_wave(Z_AXIS, 247, tmc2130_wave_fac[Z_AXIS]);
|
||||
tmc2130_set_wave(E_AXIS, 247, tmc2130_wave_fac[E_AXIS]);
|
||||
#endif //TMC2130_LINEARITY_CORRECTION
|
||||
|
||||
}
|
||||
|
||||
uint8_t tmc2130_sample_diag()
|
||||
|
|
|
@ -5938,7 +5938,7 @@ static bool lcd_selftest()
|
|||
_result = lcd_selfcheck_axis(2, Z_MAX_POS);
|
||||
if (eeprom_read_byte((uint8_t*)EEPROM_WIZARD_ACTIVE) != 1) {
|
||||
enquecommand_P(PSTR("G28 W"));
|
||||
enquecommand_P(PSTR("G1 Z15"));
|
||||
enquecommand_P(PSTR("G1 Z15 F1000"));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue