泰凌微过滤异常数据
authorliangzhenying <867174124@qq.com>
Fri, 23 Aug 2024 03:06:13 +0000 (11:06 +0800)
committerliangzhenying <867174124@qq.com>
Fri, 23 Aug 2024 03:06:13 +0000 (11:06 +0800)
MouseSdk/AiMouseSdk/TlwMouseSdk/TlwMouseSdk.m
MouseSdk/MouseSdk.xcworkspace/xcuserdata/apple.xcuserdatad/UserInterfaceState.xcuserstate
MouseSdk/MouseSdk/ViewController.m

index 3785506..4713161 100644 (file)
 #pragma mark - hid
 - (void)hidReceiveDeviceData:(NSData *)data{
 //    0x05fff1fec09f0114ef
+    if(data.length < 7){
+        [self showLog:@"收到异常数据"];
+        return;
+    }
     uint8 type;
     [[data subdataWithRange:NSMakeRange(5, 1)] getBytes:&type length:1];
     
index cb8563d..c3bec2a 100644 (file)
Binary files a/MouseSdk/MouseSdk.xcworkspace/xcuserdata/apple.xcuserdatad/UserInterfaceState.xcuserstate and b/MouseSdk/MouseSdk.xcworkspace/xcuserdata/apple.xcuserdatad/UserInterfaceState.xcuserstate differ
index 9eca1b8..3a0fec8 100644 (file)
@@ -57,8 +57,8 @@
     [self presentViewControllerAsModalWindow:vc];
 }
 - (void)tlwAction{
-//    [TlwHidManager shared];
-//    return;
+    [TlwHidManager shared];
+    return;
     TlwVC *vc = [[TlwVC alloc] initWithNibName:nil bundle:nil];
     [self presentViewControllerAsModalWindow:vc];