This commit is contained in:
NikolajDanger
2022-09-19 15:39:29 +02:00
parent c245c4c6da
commit 1570508983

View File

@ -61,17 +61,17 @@ def main():
while not all(calibrated): while not all(calibrated):
for i, function in enumerate(tests): for i, function in enumerate(tests):
if not calibrated[i]: calibrated[i] = False
wheels = function(arlo, *values[i]) wheels = function(arlo, *values[i])
fraction = max(wheels)/min(wheels) fraction = max(wheels)/min(wheels)
if fraction <= THRESHOLD: if fraction <= THRESHOLD:
calibrated[i] = True calibrated[i] = True
elif wheels[0] < wheels[1]: elif wheels[0] < wheels[1]:
values[i][0] += 1 values[i][0] += 1
else: else:
values[i][1] += 1 values[i][1] += 1
cps[i] = wheels[0]/SLEEP_TIME cps[i] = wheels[0]/SLEEP_TIME
time = [0 for _ in range(4)] time = [0 for _ in range(4)]