tizi: more amp retries (#28082)

old-commit-hash: 9b0d140400
beeps
Adeeb Shihadeh 2 years ago committed by GitHub
parent 075df3ec20
commit 09fe521cfe
  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