Sync wrappers
Synchronous wrappers around Tile and TileFleet.
These are thin shims that run the async SDK on a shared background event
loop. They exist so callback-driven code (notably the Viser GUI) can call
tile.m1_extend() without having to manage asyncio themselves.
- omnitiles.sync.scan_sync(*, timeout=5.0, name_prefix='OmniTile_')[source]
Synchronous version of
omnitiles.scan().- Parameters:
timeout (
float)name_prefix (
str)
- Return type:
list[TileInfo]
- class omnitiles.sync.SyncTile(tile)[source]
Bases:
objectBlocking facade around
Tile.Every method delegates to the async
Tilerunning on the shared background loop.on_telemetrycallbacks fire on that loop’s thread; keep them fast and non-blocking.- Parameters:
tile (
Tile)
- classmethod discover_one(*, timeout=5.0, name_prefix='OmniTile_')[source]
Scan, take the first match, and return a connected SyncTile.
- Parameters:
timeout (
float)name_prefix (
str)
- Return type:
- property name: str
- property address: str
- property connected: bool