Set stepper directions after M501/M502

See https://github.com/MarlinFirmware/Marlin/issues/11103#issuecomment-421387611

Co-Authored-By: tcm0116 <tcm0116@users.noreply.github.com>
This commit is contained in:
Scott Lahteine 2018-09-14 20:03:01 -05:00
parent 7f2139aa07
commit 6afe5ab28b
2 changed files with 6 additions and 0 deletions

View File

@ -467,6 +467,9 @@ class Stepper {
// Set direction bits for all steppers
static void set_directions();
// Allow reset_stepper_drivers to access private set_directions
friend void reset_stepper_drivers();
FORCE_INLINE static uint32_t calc_timer_interval(uint32_t step_rate, uint8_t scale, uint8_t* loops) {
uint32_t timer;

View File

@ -35,6 +35,8 @@
#include "MarlinConfig.h"
#include "stepper.h"
//
// TMC26X Driver objects and inits
//
@ -578,6 +580,7 @@ void reset_stepper_drivers() {
#if HAS_DRIVER(L6470)
L6470_init_to_defaults();
#endif
stepper.set_directions();
}
//