tizi: more amp retries (#28082)

pull/28017/head
Adeeb Shihadeh 2 years ago committed by GitHub
parent 7a31bd12af
commit 9b0d140400
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      system/hardware/tici/amplifier.py

@ -124,12 +124,13 @@ class Amplifier:
def set_configs(self, configs: List[AmpConfig]) -> bool:
# retry in case panda is using the amp
for _ in range(10):
tries = 15
for i in range(15):
try:
self._set_configs(configs)
return True
except OSError:
print("Failed to set amp config, retrying...")
print(f"Failed to set amp config, {tries - i - 1} retries left")
time.sleep(0.02)
return False

Loading…
Cancel
Save