cleanup: remove TMC2130 ifdef in lcd_selfcheck_axis

This function is no longer included in the firmware
when using TMC2130

Also removed commented code
This commit is contained in:
Guðni Már Gilbert 2023-05-07 11:07:55 +00:00 committed by DRracer
parent 70ae3353ce
commit 6784c6919b
1 changed files with 2 additions and 16 deletions

View File

@ -6247,10 +6247,8 @@ static bool lcd_selfcheck_axis_sg(uint8_t axis) {
#endif //TMC2130 #endif //TMC2130
#ifndef TMC2130 #ifndef TMC2130
static bool lcd_selfcheck_axis(int _axis, int _travel) static bool lcd_selfcheck_axis(int _axis, int _travel)
{ {
// printf_P(PSTR("lcd_selfcheck_axis %d, %d\n"), _axis, _travel);
bool _stepdone = false; bool _stepdone = false;
bool _stepresult = false; bool _stepresult = false;
uint8_t _progress = 0; uint8_t _progress = 0;
@ -6269,13 +6267,9 @@ static bool lcd_selfcheck_axis(int _axis, int _travel)
plan_buffer_line_curposXYZE(manual_feedrate[0] / 60); plan_buffer_line_curposXYZE(manual_feedrate[0] / 60);
st_synchronize(); st_synchronize();
#ifdef TMC2130
if ((READ(Z_MIN_PIN) ^ (bool)Z_MIN_ENDSTOP_INVERTING))
#else //TMC2130
if ((READ(X_MIN_PIN) ^ (bool)X_MIN_ENDSTOP_INVERTING) || if ((READ(X_MIN_PIN) ^ (bool)X_MIN_ENDSTOP_INVERTING) ||
(READ(Y_MIN_PIN) ^ (bool)Y_MIN_ENDSTOP_INVERTING) || (READ(Y_MIN_PIN) ^ (bool)Y_MIN_ENDSTOP_INVERTING) ||
(READ(Z_MIN_PIN) ^ (bool)Z_MIN_ENDSTOP_INVERTING)) (READ(Z_MIN_PIN) ^ (bool)Z_MIN_ENDSTOP_INVERTING))
#endif //TMC2130
{ {
if (_axis == 0) if (_axis == 0)
{ {
@ -6293,10 +6287,7 @@ static bool lcd_selfcheck_axis(int _axis, int _travel)
{ {
_stepresult = ((READ(Z_MIN_PIN) ^ Z_MIN_ENDSTOP_INVERTING) == 1) ? true : false; _stepresult = ((READ(Z_MIN_PIN) ^ Z_MIN_ENDSTOP_INVERTING) == 1) ? true : false;
_err_endstop = ((READ(X_MIN_PIN) ^ X_MIN_ENDSTOP_INVERTING) == 1) ? 0 : 1; _err_endstop = ((READ(X_MIN_PIN) ^ X_MIN_ENDSTOP_INVERTING) == 1) ? 0 : 1;
printf_P(PSTR("lcd_selfcheck_axis %d, %d\n"), _stepresult, _err_endstop); printf_P(PSTR("lcd_selfcheck_axis %d, %d\n"), _stepresult, _err_endstop);
/*disable_x();
disable_y();
disable_z();*/
} }
_stepdone = true; _stepdone = true;
} }
@ -6314,15 +6305,10 @@ static bool lcd_selfcheck_axis(int _axis, int _travel)
manage_heater(); manage_heater();
manage_inactivity(true); manage_inactivity(true);
//_delay(100);
(_travel_done <= _travel) ? _travel_done++ : _stepdone = true; (_travel_done <= _travel) ? _travel_done++ : _stepdone = true;
} while (!_stepdone); } while (!_stepdone);
//current_position[_axis] = current_position[_axis] + 15;
//plan_buffer_line_curposXYZE(manual_feedrate[0] / 60, active_extruder);
if (!_stepresult) if (!_stepresult)
{ {
const char *_error_1; const char *_error_1;