From 16f82d6ab89560785578ceb88d10497157ab70c5 Mon Sep 17 00:00:00 2001 From: stswangzhiping <59632378+stswangzhiping@users.noreply.github.com> Date: Thu, 19 Mar 2026 09:24:10 +0800 Subject: [PATCH] feat(ws): handle activated message from server, switch to APPS+time Made-with: Cursor --- lib/client.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/client.js b/lib/client.js index 1fe1e64..86ada82 100644 --- a/lib/client.js +++ b/lib/client.js @@ -210,6 +210,9 @@ class ClawClient { break; case 'heartbeat_ack': break; + case 'activated': + this._onActivated(); + break; case 'error': log.error('clawd', `服务器错误: ${msg.msg}`); if (msg.msg === 'hardware_mismatch') { @@ -268,6 +271,12 @@ class ClawClient { this._startHeartbeat(); } + _onActivated() { + log.info('clawd', '收到激活通知,切换至已激活状态'); + led.status.setApps(); + led.display.showTime(); + } + // ── 心跳 ──────────────────────────────────────────────────────────────────── _startHeartbeat() {