Skip to content

Commit 0f4896c

Browse files
committed
pyproject.toml: v0.2.1
Fix the localhost tool not showing a device unless it has broadcast an ANNOUNCE packet. Signed-off-by: Jordan Yates <jordan@embeint.com>
1 parent 6c81a1c commit 0f4896c

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "infuse_iot"
7-
version = "0.2.0"
7+
version = "0.2.1"
88
authors = [{name = "Embeint Holdings Pty Ltd", email = "support@embeint.com"}]
99
description = "Infuse-IoT Platform python package"
1010
classifiers = [

src/infuse_iot/tools/localhost.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ def add_parser(cls, parser):
4242

4343
def __init__(self, args):
4444
self._data_lock = threading.Lock()
45-
self._columns = {}
46-
self._data = {}
47-
self._port = args.port
45+
self._columns: dict[str, dict] = {}
46+
self._data: dict[int, dict] = {}
47+
self._port: int = args.port
4848

4949
self._client = LocalClient(default_multicast_address(), 1.0)
5050
self._decoder = TDF()
@@ -191,6 +191,9 @@ def recv_thread(self) -> None:
191191
self._data[source.infuse_id] = {
192192
"infuse_id": f"0x{source.infuse_id:016x}",
193193
}
194+
# Set default application ID
195+
self._data[source.infuse_id]["ANNOUNCE"] = {"application": "Unknown"}
196+
194197
self._data[source.infuse_id]["time"] = InfuseTime.utc_time_string(time.time())
195198
if source.interface == interface.ID.BT_ADV:
196199
addr_bytes = source.interface_address.val.addr_val.to_bytes(6, "big")

0 commit comments

Comments
 (0)