bugfix - PFW233 - first homing in silent mode Y crash.
This commit is contained in:
parent
8ba83a9789
commit
bde097cad1
2 changed files with 11 additions and 1 deletions
|
@ -1048,7 +1048,8 @@ void setup()
|
|||
#ifdef TMC2130
|
||||
uint8_t silentMode = eeprom_read_byte((uint8_t*)EEPROM_SILENT);
|
||||
if (silentMode == 0xff) silentMode = 0;
|
||||
tmc2130_mode = silentMode?TMC2130_MODE_SILENT:TMC2130_MODE_NORMAL;
|
||||
// tmc2130_mode = silentMode?TMC2130_MODE_SILENT:TMC2130_MODE_NORMAL;
|
||||
tmc2130_mode = TMC2130_MODE_NORMAL;
|
||||
uint8_t crashdet = eeprom_read_byte((uint8_t*)EEPROM_CRASH_DET);
|
||||
if (crashdet)
|
||||
{
|
||||
|
@ -1095,6 +1096,11 @@ void setup()
|
|||
#endif //TMC2130
|
||||
|
||||
st_init(); // Initialize stepper, this enables interrupts!
|
||||
|
||||
#ifdef TMC2130
|
||||
tmc2130_mode = silentMode?TMC2130_MODE_SILENT:TMC2130_MODE_NORMAL;
|
||||
tmc2130_init();
|
||||
#endif //TMC2130
|
||||
|
||||
setup_photpin();
|
||||
|
||||
|
|
|
@ -260,6 +260,8 @@ void tmc2130_home_enter(uint8_t axes_mask)
|
|||
{
|
||||
// printf_P(PSTR("tmc2130_home_enter(axes_mask=0x%02x)\n"), axes_mask);
|
||||
#ifdef TMC2130_SG_HOMING
|
||||
if (axes_mask & 0x03) //X or Y
|
||||
tmc2130_wait_standstill_xy(1000);
|
||||
for (uint8_t axis = X_AXIS; axis <= Z_AXIS; axis++) //X Y and Z axes
|
||||
{
|
||||
uint8_t mask = (X_AXIS_MASK << axis);
|
||||
|
@ -283,6 +285,8 @@ void tmc2130_home_exit()
|
|||
{
|
||||
// printf_P(PSTR("tmc2130_home_exit sg_homing_axes_mask=0x%02x\n"), sg_homing_axes_mask);
|
||||
#ifdef TMC2130_SG_HOMING
|
||||
if (sg_homing_axes_mask & 0x03) //X or Y
|
||||
tmc2130_wait_standstill_xy(1000);
|
||||
if (sg_homing_axes_mask)
|
||||
{
|
||||
for (uint8_t axis = X_AXIS; axis <= Z_AXIS; axis++) //X Y and Z axes
|
||||
|
|
Loading…
Reference in a new issue