fix - Z movement speed in selftest
conditional translation for linearity correction and variable resolution
This commit is contained in:
parent
06da2bb915
commit
73b0349898
@ -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
|
||||
|
||||
|
@ -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 New Issue
Block a user