diff --git a/Assets/Scripts/Bluetooth/BLECommunicationManager.cs b/Assets/Scripts/Bluetooth/BLECommunicationManager.cs index c90539b..2fd276e 100644 --- a/Assets/Scripts/Bluetooth/BLECommunicationManager.cs +++ b/Assets/Scripts/Bluetooth/BLECommunicationManager.cs @@ -2420,7 +2420,7 @@ namespace Kill.Bluetooth // 优先处理设备主动通知,避免被等待响应的流程拦截 if (frame.ReadWrite == BLEConstants.RW_NOTIFY) { - HandleNotification(frame.Command, frame.Data); + HandleNotification(frame.Data); } else if (IsWaitingResponse && frame.Command == LastCommand) { @@ -2453,8 +2453,9 @@ namespace Kill.Bluetooth /// /// 通用的设备通知分发器,按命令类型路由到对应处理逻辑 /// - private void HandleNotification(byte command, byte[] data) + private void HandleNotification(byte[] data) { + byte command=data[0]; switch (command) { case BLEConstants.NOTIFY_MOSQUITO_DATA: