From 230198cb08173f2116989652c2de1c1d62aa99f4 Mon Sep 17 00:00:00 2001 From: Ian OHara Date: Mon, 20 Jan 2025 18:28:51 -0800 Subject: [PATCH] longer reconnect, exc_info --- software/control/microcontroller.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/software/control/microcontroller.py b/software/control/microcontroller.py index 0dec514c..92038c33 100644 --- a/software/control/microcontroller.py +++ b/software/control/microcontroller.py @@ -243,7 +243,7 @@ def reconnect(self, attempts: int) -> bool: class MicrocontrollerSerial(AbstractCephlaMicroSerial): - INITIAL_RECONNECT_INTERVAL = 0.1 + INITIAL_RECONNECT_INTERVAL = 0.5 @staticmethod def exponential_backoff_time(attempt_index: int, initial_interval: float) -> float: @@ -324,7 +324,7 @@ def reconnect(self, attempts: int) -> bool: self._serial.open() except SerialException as se: self._log.warning( - f"Couldn't reconnect serial={self._serial.port} @ baud={self._serial.baudrate}. Attempt {i + 1}/{attempts}." + f"Couldn't reconnect serial={self._serial.port} @ baud={self._serial.baudrate}. Attempt {i + 1}/{attempts}.", exc_info=se ) else: break