sr-robot3 2026.0.1__py3-none-any.whl → 2026.0.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- sr/robot3/_version.py +2 -2
- sr/robot3/robot.py +7 -4
- sr/robot3/utils.py +13 -1
- {sr_robot3-2026.0.1.dist-info → sr_robot3-2026.0.2.dist-info}/METADATA +1 -1
- {sr_robot3-2026.0.1.dist-info → sr_robot3-2026.0.2.dist-info}/RECORD +8 -8
- {sr_robot3-2026.0.1.dist-info → sr_robot3-2026.0.2.dist-info}/WHEEL +0 -0
- {sr_robot3-2026.0.1.dist-info → sr_robot3-2026.0.2.dist-info}/licenses/LICENSE +0 -0
- {sr_robot3-2026.0.1.dist-info → sr_robot3-2026.0.2.dist-info}/top_level.txt +0 -0
sr/robot3/_version.py
CHANGED
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
|
|
28
28
|
commit_id: COMMIT_ID
|
29
29
|
__commit_id__: COMMIT_ID
|
30
30
|
|
31
|
-
__version__ = version = '2026.0.
|
32
|
-
__version_tuple__ = version_tuple = (2026, 0,
|
31
|
+
__version__ = version = '2026.0.2'
|
32
|
+
__version_tuple__ = version_tuple = (2026, 0, 2)
|
33
33
|
|
34
34
|
__commit_id__ = commit_id = None
|
sr/robot3/robot.py
CHANGED
@@ -8,7 +8,7 @@ import time
|
|
8
8
|
from pathlib import Path
|
9
9
|
from socket import socket
|
10
10
|
from types import MappingProxyType
|
11
|
-
from typing import Mapping, Optional
|
11
|
+
from typing import Mapping, Optional, final
|
12
12
|
|
13
13
|
from . import game_specific, timeout
|
14
14
|
from ._version import __version__
|
@@ -23,12 +23,15 @@ from .power_board import Note, PowerBoard
|
|
23
23
|
from .raw_serial import RawSerial
|
24
24
|
from .servo_board import ServoBoard
|
25
25
|
from .simulator.time_server import TimeServer
|
26
|
-
from .utils import
|
26
|
+
from .utils import (
|
27
|
+
IN_SIMULATOR, FinalMeta, ensure_atexit_on_term, obtain_lock, singular,
|
28
|
+
)
|
27
29
|
|
28
30
|
logger = logging.getLogger(__name__)
|
29
31
|
|
30
32
|
|
31
|
-
|
33
|
+
@final
|
34
|
+
class Robot(metaclass=FinalMeta):
|
32
35
|
"""
|
33
36
|
The main robot class that provides access to all the boards.
|
34
37
|
|
@@ -444,7 +447,7 @@ class Robot:
|
|
444
447
|
self.power_board._run_led.flash()
|
445
448
|
self.kch._flash_start()
|
446
449
|
|
447
|
-
while not start_button_pressed() or remote_start_pressed():
|
450
|
+
while not (start_button_pressed() or remote_start_pressed()):
|
448
451
|
self.sleep(0.1)
|
449
452
|
logger.info("Start signal received; continuing.")
|
450
453
|
if not self._no_powerboard:
|
sr/robot3/utils.py
CHANGED
@@ -7,7 +7,7 @@ import signal
|
|
7
7
|
import socket
|
8
8
|
from abc import ABC, abstractmethod
|
9
9
|
from types import FrameType
|
10
|
-
from typing import Any, Mapping, NamedTuple, Optional, TypeVar
|
10
|
+
from typing import Any, Mapping, NamedTuple, Optional, Type, TypeVar
|
11
11
|
|
12
12
|
from serial.tools.list_ports import comports
|
13
13
|
from serial.tools.list_ports_common import ListPortInfo
|
@@ -77,6 +77,18 @@ class Board(ABC):
|
|
77
77
|
pass # pragma: no cover
|
78
78
|
|
79
79
|
|
80
|
+
class FinalMeta(type):
|
81
|
+
"""
|
82
|
+
A meta class which ensures a given class cannot be subclassed.
|
83
|
+
|
84
|
+
It's recommended to additionally use typing.final.
|
85
|
+
"""
|
86
|
+
def __new__(cls, name: str, bases: tuple, classdict: dict) -> Type:
|
87
|
+
if bases:
|
88
|
+
raise TypeError(f"{name} cannot be sub-classed.")
|
89
|
+
return super().__new__(cls, name, bases, dict(classdict))
|
90
|
+
|
91
|
+
|
80
92
|
def map_to_int(
|
81
93
|
x: float,
|
82
94
|
in_min: float,
|
@@ -1,5 +1,5 @@
|
|
1
1
|
sr/robot3/__init__.py,sha256=lW7j65ruMEkRNJjZzp8929TefPMaMhqXzpsGPJqMkRs,1476
|
2
|
-
sr/robot3/_version.py,sha256=
|
2
|
+
sr/robot3/_version.py,sha256=AMq-4theMLzodgpl_peU-w6WdJzeuxX6ZkKEnpto0vE,710
|
3
3
|
sr/robot3/arduino.py,sha256=9rGsvGDb1JoHB4c7W61R16Y3eb0-UZ9TE49Qu7BJIZE,16934
|
4
4
|
sr/robot3/astoria.py,sha256=0EIXoxvs1glkGuzLDYG7HptKucc8q7sdWAQiu96NG24,8547
|
5
5
|
sr/robot3/camera.py,sha256=b2r8-ttQgLqbMv9BI6qWb5sHjeg4Zb5VrGo2uWMYGd8,8686
|
@@ -13,17 +13,17 @@ sr/robot3/mqtt.py,sha256=1xKQ0uwkupURWFXrvsD75TE-GlltfbrpVNqoabgmsrc,6679
|
|
13
13
|
sr/robot3/power_board.py,sha256=3Skbc7kmG1pr2K6n94POkMOXT4jzbOiYCz2cb60CWv8,17734
|
14
14
|
sr/robot3/py.typed,sha256=dXL7b_5DnfZ_09rOcxu7D-0rT56DRm26uGUohPJOPQc,94
|
15
15
|
sr/robot3/raw_serial.py,sha256=rdh0lyS9tJDyHbAZKyJSO8lKvdJ3-_iZzvmUSOdbo08,7368
|
16
|
-
sr/robot3/robot.py,sha256=
|
16
|
+
sr/robot3/robot.py,sha256=Z_HTnw7cg1WSEFSvXKDxnebzkT8eQkS15Efn7m9DaNs,15945
|
17
17
|
sr/robot3/serial_wrapper.py,sha256=QLf56KkrqZ737aiYQKv0rU6HlMuE4azJHxanYVKsCUk,9451
|
18
18
|
sr/robot3/servo_board.py,sha256=1GppUoqdx9wUA551bO95dEbtCGdzS10twv8OZ3S6t8U,12505
|
19
19
|
sr/robot3/timeout.py,sha256=qBPCOwnOW9h0fLnL-peraO9RsaKWc92TcTYNgyTzo_g,2678
|
20
|
-
sr/robot3/utils.py,sha256=
|
20
|
+
sr/robot3/utils.py,sha256=BT1xhCQDdjeP0VyNWOiqaqhRW1jZu7pYkUdeFVbHwII,9534
|
21
21
|
sr/robot3/calibrations/__init__.py,sha256=TTL-lkU5tj3EszSEInRTftNvX5rsMyRUSHf12RlJ4QY,130
|
22
22
|
sr/robot3/simulator/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
23
23
|
sr/robot3/simulator/camera.py,sha256=0t5PxnzZtFhRCumCJcbhjIxMBVvJrg3KJuvWQtG_sH0,3189
|
24
24
|
sr/robot3/simulator/time_server.py,sha256=MwFJM7p3vqf4balmGwIMXcCLBVJQgnq2X4gY_agalwc,2859
|
25
|
-
sr_robot3-2026.0.
|
26
|
-
sr_robot3-2026.0.
|
27
|
-
sr_robot3-2026.0.
|
28
|
-
sr_robot3-2026.0.
|
29
|
-
sr_robot3-2026.0.
|
25
|
+
sr_robot3-2026.0.2.dist-info/licenses/LICENSE,sha256=d9EjkBp2jG1JOJ3zKfKRwBtPe1nhh1VByrw4iH3A9WA,1101
|
26
|
+
sr_robot3-2026.0.2.dist-info/METADATA,sha256=tiRMOoyCppnqYya5wYh3tzGZAakmHJNFzBNY4zszSNQ,5248
|
27
|
+
sr_robot3-2026.0.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
28
|
+
sr_robot3-2026.0.2.dist-info/top_level.txt,sha256=XFzWuC7umCVdV-O6IuC9Rl0qehvEC-U34M9WJ2-2h3E,3
|
29
|
+
sr_robot3-2026.0.2.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|