The turret needs to calibrate its limits on each restart. We should have 2 routines to do this
The first should
- Run the turret in the CCW direction until it hits the limit switch
- Use a constant representing the expected range of the turret to set the encoder to negative half the range
The second should
- Run the turret CCW until it hits the limit switch then set the encoder to 0
- Run the turret CW until it hits the other limit and record the encoder value
- Set the position to half that recorded value
Create Commands that run each of these routines
The turret needs to calibrate its limits on each restart. We should have 2 routines to do this
The first should
The second should
Create Commands that run each of these routines