Trinamic: Split stealthChop, improve driver monitoring, etc. (#12582)
This commit is contained in:
committed by
Scott Lahteine
parent
055cb2b956
commit
50b2fbd031
@ -67,8 +67,9 @@
|
||||
fr_mm_s = MIN(homing_feedrate(X_AXIS), homing_feedrate(Y_AXIS)) * SQRT(sq(mlratio) + 1.0);
|
||||
|
||||
#if ENABLED(SENSORLESS_HOMING)
|
||||
sensorless_homing_per_axis(X_AXIS);
|
||||
sensorless_homing_per_axis(Y_AXIS);
|
||||
sensorless_t stealth_states { false, false, false };
|
||||
stealth_states.x = tmc_enable_stallguard(stepperX);
|
||||
stealth_states.y = tmc_enable_stallguard(stepperY);
|
||||
#endif
|
||||
|
||||
do_blocking_move_to_xy(1.5 * mlx * x_axis_home_dir, 1.5 * mly * home_dir(Y_AXIS), fr_mm_s);
|
||||
@ -78,8 +79,8 @@
|
||||
current_position[X_AXIS] = current_position[Y_AXIS] = 0.0;
|
||||
|
||||
#if ENABLED(SENSORLESS_HOMING)
|
||||
sensorless_homing_per_axis(X_AXIS, false);
|
||||
sensorless_homing_per_axis(Y_AXIS, false);
|
||||
tmc_disable_stallguard(stepperX, stealth_states.x);
|
||||
tmc_disable_stallguard(stepperY, stealth_states.y);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -378,8 +378,8 @@ static int read_serial(const uint8_t index) {
|
||||
template<const size_t buffer_size>
|
||||
void receive(char (&buffer)[buffer_size]) {
|
||||
uint8_t data = 0;
|
||||
millis_t tranfer_timeout = millis() + RX_TIMESLICE;
|
||||
while (PENDING(millis(), tranfer_timeout)) {
|
||||
millis_t transfer_timeout = millis() + RX_TIMESLICE;
|
||||
while (PENDING(millis(), transfer_timeout)) {
|
||||
switch (stream_state) {
|
||||
case StreamState::STREAM_RESET:
|
||||
stream_reset();
|
||||
|
Reference in New Issue
Block a user