Setup the UVLO interrupt later during initialization
Do not allow uvlo_tiny() to trigger before the previous print has already been recovered. A quick repeated power failure could cause uvlo_tiny to overwrite the Z position before it has been correctly recovered.
This commit is contained in:
parent
3ca1db48c6
commit
200cdde1af
|
|
@ -1298,10 +1298,6 @@ void setup()
|
||||||
|
|
||||||
st_init(); // Initialize stepper, this enables interrupts!
|
st_init(); // Initialize stepper, this enables interrupts!
|
||||||
|
|
||||||
#ifdef UVLO_SUPPORT
|
|
||||||
setup_uvlo_interrupt();
|
|
||||||
#endif //UVLO_SUPPORT
|
|
||||||
|
|
||||||
#ifdef TMC2130
|
#ifdef TMC2130
|
||||||
tmc2130_mode = silentMode?TMC2130_MODE_SILENT:TMC2130_MODE_NORMAL;
|
tmc2130_mode = silentMode?TMC2130_MODE_SILENT:TMC2130_MODE_NORMAL;
|
||||||
update_mode_profile();
|
update_mode_profile();
|
||||||
|
|
@ -1596,12 +1592,14 @@ void setup()
|
||||||
lcd_update(2);
|
lcd_update(2);
|
||||||
lcd_setstatuspgm(_T(WELCOME_MSG));
|
lcd_setstatuspgm(_T(WELCOME_MSG));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Only arm the uvlo interrupt _after_ a recovering print has been initialized and
|
||||||
|
// the entire state machine initialized.
|
||||||
|
setup_uvlo_interrupt();
|
||||||
#endif //UVLO_SUPPORT
|
#endif //UVLO_SUPPORT
|
||||||
|
|
||||||
fCheckModeInit();
|
fCheckModeInit();
|
||||||
fSetMmuMode(mmu_enabled);
|
fSetMmuMode(mmu_enabled);
|
||||||
KEEPALIVE_STATE(NOT_BUSY);
|
KEEPALIVE_STATE(NOT_BUSY);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue