diff --git a/takway/clients/web_socket_client_utils.py b/takway/clients/web_socket_client_utils.py index 6033cad..39a90d1 100644 --- a/takway/clients/web_socket_client_utils.py +++ b/takway/clients/web_socket_client_utils.py @@ -27,6 +27,15 @@ from takway.clients.client_utils import BaseWebSocketClient from takway.audio_utils import AudioPlayer +def start_status_light(hardware, board): + if board == 'orangepi': + for i in range(2): + hardware.set_led_on("green") + time.sleep(0.5) + hardware.set_led_off("green") + time.sleep(0.5) + + class WebSocketClinet: def __init__(self, board, @@ -141,8 +150,8 @@ class WebSocketClinet: last_short_power_status = False board = self.board - if board == 'orangepi': - recorder.hardware.set_led_on("green") + + start_status_light(recorder.hardware, board) while True: # 开关按键被按下 if recorder.hardware.long_power_status: