Skip to content

Commit

Permalink
Version 0.1.2.
Browse files Browse the repository at this point in the history
Bug fixed.
  • Loading branch information
ATATC committed Dec 25, 2023
1 parent 4c6d5e0 commit 3cb0777
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
9 changes: 8 additions & 1 deletion leads_dashboard/prototype.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def __init__(self,
self._on_refresh: _Callable[[_Self], None] = on_refresh
self._on_kill: _Callable[[_Self], None] = on_kill

self._active: bool = True
self._active: bool = False
self._refresher_thread: _Thread | None = None

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

def active(self) -> bool:
return self._active

def refresher(self) -> None:
while self._active:
self._root.write_event_value("refresher", None)
Expand All @@ -82,6 +85,7 @@ def show(self) -> None:
self._root.finalize()
if self._fullscreen:
self._root.maximize()
self._active = True
self._refresher_thread = _Thread(name="refresher", target=self.refresher)
self._refresher_thread.start()
while self._active:
Expand Down Expand Up @@ -132,6 +136,9 @@ def window(self) -> Window:
def rd(self) -> T:
return self._window.runtime_data()

def active(self) -> bool:
return self._window.active()

def root(self) -> _Window:
return self._window.root()

Expand Down
2 changes: 1 addition & 1 deletion leads_vec/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__: str = "4090fbf8"
__version__: str = "4c6d5e07"
3 changes: 2 additions & 1 deletion leads_vec/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ def switch_atbs():
class CustomCallback(Callback):
def on_fail(self, service: Service, error: Exception) -> None:
uim.rd().comm = None
uim["comm_status"].update("COMM OFFLINE", text_color="gray")
if uim.active():
uim["comm_status"].update("COMM OFFLINE", text_color="gray")

def on_receive(self, service: Service, msg: bytes) -> None:
print(msg)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setup(
name="leads",
version="0.1.1",
version="0.1.2",
author="ProjectNeura",
author_email="[email protected]",
description="Lightweight Embedded Assisted Driving System",
Expand Down

0 comments on commit 3cb0777

Please sign in to comment.