[FR?] Multiple endstops per stepper, select secondary endstop within "G28" Command

I am also in the need for a similar function.

An alternative would be to have a SET_ENDSTOP command for a stepper or to alter the MANUAL_STEPPER or STOP_ON_ENDSTOP parameter with an endstop pin at runtime.

The difference with your need is you need it on a XYZE stepper, I would need it on manual steppers or basically every stepper.

What I do not really understand is why there is such a big difference in the commands. It should be possible to do G28 Z for gcode reasons, but a G28 manual_stepper_name or G28 stepper_y should also work - or, the other way around, a STEPPER (instead of MANUAL_STEPPER) … MOVE … STOP_ON_ENDSTOP.

If you could merge those to syntaxes I guess providing an endstop pin at runtime via the STOP_ON_ENDSTOP parameter would be more generic and would not require new Gcode commands to utilize a secondary (or third, fourth and so on) endstop.