Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
WillB97 committed Jan 12, 2025
1 parent 0ce73d9 commit 9615963
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion sbot/future/board_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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):
Expand Down Expand Up @@ -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?')
Expand Down
2 changes: 1 addition & 1 deletion sbot/future/classless/robot.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
comp = Comp()
utils = Utils(boards, comp)

# TODO camera, leds, mqtt
# TODO camera, leds, mqtt, start led

overrides = get_overrides()

Expand Down
1 change: 1 addition & 0 deletions sbot/future/classless/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9615963

Please sign in to comment.