虚拟架子鼓------Android程序开发
<div class='showpostmsg'><div class="WordSection1"><p class="MsoNormal"><span lang="EN-US">Android</span><span style="font-family: 宋体;">程序使用</span><span lang="EN-US">Android Studio</span><span style="font-family: 宋体;">开发的</span></p><p class="MsoNormal"><span style="font-family: 宋体;">界面显示</span><span lang="EN-US">2</span><span style="font-family: 宋体;">根鼓棒,移动</span><span lang="EN-US">SensorTile</span><span style="font-family: 宋体;">相应的鼓棒会上下左右摆</span></p><p class="MsoNormal"><span style="font-family: 宋体;">检测到鼓棒快速落下鼓棒时,判断落下的角度播放相应鼓声</span></p><p class="MsoNormal"><span style="font-family: 宋体;">之前没接触过</span><span lang="EN-US">Android</span><span style="font-family: 宋体;">的</span><span lang="EN-US">3D</span><span style="font-family: 宋体;">开发</span></p><p class="MsoNormal"><span style="font-family: 宋体;">在网上找了一个“</span><span lang="EN-US">OpenGL ES2.03D</span><span style="font-family: 宋体;">茶壶”的例程</span></p><p class="MsoNormal"><span style="font-family: 宋体;">例程里通过导入</span><span lang="EN-US">3D</span><span style="font-family: 宋体;">茶壶的</span><span lang="EN-US">.obj</span><span style="font-family: 宋体;">文件,并对其进行操作</span></p><p class="MsoNormal"><span style="font-family: 宋体;">我用</span><span lang="EN-US">3DMAX</span><span style="font-family: 宋体;">自己画了一根鼓棒,第一次用</span><span lang="EN-US">3DMax</span><span style="font-family: 宋体;">,用着还挺顺手</span></p><p class="MsoNormal"><span lang="EN-US"><a href="https://bbs.eeworld.com.cn/forum.php?mod=viewthread&tid=523174&highlight=3DMAX">https://bbs.eeworld.com.cn/forum.php?mod=viewthread&tid=523174&highlight=3DMAX</a></span></p><p class="MsoNormal"><span lang="EN-US"> </span></p><p class="MsoNormal"><span style="font-family: 宋体;">画好鼓棒后导出</span><span lang="EN-US">.obj</span><span style="font-family: 宋体;">文件,加入</span><span lang="EN-US">Android</span><span style="font-family: 宋体;">项目里</span></p><p class="MsoNormal"><span style="font-family: 宋体;">打开</span><span lang="EN-US">ch_t.obj</span><span style="font-family: 宋体;">能看到一些像坐标一样的东西</span></p><p class="MsoNormal"></p><p class="MsoNormal"><span lang="EN-US"> </span></p><p class="MsoNormal"><span style="font-family: 宋体;">为了让鼓棒看起来更像样,在百度里找了一张木文图片</span></p><p class="MsoNormal"></p><p class="MsoNormal"><span style="font-family: 宋体;">在</span><span lang="EN-US">Android</span><span style="font-family: 宋体;">里作为鼓棒的皮肤使用</span></p><p class="MsoNormal"><span style="font-family: 宋体;">做好的界面效果如下</span></p><p class="MsoNormal"><span lang="EN-US"> </span></p><p class="MsoNormal"></p><p class="MsoNormal"><span lang="EN-US"> </span></p><p class="MsoNormal"><span lang="EN-US"> </span></p><p class="MsoNormal"><span style="font-family: 宋体;">背景是空白的看起来不是很漂亮,理想的效果是把架子鼓也画上去做成</span><span lang="EN-US">Real Drum</span><span style="font-family: 宋体;">的效果</span></p><p class="MsoNormal"><span style="font-family: 宋体;">落棒时显示敲打的特效,奈何水平有限,研究了很长时间也没做出来</span></p><p class="MsoNormal"></p><p class="MsoNormal"><span lang="EN-US"> </span></p><p class="MsoNormal"><span style="font-family: 宋体;">只好以后有时间再弄</span></p><p class="MsoNormal"><span lang="EN-US"> </span></p><p class="MsoNormal"><span style="font-family: 宋体;">说到</span><span lang="EN-US">Real Drum</span><span style="font-family: 宋体;">,还要说声感谢,</span><span lang="EN-US">Real Drum</span><span style="font-family: 宋体;">并没有对它的</span><span lang="EN-US">APK</span><span style="font-family: 宋体;">文件加密处理</span></p><p class="MsoNormal"><span style="font-family: 宋体;">将</span><span lang="EN-US">apk</span><span style="font-family: 宋体;">改成</span><span lang="EN-US">.zip</span><span style="font-family: 宋体;">文件后就能读到里边的资源文件</span></p><p class="MsoNormal"><span style="font-family: 宋体;">例如图片和</span><span lang="EN-US">.ogg</span><span style="font-family: 宋体;">音频</span></p><p class="MsoNormal"></p><p class="MsoNormal"><span style="font-family: 宋体;">找到对应的文件,把它也加入到</span><span lang="EN-US">Android</span><span style="font-family: 宋体;">项目里</span></p><p class="MsoNormal"></p><p class="MsoNormal"><span lang="EN-US"> </span></p><p class="MsoNormal"><span style="font-family: 宋体;">在</span><span lang="EN-US">MainActivity.java</span><span style="font-family: 宋体;">文件里加入</span><span lang="EN-US">3D</span><span style="font-family: 宋体;">鼓棒和蓝牙接收的代码,再把数据提取、落棒检测、鼓棒控制和声音播放部分实现</span><span lang="EN-US">APP</span><span style="font-family: 宋体;">就基本开发完成</span></p><p class="MsoNormal"><span lang="EN-US"> </span></p><p class="MsoNormal"><span style="font-family: 宋体;">蓝牙开发和其它</span><span lang="EN-US">BLE</span><span style="font-family: 宋体;">设备开发一样,检测手机是否支持</span><span lang="EN-US">BLE</span><span style="font-family: 宋体;">,开启蓝牙</span></p><table class="MsoTableGrid" style="border: currentcolor;" border="1" cellspacing="0" cellpadding="0"><tbody><tr><td width="963" valign="top" style="padding: 0cm 5.4pt; border-width: 1pt; border-color: windowtext; border-image-source: none; width: 722.55pt;"><p align="left" class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><b><span lang="EN-US" style="color: blue; font-family: "Courier New"; font-size: 10pt;">if</span></b><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><b><span lang="EN-US" style="color: navy; font-family: "Courier New"; font-size: 10pt;">(!</span></b><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;">getPackageManager</span><b><span lang="EN-US" style="color: navy; font-family: "Courier New"; font-size: 10pt;">().</span></b><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;">hasSystemFeature</span><b><span lang="EN-US" style="color: navy; font-family: "Courier New"; font-size: 10pt;">(</span></b></p><p align="left" class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;"> PackageManager</span><b><span lang="EN-US" style="color: navy; font-family: "Courier New"; font-size: 10pt;">.</span></b><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;">FEATURE_BLUETOOTH_LE</span><b><span lang="EN-US" style="color: navy; font-family: "Courier New"; font-size: 10pt;">))</span></b><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><b><span lang="EN-US" style="color: navy; font-family: "Courier New"; font-size: 10pt;">{</span></b></p><p align="left" class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;"> finish</span><b><span lang="EN-US" style="color: navy; font-family: "Courier New"; font-size: 10pt;">();</span></b></p><p align="left" class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><b><span lang="EN-US" style="color: navy; font-family: "Courier New"; font-size: 10pt;">}</span></b></p><p align="left" class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><span lang="EN-US" style="color: rgb(128, 0, 255); font-family: "Courier New"; font-size: 10pt;">final</span><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;"> BluetoothManager bluetoothManager </span><b><span lang="EN-US" style="color: navy; font-family: "Courier New"; font-size: 10pt;">=</span></b><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><b><span lang="EN-US" style="color: navy; font-family: "Courier New"; font-size: 10pt;">(</span></b><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;">BluetoothManager</span><b><span lang="EN-US" style="color: navy; font-family: "Courier New"; font-size: 10pt;">)</span></b><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;"> getSystemService</span><b><span lang="EN-US" style="color: navy; font-family: "Courier New"; font-size: 10pt;">(</span></b><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;">Context</span><b><span lang="EN-US" style="color: navy; font-family: "Courier New"; font-size: 10pt;">.</span></b><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;">BLUETOOTH_SERVICE</span><b><span lang="EN-US" style="color: navy; font-family: "Courier New"; font-size: 10pt;">);</span></b></p><p align="left" class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;"> mBluetoothAdapter </span><b><span lang="EN-US" style="color: navy; font-family: "Courier New"; font-size: 10pt;">=</span></b><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;"> bluetoothManager</span><b><span lang="EN-US" style="color: navy; font-family: "Courier New"; font-size: 10pt;">.</span></b><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;">getAdapter</span><b><span lang="EN-US" style="color: navy; font-family: "Courier New"; font-size: 10pt;">();</span></b></p><p align="left" class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><b><span lang="EN-US" style="color: blue; font-family: "Courier New"; font-size: 10pt;">if</span></b><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><b><span lang="EN-US" style="color: navy; font-family: "Courier New"; font-size: 10pt;">(</span></b><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;">mBluetoothAdapter </span><b><span lang="EN-US" style="color: navy; font-family: "Courier New"; font-size: 10pt;">==</span></b><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><b><span lang="EN-US" style="color: blue; font-family: "Courier New"; font-size: 10pt;">null</span></b><b><span lang="EN-US" style="color: navy; font-family: "Courier New"; font-size: 10pt;">)</span></b><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><b><span lang="EN-US" style="color: navy; font-family: "Courier New"; font-size: 10pt;">{</span></b></p><p align="left" class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;"> finish</span><b><span lang="EN-US" style="color: navy; font-family: "Courier New"; font-size: 10pt;">();</span></b></p><p align="left" class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><b><span lang="EN-US" style="color: blue; font-family: "Courier New"; font-size: 10pt;">return</span></b><b><span lang="EN-US" style="color: navy; font-family: "Courier New"; font-size: 10pt;">;</span></b></p><p align="left" class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><b><span lang="EN-US" style="color: navy; font-family: "Courier New"; font-size: 10pt;">}</span></b></p><p align="left" class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;"> mBluetoothAdapter</span><b><span lang="EN-US" style="color: navy; font-family: "Courier New"; font-size: 10pt;">.</span></b><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;">enable</span><b><span lang="EN-US" style="color: navy; font-family: "Courier New"; font-size: 10pt;">();</span></b></p></td></tr></tbody></table><p class="MsoNormal"><span lang="EN-US"> </span></p><p class="MsoNormal"><span style="font-family: 宋体;">在</span><span lang="EN-US">onResume</span><span style="font-family: 宋体;">和</span><span lang="EN-US">onPause</span><span style="font-family: 宋体;">函数里加入启用扫描和关闭扫描的代码</span></p><p class="MsoNormal"><span lang="EN-US"> </span></p><table class="MsoTableGrid" style="border: currentcolor;" border="1" cellspacing="0" cellpadding="0"><tbody><tr><td width="349" valign="top" style="padding: 0cm 5.4pt; border-width: 1pt; border-color: windowtext; border-image-source: none; width: 261.85pt;"><p align="left" class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><span lang="EN-US" style="color: rgb(128, 0, 255); font-family: "Courier New"; font-size: 10pt;">protected</span><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><span lang="EN-US" style="color: rgb(128, 0, 255); font-family: "Courier New"; font-size: 10pt;">void</span><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;"> onResume</span><b><span lang="EN-US" style="color: navy; font-family: "Courier New"; font-size: 10pt;">()</span></b><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><b><span lang="EN-US" style="color: navy; font-family: "Courier New"; font-size: 10pt;">{</span></b></p><p align="left" class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><b><span lang="EN-US" style="color: blue; font-family: "Courier New"; font-size: 10pt;">super</span></b><b><span lang="EN-US" style="color: navy; font-family: "Courier New"; font-size: 10pt;">.</span></b><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;">onResume</span><b><span lang="EN-US" style="color: navy; font-family: "Courier New"; font-size: 10pt;">();</span></b></p><p align="left" class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><b><span lang="EN-US" style="color: blue; font-family: "Courier New"; font-size: 10pt;">if</span></b><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><b><span lang="EN-US" style="color: navy; font-family: "Courier New"; font-size: 10pt;">(</span></b><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;">DEBUG</span><b><span lang="EN-US" style="color: navy; font-family: "Courier New"; font-size: 10pt;">)</span></b><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><b><span lang="EN-US" style="color: navy; font-family: "Courier New"; font-size: 10pt;">{</span></b></p><p align="left" class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><b><span lang="EN-US" style="color: navy; font-family: "Courier New"; font-size: 10pt;">}</span></b><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><b><span lang="EN-US" style="color: blue; font-family: "Courier New"; font-size: 10pt;">else</span></b><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><b><span lang="EN-US" style="color: navy; font-family: "Courier New"; font-size: 10pt;">{</span></b></p><p align="left" class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;"> mGLSurfaceView</span><b><span lang="EN-US" style="color: navy; font-family: "Courier New"; font-size: 10pt;">.</span></b><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;">onResume</span><b><span lang="EN-US" style="color: navy; font-family: "Courier New"; font-size: 10pt;">();</span></b></p><p align="left" class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><b><span lang="EN-US" style="color: navy; font-family: "Courier New"; font-size: 10pt;">}</span></b></p><p align="left" class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;"> scanLeDevice</span><b><span lang="EN-US" style="color: navy; font-family: "Courier New"; font-size: 10pt;">(</span></b><b><span lang="EN-US" style="color: blue; font-family: "Courier New"; font-size: 10pt;">true</span></b><b><span lang="EN-US" style="color: navy; font-family: "Courier New"; font-size: 10pt;">);</span></b></p><p align="left" class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;"> Log</span><b><span lang="EN-US" style="color: navy; font-family: "Courier New"; font-size: 10pt;">.</span></b><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;">i</span><b><span lang="EN-US" style="color: navy; font-family: "Courier New"; font-size: 10pt;">(</span></b><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;">TAG</span><b><span lang="EN-US" style="color: navy; font-family: "Courier New"; font-size: 10pt;">,</span></b><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><span lang="EN-US" style="color: gray; font-family: "Courier New"; font-size: 10pt;">"startLeScan"</span><b><span lang="EN-US" style="color: navy; font-family: "Courier New"; font-size: 10pt;">);</span></b></p><p align="left" class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><b><span lang="EN-US" style="color: navy; font-family: "Courier New"; font-size: 10pt;">}</span></b></p><p align="left" class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span></p><p align="left" class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;"> @Override</span></p><p align="left" class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><span lang="EN-US" style="color: rgb(128, 0, 255); font-family: "Courier New"; font-size: 10pt;">protected</span><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><span lang="EN-US" style="color: rgb(128, 0, 255); font-family: "Courier New"; font-size: 10pt;">void</span><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;"> onPause</span><b><span lang="EN-US" style="color: navy; font-family: "Courier New"; font-size: 10pt;">()</span></b><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><b><span lang="EN-US" style="color: navy; font-family: "Courier New"; font-size: 10pt;">{</span></b></p><p align="left" class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><b><span lang="EN-US" style="color: blue; font-family: "Courier New"; font-size: 10pt;">super</span></b><b><span lang="EN-US" style="color: navy; font-family: "Courier New"; font-size: 10pt;">.</span></b><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;">onPause</span><b><span lang="EN-US" style="color: navy; font-family: "Courier New"; font-size: 10pt;">();</span></b></p><p align="left" class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><b><span lang="EN-US" style="color: blue; font-family: "Courier New"; font-size: 10pt;">if</span></b><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><b><span lang="EN-US" style="color: navy; font-family: "Courier New"; font-size: 10pt;">(</span></b><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;">DEBUG</span><b><span lang="EN-US" style="color: navy; font-family: "Courier New"; font-size: 10pt;">)</span></b><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><b><span lang="EN-US" style="color: navy; font-family: "Courier New"; font-size: 10pt;">{</span></b></p><p align="left" class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><b><span lang="EN-US" style="color: navy; font-family: "Courier New"; font-size: 10pt;">}</span></b><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><b><span lang="EN-US" style="color: blue; font-family: "Courier New"; font-size: 10pt;">else</span></b><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><b><span lang="EN-US" style="color: navy; font-family: "Courier New"; font-size: 10pt;">{</span></b></p><p align="left" class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;"> mGLSurfaceView</span><b><span lang="EN-US" style="color: navy; font-family: "Courier New"; font-size: 10pt;">.</span></b><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;">onPause</span><b><span lang="EN-US" style="color: navy; font-family: "Courier New"; font-size: 10pt;">();</span></b></p><p align="left" class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><b><span lang="EN-US" style="color: navy; font-family: "Courier New"; font-size: 10pt;">}</span></b></p><p align="left" class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;"> scanLeDevice</span><b><span lang="EN-US" style="color: navy; font-family: "Courier New"; font-size: 10pt;">(</span></b><b><span lang="EN-US" style="color: blue; font-family: "Courier New"; font-size: 10pt;">false</span></b><b><span lang="EN-US" style="color: navy; font-family: "Courier New"; font-size: 10pt;">);</span></b></p><p align="left" class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;"> Log</span><b><span lang="EN-US" style="color: navy; font-family: "Courier New"; font-size: 10pt;">.</span></b><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;">i</span><b><span lang="EN-US" style="color: navy; font-family: "Courier New"; font-size: 10pt;">(</span></b><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;">TAG</span><b><span lang="EN-US" style="color: navy; font-family: "Courier New"; font-size: 10pt;">,</span></b><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><span lang="EN-US" style="color: gray; font-family: "Courier New"; font-size: 10pt;">"stopLeScan"</span><b><span lang="EN-US" style="color: navy; font-family: "Courier New"; font-size: 10pt;">);</span></b></p><p align="left" class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><b><span lang="EN-US" style="color: navy; font-family: "Courier New"; font-size: 10pt;">}</span></b></p><p class="MsoNormal"><span lang="EN-US"> </span></p></td></tr></tbody></table><p class="MsoNormal"><span lang="EN-US"> </span></p><p class="MsoNormal"><span style="font-family: 宋体;">在扫描状态设置函数里设置回调函数</span></p><p class="MsoNormal"><span lang="EN-US"> </span></p><table class="MsoTableGrid" style="border: currentcolor;" border="1" cellspacing="0" cellpadding="0"><tbody><tr><td width="568" valign="top" style="padding: 0cm 5.4pt; border-width: 1pt; border-color: windowtext; border-image-source: none; width: 426.1pt;"><p align="left" class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><span lang="EN-US" style="color: rgb(128, 0, 255); font-family: "Courier New"; font-size: 10pt;">private</span><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><span lang="EN-US" style="color: rgb(128, 0, 255); font-family: "Courier New"; font-size: 10pt;">void</span><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;"> scanLeDevice</span><b><span lang="EN-US" style="color: navy; font-family: "Courier New"; font-size: 10pt;">(</span></b><span lang="EN-US" style="color: rgb(128, 0, 255); font-family: "Courier New"; font-size: 10pt;">final</span><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><span lang="EN-US" style="color: rgb(128, 0, 255); font-family: "Courier New"; font-size: 10pt;">boolean</span><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;"> enable</span><b><span lang="EN-US" style="color: navy; font-family: "Courier New"; font-size: 10pt;">)</span></b><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><b><span lang="EN-US" style="color: navy; font-family: "Courier New"; font-size: 10pt;">{</span></b></p><p align="left" class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><b><span lang="EN-US" style="color: blue; font-family: "Courier New"; font-size: 10pt;">if</span></b><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><b><span lang="EN-US" style="color: navy; font-family: "Courier New"; font-size: 10pt;">(</span></b><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;">enable</span><b><span lang="EN-US" style="color: navy; font-family: "Courier New"; font-size: 10pt;">)</span></b><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><b><span lang="EN-US" style="color: navy; font-family: "Courier New"; font-size: 10pt;">{</span></b></p><p align="left" class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;"> mScanning </span><b><span lang="EN-US" style="color: navy; font-family: "Courier New"; font-size: 10pt;">=</span></b><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><b><span lang="EN-US" style="color: blue; font-family: "Courier New"; font-size: 10pt;">true</span></b><b><span lang="EN-US" style="color: navy; font-family: "Courier New"; font-size: 10pt;">;</span></b></p><p align="left" class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;"> mBluetoothAdapter</span><b><span lang="EN-US" style="color: navy; font-family: "Courier New"; font-size: 10pt;">.</span></b><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;">startLeScan</span><b><span lang="EN-US" style="color: navy; font-family: "Courier New"; font-size: 10pt;">(</span></b><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;">leScanCallback</span><b><span lang="EN-US" style="color: navy; font-family: "Courier New"; font-size: 10pt;">);</span></b></p><p align="left" class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><b><span lang="EN-US" style="color: navy; font-family: "Courier New"; font-size: 10pt;">}</span></b><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><b><span lang="EN-US" style="color: blue; font-family: "Courier New"; font-size: 10pt;">else</span></b><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><b><span lang="EN-US" style="color: navy; font-family: "Courier New"; font-size: 10pt;">{</span></b></p><p align="left" class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;"> mScanning </span><b><span lang="EN-US" style="color: navy; font-family: "Courier New"; font-size: 10pt;">=</span></b><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><b><span lang="EN-US" style="color: blue; font-family: "Courier New"; font-size: 10pt;">false</span></b><b><span lang="EN-US" style="color: navy; font-family: "Courier New"; font-size: 10pt;">;</span></b></p><p align="left" class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;"> mBluetoothAdapter</span><b><span lang="EN-US" style="color: navy; font-family: "Courier New"; font-size: 10pt;">.</span></b><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;">stopLeScan</span><b><span lang="EN-US" style="color: navy; font-family: "Courier New"; font-size: 10pt;">(</span></b><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;">leScanCallback</span><b><span lang="EN-US" style="color: navy; font-family: "Courier New"; font-size: 10pt;">);</span></b></p><p align="left" class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><b><span lang="EN-US" style="color: navy; font-family: "Courier New"; font-size: 10pt;">}</span></b></p><p align="left" class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><b><span lang="EN-US" style="color: navy; font-family: "Courier New"; font-size: 10pt;">}</span></b></p></td></tr></tbody></table><p class="MsoNormal"><span lang="EN-US"> </span></p><p class="MsoNormal"><span style="font-family: 宋体;">声明回调函数,实现相应的方法</span></p><table class="MsoTableGrid" style="border: currentcolor;" border="1" cellspacing="0" cellpadding="0"><tbody><tr><td width="916" valign="top" style="padding: 0cm 5.4pt; border-width: 1pt; border-color: windowtext; border-image-source: none; width: 687.1pt;"><p class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc161"><span lang="EN-US" style="font-size: 10pt;">private</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">BluetoothAdapter</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">.</span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">LeScanCallback</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">leScanCallback</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">=</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc51"><span lang="EN-US" style="font-size: 10pt;">new</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">BluetoothAdapter</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">.</span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">LeScanCallback</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">()</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">{</span></span></p><p class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">@Override</span></span></p><p class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc161"><span lang="EN-US" style="font-size: 10pt;">public</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc161"><span lang="EN-US" style="font-size: 10pt;">void</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">onLeScan</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">(</span></span><span class="sc161"><span lang="EN-US" style="font-size: 10pt;">final</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">BluetoothDevice</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">device</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">,</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc161"><span lang="EN-US" style="font-size: 10pt;">int</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">rssi</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">,</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc161"><span lang="EN-US" style="font-size: 10pt;">byte</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">[]</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">scanRecord</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">)</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">{</span></span></p><p class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span class="sc21"><span lang="EN-US" style="font-size: 10pt;">// final float x = 360 - (getShort(scanRecord,2) + 10000) /20000.00f *360;</span></span></p><p class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span class="sc21"><span lang="EN-US" style="font-size: 10pt;">// final float y =360 - (getShort(scanRecord,4) ) / 100.00f;</span></span></p><p class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span class="sc21"><span lang="EN-US" style="font-size: 10pt;">// final float z =360 - (getShort(scanRecord,6) + 10000) /20000.00f * 360;</span></span></p><p class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc21"><span lang="EN-US" style="font-size: 10pt;">//</span></span><span class="sc21"><span style="font-family: 宋体; font-size: 10pt;">读取数据标识,因为没有使用</span></span><span class="sc21"><span lang="EN-US" style="font-size: 10pt;">CRC</span></span><span class="sc21"><span style="font-family: 宋体; font-size: 10pt;">校验,防止受其它蓝牙数据影响</span></span></p><p class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc21"><span lang="EN-US" style="font-size: 10pt;">//</span></span><span class="sc21"><span style="font-family: 宋体; font-size: 10pt;">当</span></span><span class="sc21"><span lang="EN-US" style="font-size: 10pt;">str</span></span><span class="sc21"><span style="font-family: 宋体; font-size: 10pt;">为</span></span><span class="sc21"><span lang="EN-US" style="font-size: 10pt;">“airdrum”</span></span><span class="sc21"><span style="font-family: 宋体; font-size: 10pt;">时认为数据有校</span></span></p><p class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">String</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">s</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">=</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc51"><span lang="EN-US" style="font-size: 10pt;">new</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">String</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">(</span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">Arrays</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">.</span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">copyOfRange</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">(</span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">scanRecord</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">,</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc41"><span lang="EN-US" style="font-size: 10pt;">2</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">+</span></span><span class="sc41"><span lang="EN-US" style="font-size: 10pt;">6</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">+</span></span><span class="sc41"><span lang="EN-US" style="font-size: 10pt;">6</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">,</span></span><span class="sc41"><span lang="EN-US" style="font-size: 10pt;">2</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">+</span></span><span class="sc41"><span lang="EN-US" style="font-size: 10pt;">6</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">+</span></span><span class="sc41"><span lang="EN-US" style="font-size: 10pt;">6</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">+</span></span><span class="sc41"><span lang="EN-US" style="font-size: 10pt;">7</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">));</span></span></p><p class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc51"><span lang="EN-US" style="font-size: 10pt;">if</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">(!</span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">s</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">.</span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">equals</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">(</span></span><span class="sc61"><span lang="EN-US" style="font-size: 10pt;">"airdrum"</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">))</span></span></p><p class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">{</span></span></p><p class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc51"><span lang="EN-US" style="font-size: 10pt;">return</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">;</span></span></p><p class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">}</span></span></p><p class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc21"><span lang="EN-US" style="font-size: 10pt;">//</span></span><span class="sc21"><span style="font-family: 宋体; font-size: 10pt;">获得鼓棒</span></span><span class="sc21"><span lang="EN-US" style="font-size: 10pt;">ID</span></span></p><p class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">Long</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">drumId</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">=</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">getLong</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">(</span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">scanRecord</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">,</span></span><span class="sc41"><span lang="EN-US" style="font-size: 10pt;">2</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">);</span></span></p><p class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc21"><span lang="EN-US" style="font-size: 10pt;">//</span></span><span class="sc21"><span style="font-family: 宋体; font-size: 10pt;">不包含这个</span></span><span class="sc21"><span lang="EN-US" style="font-size: 10pt;">ID</span></span><span class="sc21"><span style="font-family: 宋体; font-size: 10pt;">的大鼓棒就添加它</span></span></p><p class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc51"><span lang="EN-US" style="font-size: 10pt;">if</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">(!</span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">drumIds</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">.</span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">contains</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">((</span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">drumId</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">)))</span></span></p><p class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">{</span></span></p><p class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">drumIds</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">.</span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">add</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">(</span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">drumId</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">);</span></span></p><p class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">}</span></span></p><p class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc161"><span lang="EN-US" style="font-size: 10pt;">final</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc161"><span lang="EN-US" style="font-size: 10pt;">float</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">count</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">=</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">getShort</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">(</span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">scanRecord</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">,</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc41"><span lang="EN-US" style="font-size: 10pt;">6</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">+</span></span><span class="sc41"><span lang="EN-US" style="font-size: 10pt;">2</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">);</span></span></p><p class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc161"><span lang="EN-US" style="font-size: 10pt;">final</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc161"><span lang="EN-US" style="font-size: 10pt;">float</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">r2</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">=</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc41"><span lang="EN-US" style="font-size: 10pt;">180</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">+</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">getShort</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">(</span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">scanRecord</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">,</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc41"><span lang="EN-US" style="font-size: 10pt;">6</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">+</span></span><span class="sc41"><span lang="EN-US" style="font-size: 10pt;">4</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">)</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">/</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc41"><span lang="EN-US" style="font-size: 10pt;">100.00f</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">;</span></span><span class="sc21"><span lang="EN-US" style="font-size: 10pt;">//r2</span></span><span class="sc21"><span style="font-family: 宋体; font-size: 10pt;">的范围是</span></span><span class="sc21"><span lang="EN-US" style="font-size: 10pt;">-180~+180 </span></span><span class="sc21"><span style="font-family: 宋体; font-size: 10pt;">加</span></span><span class="sc21"><span lang="EN-US" style="font-size: 10pt;">180</span></span><span class="sc21"><span style="font-family: 宋体; font-size: 10pt;">后得到</span></span><span class="sc21"><span lang="EN-US" style="font-size: 10pt;">0~360</span></span><span class="sc21"><span style="font-family: 宋体; font-size: 10pt;">数据</span></span></p><p class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc161"><span lang="EN-US" style="font-size: 10pt;">final</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc161"><span lang="EN-US" style="font-size: 10pt;">float</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">r0</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">=</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">getUShort</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">(</span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">scanRecord</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">,</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc41"><span lang="EN-US" style="font-size: 10pt;">6</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">+</span></span><span class="sc41"><span lang="EN-US" style="font-size: 10pt;">6</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">)</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">/</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc41"><span lang="EN-US" style="font-size: 10pt;">100.00f</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">;</span></span><span class="sc21"><span lang="EN-US" style="font-size: 10pt;">//r0</span></span><span class="sc21"><span style="font-family: 宋体; font-size: 10pt;">的范围是</span></span><span class="sc21"><span lang="EN-US" style="font-size: 10pt;">0~360</span></span></p><p class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">System</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">.</span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">out</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">.</span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">println</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">(</span></span><span class="sc61"><span lang="EN-US" style="font-size: 10pt;">"r2:\t"</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">+</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">r2</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">+</span></span><span class="sc61"><span lang="EN-US" style="font-size: 10pt;">"\tr0:\t"</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">+</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">r0</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">+</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc61"><span lang="EN-US" style="font-size: 10pt;">"\tangle:"</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">+</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">getAngle</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">(</span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">r0</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">,</span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">firstR0</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">)+</span></span><span class="sc61"><span lang="EN-US" style="font-size: 10pt;">"\tfirstr0:"</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">+</span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">getAngle</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">(</span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">r0</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">,</span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">firstR0</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">)+</span></span><span class="sc41"><span lang="EN-US" style="font-size: 10pt;">90</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">);</span></span></p><p class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc51"><span lang="EN-US" style="font-size: 10pt;">if</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">(</span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">count</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">></span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">oldCount</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">)</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">{</span></span></p><p class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc21"><span lang="EN-US" style="font-size: 10pt;">//</span></span><span class="sc21"><span style="font-family: 宋体; font-size: 10pt;">第一次落棒</span></span></p><p class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc51"><span lang="EN-US" style="font-size: 10pt;">if</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">(</span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">first</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">)</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">{</span></span></p><p class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">first</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">=</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc51"><span lang="EN-US" style="font-size: 10pt;">false</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">;</span></span></p><p class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc21"><span lang="EN-US" style="font-size: 10pt;">//</span></span><span class="sc21"><span style="font-family: 宋体; font-size: 10pt;">第一次落棒时保存第一次落棒的位置</span></span></p><p class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">firstR2</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">=</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">r2</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">;</span></span></p><p class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">firstR0</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">=</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">r0</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">;</span></span></p><p class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">sp</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">.</span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">play</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">(</span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">start</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">,</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc41"><span lang="EN-US" style="font-size: 10pt;">1.0f</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">,</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc41"><span lang="EN-US" style="font-size: 10pt;">0.3f</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">,</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc41"><span lang="EN-US" style="font-size: 10pt;">0</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">,</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc41"><span lang="EN-US" style="font-size: 10pt;">0</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">,</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc41"><span lang="EN-US" style="font-size: 10pt;">1.0f</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">);</span></span></p><p class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">}</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc51"><span lang="EN-US" style="font-size: 10pt;">else</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">{</span></span></p><p class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc161"><span lang="EN-US" style="font-size: 10pt;">float</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">angleR0</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">=</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">getMinAngle</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">(</span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">r0</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">,</span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">firstR0</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">);</span></span></p><p class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc161"><span lang="EN-US" style="font-size: 10pt;">float</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">angleR2</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">=</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">getMinAngle</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">(</span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">r2</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">,</span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">firstR2</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">);</span></span></p><p class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc21"><span lang="EN-US" style="font-size: 10pt;">//</span></span><span class="sc21"><span style="font-family: 宋体; font-size: 10pt;">右鼓</span></span></p><p class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc51"><span lang="EN-US" style="font-size: 10pt;">if</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">(</span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">angleR0</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">></span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc41"><span lang="EN-US" style="font-size: 10pt;">15</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">)</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">{</span></span></p><p class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc21"><span lang="EN-US" style="font-size: 10pt;">//</span></span><span class="sc21"><span style="font-family: 宋体; font-size: 10pt;">上</span></span></p><p class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc51"><span lang="EN-US" style="font-size: 10pt;">if</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">(</span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">angleR2</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">></span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc41"><span lang="EN-US" style="font-size: 10pt;">25</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">)</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">{</span></span></p><p class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">sp</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">.</span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">play</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">(</span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">closehh</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">,</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc41"><span lang="EN-US" style="font-size: 10pt;">1.0f</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">,</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc41"><span lang="EN-US" style="font-size: 10pt;">0.3f</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">,</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc41"><span lang="EN-US" style="font-size: 10pt;">0</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">,</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc41"><span lang="EN-US" style="font-size: 10pt;">0</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">,</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc41"><span lang="EN-US" style="font-size: 10pt;">1.0f</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">);</span></span></p><p class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">}</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc51"><span lang="EN-US" style="font-size: 10pt;">else</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">{</span></span><span class="sc21"><span lang="EN-US" style="font-size: 10pt;">//</span></span><span class="sc21"><span style="font-family: 宋体; font-size: 10pt;">下</span></span></p><p class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">sp</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">.</span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">play</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">(</span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">snare</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">,</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc41"><span lang="EN-US" style="font-size: 10pt;">1.0f</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">,</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc41"><span lang="EN-US" style="font-size: 10pt;">0.3f</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">,</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc41"><span lang="EN-US" style="font-size: 10pt;">0</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">,</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc41"><span lang="EN-US" style="font-size: 10pt;">0</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">,</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc41"><span lang="EN-US" style="font-size: 10pt;">1.0f</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">);</span></span></p><p class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">}</span></span></p><p class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">}</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc51"><span lang="EN-US" style="font-size: 10pt;">else</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc51"><span lang="EN-US" style="font-size: 10pt;">if</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">(</span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">angleR0</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;"><</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">-</span></span><span class="sc41"><span lang="EN-US" style="font-size: 10pt;">15</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">)</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">{</span></span><span class="sc21"><span lang="EN-US" style="font-size: 10pt;">//</span></span><span class="sc21"><span style="font-family: 宋体; font-size: 10pt;">左鼓</span></span></p><p class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc21"><span lang="EN-US" style="font-size: 10pt;">//</span></span><span class="sc21"><span style="font-family: 宋体; font-size: 10pt;">上</span></span></p><p class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc51"><span lang="EN-US" style="font-size: 10pt;">if</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">(</span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">angleR2</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">></span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc41"><span lang="EN-US" style="font-size: 10pt;">25</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">)</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">{</span></span></p><p class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">sp</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">.</span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">play</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">(</span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">closehh</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">,</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc41"><span lang="EN-US" style="font-size: 10pt;">1.0f</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">,</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc41"><span lang="EN-US" style="font-size: 10pt;">0.3f</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">,</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc41"><span lang="EN-US" style="font-size: 10pt;">0</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">,</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc41"><span lang="EN-US" style="font-size: 10pt;">0</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">,</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc41"><span lang="EN-US" style="font-size: 10pt;">1.0f</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">);</span></span></p><p class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">}</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc51"><span lang="EN-US" style="font-size: 10pt;">else</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">{</span></span><span class="sc21"><span lang="EN-US" style="font-size: 10pt;">//</span></span><span class="sc21"><span style="font-family: 宋体; font-size: 10pt;">下</span></span></p><p class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">sp</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">.</span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">play</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">(</span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">snare</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">,</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc41"><span lang="EN-US" style="font-size: 10pt;">1.0f</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">,</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc41"><span lang="EN-US" style="font-size: 10pt;">0.3f</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">,</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc41"><span lang="EN-US" style="font-size: 10pt;">0</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">,</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc41"><span lang="EN-US" style="font-size: 10pt;">0</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">,</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc41"><span lang="EN-US" style="font-size: 10pt;">1.0f</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">);</span></span></p><p class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">}</span></span></p><p class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">}</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc51"><span lang="EN-US" style="font-size: 10pt;">else</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">{</span></span><span class="sc21"><span lang="EN-US" style="font-size: 10pt;">//</span></span><span class="sc21"><span style="font-family: 宋体; font-size: 10pt;">中鼓</span></span></p><p class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc21"><span lang="EN-US" style="font-size: 10pt;">//</span></span><span class="sc21"><span style="font-family: 宋体; font-size: 10pt;">上</span></span></p><p class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc51"><span lang="EN-US" style="font-size: 10pt;">if</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">(</span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">angleR2</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">></span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc41"><span lang="EN-US" style="font-size: 10pt;">25</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">)</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">{</span></span></p><p class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">sp</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">.</span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">play</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">(</span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">openhh</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">,</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc41"><span lang="EN-US" style="font-size: 10pt;">1.0f</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">,</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc41"><span lang="EN-US" style="font-size: 10pt;">0.3f</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">,</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc41"><span lang="EN-US" style="font-size: 10pt;">0</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">,</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc41"><span lang="EN-US" style="font-size: 10pt;">0</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">,</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc41"><span lang="EN-US" style="font-size: 10pt;">1.0f</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">);</span></span></p><p class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">}</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc51"><span lang="EN-US" style="font-size: 10pt;">else</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">{</span></span><span class="sc21"><span lang="EN-US" style="font-size: 10pt;">//</span></span><span class="sc21"><span style="font-family: 宋体; font-size: 10pt;">下</span></span></p><p class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">sp</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">.</span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">play</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">(</span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">kick</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">,</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc41"><span lang="EN-US" style="font-size: 10pt;">1.0f</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">,</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc41"><span lang="EN-US" style="font-size: 10pt;">0.3f</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">,</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc41"><span lang="EN-US" style="font-size: 10pt;">0</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">,</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc41"><span lang="EN-US" style="font-size: 10pt;">0</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">,</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc41"><span lang="EN-US" style="font-size: 10pt;">1.0f</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">);</span></span></p><p class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">}</span></span></p><p class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">}</span></span></p><p class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">}</span></span></p><p class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">}</span></span></p><p class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">oldCount</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">=</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">count</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">;</span></span></p><p class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc161"><span lang="EN-US" style="font-size: 10pt;">final</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc161"><span lang="EN-US" style="font-size: 10pt;">float</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">angleZ</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">=</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">getAngle</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">(</span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">r0</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">,</span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">firstR0</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">)+</span></span><span class="sc41"><span lang="EN-US" style="font-size: 10pt;">90</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">;;</span></span></p><p class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc161"><span lang="EN-US" style="font-size: 10pt;">float</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">z</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">=</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">angleZ</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">></span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc41"><span lang="EN-US" style="font-size: 10pt;">360</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">?</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">angleZ</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">-</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc41"><span lang="EN-US" style="font-size: 10pt;">360</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">:</span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">angleZ</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">;</span></span></p><p class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc161"><span lang="EN-US" style="font-size: 10pt;">final</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc161"><span lang="EN-US" style="font-size: 10pt;">float</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">angleY</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">=</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">z</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">></span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc41"><span lang="EN-US" style="font-size: 10pt;">180</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">?</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">r2</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">:-</span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">r2</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">;</span></span></p><p class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc51"><span lang="EN-US" style="font-size: 10pt;">if</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">(</span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">Looper</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">.</span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">myLooper</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">()</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">==</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">Looper</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">.</span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">getMainLooper</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">())</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">{</span></span></p><p class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc51"><span lang="EN-US" style="font-size: 10pt;">if</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">(</span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">DEBUG</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">)</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">{</span></span></p><p class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc161"><span lang="EN-US" style="font-size: 10pt;">final</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">String</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">str</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">=</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">String</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">.</span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">format</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">(</span></span><span class="sc61"><span lang="EN-US" style="font-size: 10pt;">"%.2f %.2f %.2f"</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">,</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">count</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">,</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">r2</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">,</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">r0</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">);</span></span></p><p class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">textView1</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">.</span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">setText</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">(</span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">str</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">);</span></span></p><p class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">}</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc51"><span lang="EN-US" style="font-size: 10pt;">else</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">{</span></span></p><p class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">mGLSurfaceView</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">.</span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">setXYZ</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">(</span></span><span class="sc41"><span lang="EN-US" style="font-size: 10pt;">0</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">,</span></span><span class="sc41"><span lang="EN-US" style="font-size: 10pt;">0</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">,</span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">angleY</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">,</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">angleZ</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">);</span></span></p><p class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">}</span></span></p><p class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">}</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc51"><span lang="EN-US" style="font-size: 10pt;">else</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">{</span></span></p><p class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">runOnUiThread</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">(</span></span><span class="sc51"><span lang="EN-US" style="font-size: 10pt;">new</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">Runnable</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">()</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">{</span></span></p><p class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">@Override</span></span></p><p class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc161"><span lang="EN-US" style="font-size: 10pt;">public</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc161"><span lang="EN-US" style="font-size: 10pt;">void</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">run</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">()</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">{</span></span></p><p class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc51"><span lang="EN-US" style="font-size: 10pt;">if</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">(</span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">DEBUG</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">)</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">{</span></span></p><p class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc161"><span lang="EN-US" style="font-size: 10pt;">final</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">String</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">str</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">=</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">String</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">.</span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">format</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">(</span></span><span class="sc61"><span lang="EN-US" style="font-size: 10pt;">"%.2f %.2f %.2f"</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">,</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">count</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">,</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">r2</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">,</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">r0</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">);</span></span></p><p class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">textView1</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">.</span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">setText</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">(</span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">str</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">);</span></span></p><p class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">}</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc51"><span lang="EN-US" style="font-size: 10pt;">else</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">{</span></span></p><p class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">mGLSurfaceView</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">.</span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">setXYZ</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">(</span></span><span class="sc41"><span lang="EN-US" style="font-size: 10pt;">0</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">,</span></span><span class="sc41"><span lang="EN-US" style="font-size: 10pt;">0</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">,</span></span><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">angleY</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">,</span></span><span class="sc11"><span lang="EN-US" style="font-size: 10pt;">angleZ</span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">);</span></span></p><p class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">}</span></span></p><p class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">}</span></span></p><p class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">});</span></span></p><p class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">}</span></span></p><p class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">}</span></span></p><p align="left" class="MsoNormal" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span class="sc0"><span lang="EN-US" style="font-size: 10pt;"> </span></span><span class="sc101"><span lang="EN-US" style="font-size: 10pt;">};</span></span></p><p class="MsoNormal"><span lang="EN-US"> </span></p></td></tr></tbody></table><p class="MsoNormal"><span lang="EN-US"> </span></p><p class="MsoNormal"><span style="font-family: 宋体;">现在单鼓棒功能已经实现,完整的代码已经放在</span><span lang="EN-US">github</span><span style="font-family: 宋体;">上</span></p><p class="MsoNormal"><span lang="EN-US"><a href="https://github.com/int8cn/AirDrum">https://github.com/int8cn/AirDrum</a></span></p><p class="MsoNormal"><span lang="EN-US"> </span></p><p class="MsoNormal"><span lang="EN-US"> </span></p><p class="MsoNormal"><span lang="EN-US"> </span></p><p class="MsoNormal"><span lang="EN-US"> </span></p></div><p></p></div><script> var loginstr = '<div class="locked">查看本帖全部内容,请<a href="javascript:;" style="color:#e60000" class="loginf">登录</a>或者<a href="https://bbs.eeworld.com.cn/member.php?mod=register_eeworld.php&action=wechat" style="color:#e60000" target="_blank">注册</a></div>';if(parseInt(discuz_uid)==0){
(function($){
var postHeight = getTextHeight(400);
$(".showpostmsg").html($(".showpostmsg").html());
$(".showpostmsg").after(loginstr);
$(".showpostmsg").css({height:postHeight,overflow:"hidden"});
})(jQuery);
} </script><script type="text/javascript">(function(d,c){var a=d.createElement("script"),m=d.getElementsByTagName("script"),eewurl="//counter.eeworld.com.cn/pv/count/";a.src=eewurl+c;m.parentNode.insertBefore(a,m)})(document,523)</script> 牛人真多啊:victory::victory::victory::victory::victory::victory::victory::victory::victory:学习一下下了哦, 虾哥,你的sensor是固定在鼓棒的什么位置?
如果花式空抛 (鼓槌离手,空中翻腾)的话,鼓会有声音么? alberthink 发表于 2017-4-28 16:32
虾哥,你的sensor是固定在鼓棒的什么位置?
如果花式空抛 (鼓槌离手,空中翻腾)的话,鼓会有声音么?
正准备焊接SensorTile小板,焊好后想放在离手近一些的位置
你说的离手不敢试,摔坏了就不能演示了,按照我写的落棒检测代码应该不会有声音 虾哥,由于你的鼓槌是基于广播来传递数据,所以程序扫描LE设备并筛选的部分应避免将过多不必要的数据记录到log中(严重时可能会导致程序崩溃),如果我理解的没错,你的代码里面是把所有的扫描都存log,然后再作名称的比较的。这个风险有些大,特别是随着周围LE广播设备越来越多的场景。
收一条判断一条 没有记录log啊
手机的配置处理一条广播的时间应该非常短
尤其哪些不符合规则的数据判断几个字节不对就直接返回了
影响应该不大 :Cry:看不懂,一个头两个大! 我电脑装了android studio编译时卡的很 非常棒! strong161 发表于 2017-4-28 19:35
看不懂,一个头两个大!
你说的应该是“Log.i()"吧?这个是调试用的,相当于system.out.print.... suoma 发表于 2017-4-28 19:45
我电脑装了android studio编译时卡的很
我的也是,这个软件非常占内存,打开后硬盘一直在读写,你要是再开一个虚拟机………… littleshrimp 发表于 2017-4-28 20:34
你说的应该是“Log.i()"吧?这个是调试用的,相当于system.out.print....
{:1_133:} 哈哈,APP搞不来,所以基本上看不下去,所以也就看不懂了! 厉害{:1_103:},看了下代码,也实际运行了一下,看你蓝牙部分还么有写全,蓝牙是准备移植ST的SDK还是自己写呢?
蓝牙已经写完了 直接接收广播 不连接 littleshrimp 发表于 2017-4-29 13:57
蓝牙已经写完了 直接接收广播 不连接
恩,这个厉害,那SensorTile端的代码也改了吗?
Sensortile端使用BEACON方式直接将数据更新到广播包里 <p>牛人真多啊!!!学习学习</p>
<p> </p>
页:
[1]