Speed increase test
This commit is contained in:
@@ -749,6 +749,11 @@ def main():
|
||||
current_target = g._val_to_step(gauge_targets[i])
|
||||
if current_target != g._current_step:
|
||||
direction = 1 if current_target > g._current_step else -1
|
||||
steps_to_move = current_target - g._current_step
|
||||
steps_to_move = max(
|
||||
-10, min(10, steps_to_move)
|
||||
) # move up to 10 steps at a time
|
||||
for _ in range(abs(steps_to_move)):
|
||||
g.step(direction)
|
||||
moved_any = True
|
||||
|
||||
|
||||
Reference in New Issue
Block a user