Skip to content

Commit 3cb0777

Browse files
committed
Version 0.1.2.
Bug fixed.
1 parent 4c6d5e0 commit 3cb0777

File tree

4 files changed

+12
-4
lines changed

4 files changed

+12
-4
lines changed

leads_dashboard/prototype.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def __init__(self,
4545
self._on_refresh: _Callable[[_Self], None] = on_refresh
4646
self._on_kill: _Callable[[_Self], None] = on_kill
4747

48-
self._active: bool = True
48+
self._active: bool = False
4949
self._refresher_thread: _Thread | None = None
5050

5151
def root(self) -> _Window:
@@ -72,6 +72,9 @@ def set_on_refresh(self, on_refresh: _Callable[[_Self], None]) -> None:
7272
def set_on_close(self, on_close: _Callable[[_Self], None]) -> None:
7373
self._on_kill = on_close
7474

75+
def active(self) -> bool:
76+
return self._active
77+
7578
def refresher(self) -> None:
7679
while self._active:
7780
self._root.write_event_value("refresher", None)
@@ -82,6 +85,7 @@ def show(self) -> None:
8285
self._root.finalize()
8386
if self._fullscreen:
8487
self._root.maximize()
88+
self._active = True
8589
self._refresher_thread = _Thread(name="refresher", target=self.refresher)
8690
self._refresher_thread.start()
8791
while self._active:
@@ -132,6 +136,9 @@ def window(self) -> Window:
132136
def rd(self) -> T:
133137
return self._window.runtime_data()
134138

139+
def active(self) -> bool:
140+
return self._window.active()
141+
135142
def root(self) -> _Window:
136143
return self._window.root()
137144

leads_vec/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__: str = "4090fbf8"
1+
__version__: str = "4c6d5e07"

leads_vec/cli.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,8 @@ def switch_atbs():
8080
class CustomCallback(Callback):
8181
def on_fail(self, service: Service, error: Exception) -> None:
8282
uim.rd().comm = None
83-
uim["comm_status"].update("COMM OFFLINE", text_color="gray")
83+
if uim.active():
84+
uim["comm_status"].update("COMM OFFLINE", text_color="gray")
8485

8586
def on_receive(self, service: Service, msg: bytes) -> None:
8687
print(msg)

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
setup(
77
name="leads",
8-
version="0.1.1",
8+
version="0.1.2",
99
author="ProjectNeura",
1010
author_email="[email protected]",
1111
description="Lightweight Embedded Assisted Driving System",

0 commit comments

Comments
 (0)