Init stepper current after stepper pins are set up (#13302)
This commit is contained in:
parent
bf8b38e0f7
commit
367d392880
1 changed files with 6 additions and 7 deletions
|
@ -1979,11 +1979,6 @@ bool Stepper::is_block_busy(const block_t* const block) {
|
||||||
|
|
||||||
void Stepper::init() {
|
void Stepper::init() {
|
||||||
|
|
||||||
// Init Digipot Motor Current
|
|
||||||
#if HAS_DIGIPOTSS || HAS_MOTOR_CURRENT_PWM
|
|
||||||
digipot_init();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if MB(ALLIGATOR)
|
#if MB(ALLIGATOR)
|
||||||
const float motor_current[] = MOTOR_CURRENT;
|
const float motor_current[] = MOTOR_CURRENT;
|
||||||
unsigned int digipot_motor = 0;
|
unsigned int digipot_motor = 0;
|
||||||
|
@ -2165,9 +2160,13 @@ void Stepper::init() {
|
||||||
| (INVERT_Z_DIR ? _BV(Z_AXIS) : 0);
|
| (INVERT_Z_DIR ? _BV(Z_AXIS) : 0);
|
||||||
|
|
||||||
set_directions();
|
set_directions();
|
||||||
|
|
||||||
|
#if HAS_DIGIPOTSS || HAS_MOTOR_CURRENT_PWM
|
||||||
#if HAS_MOTOR_CURRENT_PWM
|
#if HAS_MOTOR_CURRENT_PWM
|
||||||
initialized = true;
|
initialized = true;
|
||||||
#endif
|
#endif
|
||||||
|
digipot_init();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue