From 96159632ea805756d84060dc6344a85ccce65cb6 Mon Sep 17 00:00:00 2001 From: WillB97 Date: Sun, 12 Jan 2025 18:57:11 +0000 Subject: [PATCH] Minor fixes --- sbot/future/board_manager.py | 4 +++- sbot/future/classless/robot.py | 2 +- sbot/future/classless/utils.py | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/sbot/future/board_manager.py b/sbot/future/board_manager.py index ed1347a..588c69c 100644 --- a/sbot/future/board_manager.py +++ b/sbot/future/board_manager.py @@ -14,7 +14,7 @@ from typing import Callable, ClassVar, NamedTuple from sbot.exceptions import BoardDisconnectionError -from sbot.serial_wrapper import SerialWrapper +from sbot.serial_wrapper import BASE_TIMEOUT, SerialWrapper from sbot.utils import BoardIdentity, get_simulator_boards, get_USB_identity from serial.tools.list_ports import comports from serial.tools.list_ports_common import ListPortInfo @@ -81,6 +81,7 @@ class DiscoveryTemplate(NamedTuple): use_usb_serial: bool = False sim_board_type: str | None = None sim_only: bool = False + timeout: float | None = BASE_TIMEOUT class PortIdentity(NamedTuple): @@ -270,6 +271,7 @@ def _inititalse_port( template.baud_rate, identity=initial_identity, delay_after_connect=template.delay_after_connect, + timeout=template.timeout, ) try: response = board_serial.query('*IDN?') diff --git a/sbot/future/classless/robot.py b/sbot/future/classless/robot.py index 9c03ba8..4d808f9 100644 --- a/sbot/future/classless/robot.py +++ b/sbot/future/classless/robot.py @@ -22,7 +22,7 @@ comp = Comp() utils = Utils(boards, comp) -# TODO camera, leds, mqtt +# TODO camera, leds, mqtt, start led overrides = get_overrides() diff --git a/sbot/future/classless/utils.py b/sbot/future/classless/utils.py index a4d7d65..1fe4d8f 100644 --- a/sbot/future/classless/utils.py +++ b/sbot/future/classless/utils.py @@ -27,6 +27,7 @@ def __init__(self, boards: BoardManager, comp: Comp): sim_only=True, sim_board_type='TimeServer', max_boards=1, + timeout=None, # Disable timeout ) BoardManager.register_board(template) # We need to trigger loading the metadata when wait_start is called