refactor app registration with whisplay daemon
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import subprocess
|
||||
import time
|
||||
import threading
|
||||
import os
|
||||
import runtime.whisplay_client
|
||||
|
||||
|
||||
@@ -56,12 +57,14 @@ class WhisplayInterface:
|
||||
|
||||
# -- Attachment --
|
||||
|
||||
def create_board(self,
|
||||
app_id,
|
||||
display_name,
|
||||
icon,
|
||||
use_daemon_default_log=True):
|
||||
self.board = runtime.whisplay_client.create_whisplay_hardware(app_id=app_id, display_name=display_name, icon=icon, use_daemon_default_log=use_daemon_default_log)
|
||||
def create_board(self):
|
||||
self.board = runtime.whisplay_client.create_whisplay_hardware(
|
||||
app_id=os.getenv("WHISPLAY_APP_ID", "whisplay-lxst-client"),
|
||||
display_name="LXST Client",
|
||||
icon="L",
|
||||
exit_gesture="quad_press",
|
||||
use_daemon_default_log=False,
|
||||
)
|
||||
self.board.on_button_press(self._on_button_press)
|
||||
self.board.on_button_release(self._on_button_release)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user