Using Pigpio to drive a couple of stepper motors on a CNC-like system, I'd like to "initialize" by setting up a repeating wave to continually step until a limit switch has been reached, at which point I'd issue a wave_tx_stop()
to halt the stepper. I'm curious if there's any way of seeing how many pulses have been issued at the point the wave was stopped, so that I could deduce how many steps "wide" the area is between limit switches.
That is, is there any way to see how many total pulses have been executed by the currently-running wave chain? Am I just way off base here and need to try something different?