Fix some python2-isms in prep for python3
These ones should work in both versions so we don't have to do them as
part of a global change over.
Change-Id: I2177b329d385c50d706a50a750b6c115ea3ea7ae
diff --git a/y2014/control_loops/python/claw.py b/y2014/control_loops/python/claw.py
index cade03d..346a188 100755
--- a/y2014/control_loops/python/claw.py
+++ b/y2014/control_loops/python/claw.py
@@ -401,7 +401,7 @@
upper_bound = (initial_X[1, 0] if initial_X[1, 0] > goal[1, 0] else
goal[1, 0]) + max_separation_error
- for i in xrange(iterations):
+ for i in range(iterations):
U = claw.K * (goal - claw.X)
U = ScaleU(claw, U, claw.K, goal - claw.X)
claw.Update(U)
diff --git a/y2014/control_loops/python/shooter.py b/y2014/control_loops/python/shooter.py
index 9287dae..e25c72b 100755
--- a/y2014/control_loops/python/shooter.py
+++ b/y2014/control_loops/python/shooter.py
@@ -217,7 +217,7 @@
[[goal_position], [0.0],
[-sprung_shooter.A[1, 0] / sprung_shooter.A[1, 2] * goal_position]])
voltage = numpy.matrix([[0.0]])
- for _ in xrange(500):
+ for _ in range(500):
U = sprung_shooter.K * (R - sprung_shooter.X_hat)
U = ClipDeltaU(sprung_shooter, voltage, U)
sprung_shooter.Y = raw_sprung_shooter.Y + 0.01
@@ -240,7 +240,7 @@
R = numpy.matrix([[goal_position], [0.0],
[-shooter.A[1, 0] / shooter.A[1, 2] * goal_position]])
voltage = numpy.matrix([[0.0]])
- for _ in xrange(500):
+ for _ in range(500):
U = shooter.K * (R - shooter.X_hat)
U = ClipDeltaU(shooter, voltage, U)
shooter.Y = raw_shooter.Y + 0.01