博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Daydream Controller手柄数据的解析
阅读量:6493 次
发布时间:2019-06-24

本文共 3879 字,大约阅读时间需要 12 分钟。

参考:

反编译代码:

private static UUID A = UUID.fromString("0000180f-0000-1000-8000-00805f9b34fb");  static final String a = bbr.class.getSimpleName();  public static final UUID d = UUID.fromString("00002902-0000-1000-8000-00805f9b34fb");  public static final UUID e = UUID.fromString("0000180a-0000-1000-8000-00805f9b34fb");  public static final UUID f = UUID.fromString("00002a29-0000-1000-8000-00805f9b34fb");  public static final UUID g = UUID.fromString("00002a24-0000-1000-8000-00805f9b34fb");  public static final UUID h = UUID.fromString("00002a25-0000-1000-8000-00805f9b34fb");  public static final UUID i = UUID.fromString("00002a26-0000-1000-8000-00805f9b34fb");  public static final UUID j = UUID.fromString("00002a28-0000-1000-8000-00805f9b34fb");  public static final UUID k = UUID.fromString("00002a27-0000-1000-8000-00805f9b34fb");  public static final UUID l = UUID.fromString("00002a19-0000-1000-8000-00805f9b34fb");  public static final UUID m = UUID.fromString("0000fef5-0000-1000-8000-00805f9b34fb");  public static final UUID n = UUID.fromString("0000fe55-0000-1000-8000-00805f9b34fb");  private final VrCoreApplication B;  private BluetoothDevice C;  static final String A = bcj.class.getSimpleName();  private static UUID C = UUID.fromString("00000001-1000-1000-8000-00805f9b34fb");  private static UUID D = UUID.fromString("00000002-1000-1000-8000-00805f9b34fb");   if (C.equals(paramBluetoothGattCharacteristic.getUuid()))      {        localObject4 = paramBluetoothGattCharacteristic.getValue();        paramBluetoothGattCharacteristic = this.P;        if (localObject4 != null) {}        try        {          Object localObject1 = this.O;          if (localObject4.length < 19)          {            localObject1 = bbq.a;            i = localObject4.length;            localObject4 = new java/lang/StringBuilder;            ((StringBuilder)localObject4).
(46); Log.e((String)localObject1, "Invalid number of bytes to decode: " + i); i = 0; if (i != 0) { break label781; } } } finally {} } } ((bbq)localObject2).b = ((byte[])localObject4); ((bbq)localObject2).c = 0; ((bbq)localObject2).d = ((bbq)localObject2).a(9, false); ((bbq)localObject2).a(5, false); int i5 = ((bbq)localObject2).a(13, true); int i = ((bbq)localObject2).a(13, true); int i7 = ((bbq)localObject2).a(13, true); int i4 = ((bbq)localObject2).a(13, true); int i1 = ((bbq)localObject2).a(13, true); int n = ((bbq)localObject2).a(13, true); int j = ((bbq)localObject2).a(13, true); int m = ((bbq)localObject2).a(13, true); int i2 = ((bbq)localObject2).a(13, true); int k = ((bbq)localObject2).a(8, false); int i3 = ((bbq)localObject2).a(8, false); int i6 = ((bbq)localObject2).a(5, false); ((bbq)localObject2).s[0] = bbq.a(i5); ((bbq)localObject2).s[1] = bbq.a(i); ((bbq)localObject2).s[2] = bbq.a(i7); float[] arrayOfFloat = ((bbq)localObject2).s; Object localObject4 = ((bbq)localObject2).t; float f2 = arrayOfFloat[0]; float f3 = arrayOfFloat[1]; float f1 = arrayOfFloat[2]; float f4 = f2 * f2 + f3 * f3 + f1 * f1;

数据帧定义:

Daydream Controller数据帧格式,按照bit位定义如下,bit000~bit008:时间戳(0~511)bit009~bit013:包号(0~31)bit014~bit026:地磁 X      bit027~bit039:地磁 Y     bit040~bit052:地磁 Zbit053~bit065:ACC X      bit066~bit078:ACC Y     bit079~bit091:ACC Zbit092~bit104:Gyro X     bit105~bit117:Gyro Y    bit118~bit130:Gyro Zbit131~bit138:Touch X    bit139~bit146:Touch Ybit147:Clickbit148:Homebit149:Appbit150:Volume -bit151:Volume +

原始数据:

   

解析结果:

      

Connection Interval:

                  

硬件及软件信息:

MCU:Dialog DA14681Touch: IQS525Battery: Coslight CA491539P(218-mAh)LMP Version: Bluetooth Core Specification 4.1Service: 0000fe55-0000-1000-8000-00805f9b34fbCharacteristic:00000001-1000-1000-8000-00805f9b34fbCharacteristic property:Notification

相关资源:

转载地址:http://mqkyo.baihongyu.com/

你可能感兴趣的文章
lnmp
查看>>
我的友情链接
查看>>
老程序员激情澎湃1000KM,祖国大地风光无限美好
查看>>
bash基础特性及基础命令
查看>>
黑马程序员之<hashset,treeset>
查看>>
网络连接相关类
查看>>
不上进的自己
查看>>
bash中花括号展开示例
查看>>
我的友情链接
查看>>
我们应具有的为人处事态度
查看>>
安卓机器人中的即时通讯
查看>>
机器学习-GBDT算法总结与源码分析
查看>>
后台开发应该读的书
查看>>
单点登录sso原理
查看>>
给一个不多于5位的整数,判断位数并逆序输出
查看>>
Linux命令行 (一)
查看>>
Java提取字符串中的手机号
查看>>
Linux基础命令---间歇执行程序watch
查看>>
cisco路由器常用命令
查看>>
数据库查询构建控件集Active Query Builder
查看>>