-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathturpowarp-plugin.js
1 lines (1 loc) · 20.4 KB
/
turpowarp-plugin.js
1
function a0_0x281a(){const _0x41de56=['Got\x20server','获取当前\x20[type]','角度\x20[mode]','elemodule.step_control','step_control','0x02','_busy','startNotifications','length','eleA','模式错误','query','getdata','QUERY_TYPE','0000ff31-0000-1000-8000-00805f9b34fb','断开链接','_device','强度错误','是否已链接','892536iKjkVF','CMD_STEP','isConnected','Got\x20characteristics','Disconnected\x20from\x20device','ArgumentType','then','TDDATA_TYPE','elemodule.getdata_dig','ele_off','获取角度\x20[type]','unsandboxed','buffer','state','停止电击\x20[td]','12SSrFTT','_onMessage','repeat','0x01','CMD_ELE','频率1','elemodule.ele_custom','disconnect','updated','计步\x20[mode]','open','webble','ele_mode','0x04','elemodule.dig_control','motor','BOOLEAN','REPORTER','169934CGhAUc','210RylxwE','match','onDataChanged','B通道','clearTimeout','any','padStart','CMD_MOTOR','elemodule.disconnect','bind','_ble','EXTENSION_ID','elemodule.motor_control','0000ff30-0000-1000-8000-00805f9b34fb','target','---','A_state','map','motor_control','catch','reset','0x12','MOTOR_TYPE','register','EVENT','elemodule.getdata_td','OC_DATA_TYPE','NUMBER','ele_stop','wid','setTimeout','0x13','电击\x20[td]\x20模式[mode]\x20强度[strength]','A通道','error','27740FTXnti','CMD_QUERY','60DtYmOt','0x00','event','connected','_use','log','slice','是否连通','Failed\x20to\x20write\x20value\x20to\x20wid','92200oIsTgl','elemodule.ele','toString','TD_TYPE','Started\x20notifications\x20on\x20nid','connect','data','任意电击通道','_onDataChanged','getdata_td','2131696dcxJGN','getInfo','eleB','elemodule.connect','EXTENSION_NAME','DIG_CONTROL_TYPE','B_state','extensions','requestDevice','type','nid','getCharacteristic','DIG_TYPE','ele_custom','elemodule.query','mode','70dCymPA','writeValueWithoutResponse','runtime','bluetooth','频率错误','dig','STRING','3ssOAnv','elemodule.ele_stop','gatt','elemodule','CMD_DIG','役次元电击','ele','This\x20extension\x20must\x20run\x20unsandboxed','_peripheral','马达\x20[mode]','1350459scpHXd','Got\x20device:','dig_control','_timeoutID','0x11','step','startHats','uuid','0x03','时间错误','COMMAND','GETDATA_TYPE','95994tRsnhl','id:','getdata_dig','_busyTimeoutID','elemodule.isConnected','scratch','service','获取\x20[td]\x20[type]','call','send','join','elemodule.onDataChanged','频率3'];a0_0x281a=function(){return _0x41de56;};return a0_0x281a();}function a0_0x1fbe(_0x5e1fa8,_0x3082bb){const _0x281add=a0_0x281a();return a0_0x1fbe=function(_0x1fbe7a,_0x841560){_0x1fbe7a=_0x1fbe7a-0x190;let _0x2c4657=_0x281add[_0x1fbe7a];return _0x2c4657;},a0_0x1fbe(_0x5e1fa8,_0x3082bb);}(function(_0x38ab20,_0x17fdd1){const _0x1d7493=a0_0x1fbe,_0x57abb5=_0x38ab20();while(!![]){try{const _0x80bdc8=-parseInt(_0x1d7493(0x22e))/0x1*(-parseInt(_0x1d7493(0x1de))/0x2)+parseInt(_0x1d7493(0x1bd))/0x3+-parseInt(_0x1d7493(0x217))/0x4+-parseInt(_0x1d7493(0x202))/0x5*(-parseInt(_0x1d7493(0x1df))/0x6)+parseInt(_0x1d7493(0x227))/0x7*(-parseInt(_0x1d7493(0x20d))/0x8)+parseInt(_0x1d7493(0x19d))/0x9*(parseInt(_0x1d7493(0x204))/0xa)+-parseInt(_0x1d7493(0x191))/0xb*(-parseInt(_0x1d7493(0x1cc))/0xc);if(_0x80bdc8===_0x17fdd1)break;else _0x57abb5['push'](_0x57abb5['shift']());}catch(_0x917d30){_0x57abb5['push'](_0x57abb5['shift']());}}}(a0_0x281a,0x45a00),function(_0x1c634f){const _0x323375=a0_0x1fbe;if(!_0x1c634f['extensions'][_0x323375(0x1c8)])throw new Error(_0x323375(0x235));const _0xe75327=_0x1c634f[_0x323375(0x1c2)],_0x1f83ec=_0x1c634f['BlockType'],_0x968db6=function(_0xab4004){return _0xab4004['default'];},_0x5afb34={'service':0xff30,'wid':_0x323375(0x1b8),'nid':'0000ff32-0000-1000-8000-00805f9b34fb','uuid':_0x323375(0x1ec)};let _0x3e4dd5={'CMD_ELE':0x11,'CMD_MOTOR':0x12,'CMD_STEP':0x13,'CMD_DIG':0x14,'CMD_QUERY':0x71};class _0x45f85f{constructor(_0x468fca){const _0x17b472=_0x323375;this[_0x17b472(0x1e9)]=null,this[_0x17b472(0x1ba)]=null,this[_0x17b472(0x1cd)]=_0x468fca,console['log']('on_message',_0x468fca),this[_0x17b472(0x194)]=null,this['_busy']=![],this[_0x17b472(0x1a0)]=null,this[_0x17b472(0x1f3)]=this[_0x17b472(0x1f3)]['bind'](this),this[_0x17b472(0x1d4)]=0x0;}async[_0x323375(0x212)](){const _0x432610=_0x323375;try{if(this[_0x432610(0x1bf)]())await this[_0x432610(0x1d3)]();this[_0x432610(0x1ba)]=await navigator[_0x432610(0x22a)][_0x432610(0x21f)]({'filters':[{'services':[_0x5afb34[_0x432610(0x1a3)]]}],'optionalServices':[_0x5afb34[_0x432610(0x221)],_0x5afb34[_0x432610(0x1fc)],_0x5afb34[_0x432610(0x198)]]}),console[_0x432610(0x209)](_0x432610(0x192),this[_0x432610(0x1ba)]),console[_0x432610(0x209)](_0x432610(0x19e),this[_0x432610(0x1ba)]['id']);const _0x4bb86a=await this['_device'][_0x432610(0x230)][_0x432610(0x212)](),_0x31279f=await _0x4bb86a['getPrimaryService'](_0x432610(0x1ec));console[_0x432610(0x209)](_0x432610(0x1aa),_0x31279f);const _0xbe0bd0=await _0x31279f[_0x432610(0x222)](_0x5afb34['wid']),_0x10496e=await _0x31279f[_0x432610(0x222)](_0x5afb34[_0x432610(0x221)]);this[_0x432610(0x1e9)]={'wid':_0xbe0bd0,'nid':_0x10496e},console[_0x432610(0x209)](_0x432610(0x1c0),this[_0x432610(0x1e9)]),await this[_0x432610(0x1e9)][_0x432610(0x221)][_0x432610(0x1b1)](),console['log'](_0x432610(0x211)),this[_0x432610(0x1e9)]['nid']['addEventListener']('characteristicvaluechanged',function(_0x482f11){const _0x341233=_0x432610;console[_0x341233(0x209)](_0x341233(0x206),_0x482f11);const _0x335cc9=new Uint8Array(_0x482f11[_0x341233(0x1ed)]['value'][_0x341233(0x1c9)]);console['log'](_0x341233(0x213),_0x335cc9),this[_0x341233(0x1cd)](_0x335cc9);}[_0x432610(0x1e8)](this));}catch(_0x491821){console[_0x432610(0x209)](_0x491821);}}['isConnected'](){const _0x126119=_0x323375;let _0x317d34=![];return this[_0x126119(0x1ba)]&&(_0x317d34=this[_0x126119(0x1ba)][_0x126119(0x230)][_0x126119(0x207)]),_0x317d34;}async[_0x323375(0x1d3)](){const _0xb92297=_0x323375;this['_device']&&(await this[_0xb92297(0x1ba)][_0xb92297(0x230)]['disconnect'](),console[_0xb92297(0x209)](_0xb92297(0x1c1)),this['_device']=null),this[_0xb92297(0x1e9)]&&(this['_ble']=null),this[_0xb92297(0x1f3)]();}[_0x323375(0x1f3)](){const _0x16ec4e=_0x323375;this['_timeoutID']&&(window[_0x16ec4e(0x1e3)](this[_0x16ec4e(0x194)]),this[_0x16ec4e(0x194)]=null),this[_0x16ec4e(0x1a0)]&&(window[_0x16ec4e(0x1e3)](this[_0x16ec4e(0x1a0)]),this[_0x16ec4e(0x1a0)]=null),this['_busy']=![];}async[_0x323375(0x1a6)](_0x98a659,_0x1d1b33){const _0x4cc9c4=_0x323375;console[_0x4cc9c4(0x209)](_0x4cc9c4(0x1a6),_0x98a659,_0x1d1b33);while(this[_0x4cc9c4(0x1b0)]){await new Promise(_0x114bb0=>setTimeout(_0x114bb0,0x14));}if(!this[_0x4cc9c4(0x1bf)]())return;this[_0x4cc9c4(0x1b0)]=!![],this[_0x4cc9c4(0x1a0)]=window[_0x4cc9c4(0x1fd)](()=>{const _0x369004=_0x4cc9c4;this[_0x369004(0x1b0)]=![];},0x1388);const _0x1afd30=new Uint8Array(_0x1d1b33[_0x4cc9c4(0x1b2)]+0x2);_0x1afd30[0x0]=0x35,_0x1afd30[0x1]=_0x98a659;for(let _0x46d03e=0x0;_0x46d03e<_0x1d1b33[_0x4cc9c4(0x1b2)];_0x46d03e++){_0x1afd30[_0x46d03e+0x2]=_0x1d1b33[_0x46d03e];}console['log']('output',_0x1afd30);const _0x3e3643=_0x1afd30[_0x4cc9c4(0x1c9)];this[_0x4cc9c4(0x1e9)][_0x4cc9c4(0x1fc)][_0x4cc9c4(0x228)](_0x3e3643)[_0x4cc9c4(0x1c3)](()=>{const _0x450e12=_0x4cc9c4;this[_0x450e12(0x1b0)]=![],window['clearTimeout'](this[_0x450e12(0x1a0)]);})[_0x4cc9c4(0x1f2)](_0x5a7ccc=>{const _0xc4d7fb=_0x4cc9c4;console['log'](_0xc4d7fb(0x20c),_0x5a7ccc);});}}class _0xf218bb{constructor(_0x40c1db){const _0x290435=_0x323375;_0x40c1db?this['runtime']=_0x40c1db:this[_0x290435(0x229)]=_0x1c634f['vm'][_0x290435(0x229)];this[_0x290435(0x208)]=_0x290435(0x1d7),this[_0x290435(0x1cd)]=this[_0x290435(0x1cd)][_0x290435(0x1e8)](this),this[_0x290435(0x1ef)]={'state':0x0,'open':0x0,'strength':0x0,'mode':0x0},this['B_state']={'state':0x0,'open':0x0,'strength':0x0,'mode':0x0},this['dl']=0x64,this['motor']=0x0,this[_0x290435(0x196)]=0x0,this['dig']={'gx':0x0,'gy':0x0,'gz':0x0,'x':0x0,'y':0x0,'z':0x0};switch(this[_0x290435(0x208)]){case'scratch':this['_peripheral']=new ScratchELE(this[_0x290435(0x229)],_0xf218bb[_0x290435(0x1ea)],this[_0x290435(0x1cd)]);break;case _0x290435(0x1d7):this[_0x290435(0x236)]=new _0x45f85f(this[_0x290435(0x1cd)]);break;}}static get[_0x323375(0x21b)](){const _0xd85594=_0x323375;return _0xd85594(0x233);}static get['EXTENSION_ID'](){const _0x7bfb29=_0x323375;return _0x7bfb29(0x231);}[_0x323375(0x218)](){const _0x464a71=_0x323375;return{'id':_0xf218bb[_0x464a71(0x1ea)],'name':_0xf218bb[_0x464a71(0x21b)],'showStatusButton':this[_0x464a71(0x208)]===_0x464a71(0x1a2),'blocks':[{'opcode':'connect','text':_0x968db6({'id':_0x464a71(0x21a),'default':'链接','description':'connect'}),'blockType':_0x1f83ec[_0x464a71(0x19b)]},{'opcode':_0x464a71(0x1d3),'text':_0x968db6({'id':_0x464a71(0x1e7),'default':_0x464a71(0x1b9),'description':_0x464a71(0x1d3)}),'blockType':_0x1f83ec[_0x464a71(0x19b)]},{'opcode':_0x464a71(0x1bf),'text':_0x968db6({'id':_0x464a71(0x1a1),'default':_0x464a71(0x1bc),'description':_0x464a71(0x1bf)}),'blockType':_0x1f83ec[_0x464a71(0x1dc)]},_0x464a71(0x1ee),{'opcode':_0x464a71(0x1b5),'text':_0x968db6({'id':_0x464a71(0x225),'default':'查询\x20[type]','description':_0x464a71(0x1b5)}),'arguments':{'type':{'type':_0xe75327[_0x464a71(0x22d)],'menu':_0x464a71(0x1b7)}},'blockType':_0x1f83ec[_0x464a71(0x19b)]},{'opcode':_0x464a71(0x216),'text':_0x968db6({'id':_0x464a71(0x1f8),'default':_0x464a71(0x1a4),'description':'getdata_td'}),'arguments':{'td':{'type':_0xe75327[_0x464a71(0x22d)],'menu':_0x464a71(0x210)},'type':{'type':_0xe75327['STRING'],'menu':_0x464a71(0x1c4)}},'blockType':_0x1f83ec[_0x464a71(0x1dd)]},{'opcode':_0x464a71(0x19f),'text':_0x968db6({'id':_0x464a71(0x1c5),'default':_0x464a71(0x1c7),'description':_0x464a71(0x19f)}),'arguments':{'type':{'type':_0xe75327[_0x464a71(0x22d)],'menu':_0x464a71(0x223)}},'blockType':_0x1f83ec['REPORTER']},{'opcode':_0x464a71(0x1b6),'text':_0x968db6({'id':'elemodule.getdata','default':_0x464a71(0x1ab),'description':_0x464a71(0x1b6)}),'arguments':{'type':{'type':_0xe75327[_0x464a71(0x22d)],'menu':_0x464a71(0x19c)}},'blockType':_0x1f83ec[_0x464a71(0x1dd)]},{'blockType':_0x1f83ec[_0x464a71(0x1f7)],'opcode':'onDataChanged','text':_0x968db6({'id':_0x464a71(0x1a8),'default':'当\x20[type]\x20数据发生变化','description':_0x464a71(0x1e1)}),'arguments':{'type':{'type':_0xe75327['STRING'],'menu':_0x464a71(0x1f9)}},'isEdgeActivated':![]},_0x464a71(0x1ee),{'opcode':_0x464a71(0x1d8),'text':_0x968db6({'id':_0x464a71(0x20e),'default':_0x464a71(0x1ff),'description':_0x464a71(0x234)}),'arguments':{'td':{'type':_0xe75327[_0x464a71(0x22d)],'menu':_0x464a71(0x210)},'mode':{'type':_0xe75327[_0x464a71(0x1fa)]},'strength':{'type':_0xe75327['NUMBER'],'defaultValue':0xa}},'blockType':_0x1f83ec[_0x464a71(0x19b)]},{'opcode':_0x464a71(0x224),'text':_0x968db6({'id':_0x464a71(0x1d2),'default':'电击\x20[td]\x20强度[strength]\x20频率[hz]\x20时间[times]','description':_0x464a71(0x224)}),'arguments':{'td':{'type':_0xe75327[_0x464a71(0x22d)],'menu':_0x464a71(0x210)},'strength':{'type':_0xe75327[_0x464a71(0x1fa)],'defaultValue':0xa},'hz':{'type':_0xe75327[_0x464a71(0x1fa)],'defaultValue':0xa},'times':{'type':_0xe75327[_0x464a71(0x1fa)],'defaultValue':0xa}},'blockType':_0x1f83ec['COMMAND']},{'opcode':_0x464a71(0x1c6),'text':_0x968db6({'id':_0x464a71(0x22f),'default':_0x464a71(0x1cb),'description':_0x464a71(0x1fb)}),'arguments':{'td':{'type':_0xe75327[_0x464a71(0x22d)],'menu':_0x464a71(0x210)}},'blockType':_0x1f83ec[_0x464a71(0x19b)]},_0x464a71(0x1ee),{'opcode':_0x464a71(0x193),'text':_0x968db6({'id':_0x464a71(0x1da),'default':_0x464a71(0x1ac),'description':_0x464a71(0x193)}),'arguments':{'mode':{'type':_0xe75327[_0x464a71(0x22d)],'menu':_0x464a71(0x21c)}},'blockType':_0x1f83ec['COMMAND']},{'opcode':'motor_control','text':_0x968db6({'id':_0x464a71(0x1eb),'default':_0x464a71(0x190),'description':_0x464a71(0x1f1)}),'arguments':{'mode':{'type':_0xe75327[_0x464a71(0x22d)],'menu':_0x464a71(0x1f5)}},'blockType':_0x1f83ec[_0x464a71(0x19b)]},{'opcode':_0x464a71(0x1ae),'text':_0x968db6({'id':_0x464a71(0x1ad),'default':_0x464a71(0x1d5),'description':_0x464a71(0x1ae)}),'arguments':{'mode':{'type':_0xe75327['STRING'],'menu':'STEP_TYPE'}},'blockType':_0x1f83ec[_0x464a71(0x19b)]}],'menus':{'DIG_CONTROL_TYPE':{'acceptReporters':!![],'items':[{'text':'开启','value':_0x464a71(0x1cf)},{'text':'关闭','value':_0x464a71(0x205)}]},'STEP_TYPE':{'acceptReporters':!![],'items':[{'text':'开启','value':_0x464a71(0x1cf)},{'text':'关闭','value':_0x464a71(0x205)},{'text':'清零','value':_0x464a71(0x1af)},{'text':'暂停','value':_0x464a71(0x199)},{'text':'恢复','value':_0x464a71(0x1d9)}]},'MOTOR_TYPE':{'acceptReporters':!![],'items':[{'text':'开启','value':'0x01'},{'text':'关闭','value':_0x464a71(0x205)},{'text':_0x464a71(0x1d1),'value':_0x464a71(0x195)},{'text':'频率2','value':_0x464a71(0x1f4)},{'text':_0x464a71(0x1a9),'value':_0x464a71(0x1fe)}]},'GETDATA_TYPE':{'acceptReporters':!![],'items':[{'text':'电量','value':'dl'},{'text':'马达','value':'motor'},{'text':'步数','value':_0x464a71(0x196)}]},'OC_DATA_TYPE':{'acceptReporters':![],'items':[{'text':'任意','value':_0x464a71(0x1e4)},{'text':_0x464a71(0x214),'value':_0x464a71(0x234)},{'text':_0x464a71(0x200),'value':_0x464a71(0x1b3)},{'text':_0x464a71(0x1e2),'value':_0x464a71(0x219)},{'text':'角度','value':_0x464a71(0x22c)},{'text':'步数','value':_0x464a71(0x196)}]},'DIG_TYPE':{'acceptReporters':!![],'items':[{'text':'x','value':'x'},{'text':'y','value':'y'},{'text':'z','value':'z'},{'text':'gx','value':'gx'},{'text':'gy','value':'gy'},{'text':'gz','value':'gz'}]},'TDDATA_TYPE':{'acceptReporters':!![],'items':[{'text':_0x464a71(0x20b),'value':_0x464a71(0x1ca)},{'text':'是否电击','value':_0x464a71(0x1d6)},{'text':'强度','value':'strength'},{'text':'模式','value':_0x464a71(0x226)}]},'QUERY_TYPE':{'acceptReporters':!![],'items':[{'text':_0x464a71(0x200),'value':'A'},{'text':_0x464a71(0x1e2),'value':'B'},{'text':'马达','value':_0x464a71(0x1db)},{'text':'电量','value':'dl'},{'text':'步数','value':_0x464a71(0x196)},{'text':'角度','value':_0x464a71(0x22c)},{'text':'全部','value':'all'}]},'TD_TYPE':{'acceptReporters':!![],'items':[{'text':_0x464a71(0x200),'value':'A'},{'text':_0x464a71(0x1e2),'value':'B'},{'text':'AB通道','value':'AB'}]}}};}['connect'](){const _0x4e3c8f=_0x323375;this[_0x4e3c8f(0x236)][_0x4e3c8f(0x212)]();}[_0x323375(0x1d3)](){const _0x46f4ce=_0x323375;this['_peripheral'][_0x46f4ce(0x1d3)]();}[_0x323375(0x1bf)](){const _0x20b496=_0x323375;return this['_peripheral'][_0x20b496(0x1bf)]();}['_onMessage'](_0x3ffb80){const _0x1aa127=_0x323375;let _0x28f5d1=Array['prototype'][_0x1aa127(0x1f0)][_0x1aa127(0x1a5)](_0x3ffb80,_0x194195=>('00'+_0x194195['toString'](0x10))[_0x1aa127(0x20a)](-0x2))[_0x1aa127(0x1a7)]('');if(_0x28f5d1[_0x1aa127(0x20a)](0x0,0x4)!=='3571'||_0x28f5d1[_0x1aa127(0x20a)](0x4,0x6)==='55')return;const _0x29ce78=parseInt(_0x28f5d1['slice'](0x4,0x6),0x10);this[_0x1aa127(0x1d4)]++;if(_0x29ce78===0x1)this[_0x1aa127(0x1ef)]={'state':parseInt(_0x28f5d1[_0x1aa127(0x20a)](0x3*0x2,0x3*0x2+0x2),0x10),'open':parseInt(_0x28f5d1['slice'](0x4*0x2,0x4*0x2+0x2),0x10),'strength':parseInt(_0x28f5d1[_0x1aa127(0x20a)](0x5*0x2,0x6*0x2+0x2),0x10)||0x0,'mode':parseInt(_0x28f5d1[_0x1aa127(0x20a)](0x7*0x2,0x7*0x2+0x2),0x10)||0x0},this[_0x1aa127(0x229)]['startHats'](_0x1aa127(0x231)+_0x1aa127(0x215),{'type':_0x1aa127(0x234)}),this[_0x1aa127(0x229)][_0x1aa127(0x197)](_0x1aa127(0x231)+_0x1aa127(0x215),{'type':_0x1aa127(0x1b3)});else{if(_0x29ce78===0x2)this[_0x1aa127(0x21d)]={'state':parseInt(_0x28f5d1[_0x1aa127(0x20a)](0x3*0x2,0x3*0x2+0x2),0x10),'open':parseInt(_0x28f5d1[_0x1aa127(0x20a)](0x4*0x2,0x4*0x2+0x2),0x10),'strength':parseInt(_0x28f5d1[_0x1aa127(0x20a)](0x5*0x2,0x6*0x2+0x2),0x10)||0x0,'mode':parseInt(_0x28f5d1[_0x1aa127(0x20a)](0x7*0x2,0x7*0x2+0x2),0x10)||0x0},this[_0x1aa127(0x229)][_0x1aa127(0x197)](_0x1aa127(0x231)+_0x1aa127(0x215),{'type':_0x1aa127(0x234)}),this[_0x1aa127(0x229)][_0x1aa127(0x197)]('elemodule'+_0x1aa127(0x215),{'type':_0x1aa127(0x219)});else{if(_0x29ce78===0x3)this['motor']=parseInt(_0x28f5d1['slice'](0x3*0x2,0x3*0x2+0x2),0x10);else{if(_0x29ce78===0x4)this['dl']=parseInt(_0x28f5d1[_0x1aa127(0x20a)](0x3*0x2,0x3*0x2+0x2),0x10),this[_0x1aa127(0x229)]['startHats'](_0x1aa127(0x231)+'_onDataChanged',{'type':'dl'});else{if(_0x29ce78===0x5)this[_0x1aa127(0x196)]=parseInt(_0x28f5d1[_0x1aa127(0x20a)](0x3*0x2,0x4*0x2+0x2),0x10),this['runtime'][_0x1aa127(0x197)](_0x1aa127(0x231)+_0x1aa127(0x215),{'type':_0x1aa127(0x196)});else _0x29ce78===0x6&&(this[_0x1aa127(0x22c)]={'gx':parseInt(_0x28f5d1[_0x1aa127(0x20a)](0x3*0x2,0x4*0x2+0x2),0x10),'gy':parseInt(_0x28f5d1[_0x1aa127(0x20a)](0x5*0x2,0x6*0x2+0x2),0x10),'gz':parseInt(_0x28f5d1['slice'](0x7*0x2,0x8*0x2+0x2),0x10),'x':parseInt(_0x28f5d1['slice'](0x9*0x2,0xa*0x2+0x2),0x10),'y':parseInt(_0x28f5d1[_0x1aa127(0x20a)](0xb*0x2,0xc*0x2+0x2),0x10),'z':parseInt(_0x28f5d1[_0x1aa127(0x20a)](0xd*0x2,0xe*0x2+0x2),0x10)},this['runtime'][_0x1aa127(0x197)](_0x1aa127(0x231)+'_onDataChanged',{'type':_0x1aa127(0x22c)}));}}}}this[_0x1aa127(0x229)][_0x1aa127(0x197)](_0x1aa127(0x231)+_0x1aa127(0x215),{'type':'any'});}['query'](_0x9abc4){const _0x2af346=_0x323375;let _0x10c98f={'A':0x1,'B':0x2,'motor':0x3,'dl':0x4,'step':0x5,'dig':0x6};if(_0x9abc4[_0x2af346(0x220)]==='all')for(let _0x37b872=0x1;_0x37b872<=0x6;_0x37b872++){this[_0x2af346(0x236)]['send'](_0x3e4dd5[_0x2af346(0x203)],new Uint8Array([_0x37b872]));}else this[_0x2af346(0x236)]['send'](_0x3e4dd5[_0x2af346(0x203)],new Uint8Array([_0x10c98f[_0x9abc4[_0x2af346(0x220)]]]));}[_0x323375(0x1d8)](_0x2b8e9b){const _0x4d29c0=_0x323375;let {td:_0x3ef25d,strength:_0xbc5e99,mode:_0x4b1fc6}=_0x2b8e9b;return this[_0x4d29c0(0x234)](_0x3ef25d,0x1,_0xbc5e99,_0x4b1fc6,0x0,0x0);}[_0x323375(0x224)](_0x50e76e){const _0x41100a=_0x323375;let {td:_0x7d8370,strength:_0x28319f,hz:_0x10a23f,times:_0xf7bbbd}=_0x50e76e;return this[_0x41100a(0x234)](_0x7d8370,0x1,_0x28319f,0xb,_0x10a23f,_0xf7bbbd);}[_0x323375(0x1c6)](_0x4ed14c){const _0x23b255=_0x323375;let {td:_0x39430d}=_0x4ed14c;return this[_0x23b255(0x234)](_0x39430d,0x0,0x0,0x0,0x0,0x0);}[_0x323375(0x234)](_0x5aa8fc,_0x2ac1c1,_0x28a071,_0xae5916=0x1,_0x269c37=0x0,_0x3d3a7b=0x0){const _0x1ab248=_0x323375;let _0x4c2328='';if(_0x5aa8fc===0x1||_0x5aa8fc==='A')_0x4c2328+='01';else{if(_0x5aa8fc===0x2||_0x5aa8fc==='B')_0x4c2328+='02';else _0x5aa8fc===0x3||_0x5aa8fc==='AB'?_0x4c2328+='03':console[_0x1ab248(0x201)]('通道错误');}if(_0x2ac1c1)_0x4c2328+='01';else{_0x4c2328+='00'[_0x1ab248(0x1ce)](0x6);let _0x311d3f=new Uint8Array(_0x4c2328['match'](/[\da-f]{2}/gi)['map'](function(_0x12758c){return parseInt(_0x12758c,0x10);}));this['_peripheral'][_0x1ab248(0x1a6)](_0x3e4dd5['CMD_ELE'],_0x311d3f);}_0x28a071>0x114?console[_0x1ab248(0x201)](_0x1ab248(0x1bb)):_0x4c2328+=_0x28a071['toString'](0x10)['padStart'](0x4,'0');(_0x269c37||_0x3d3a7b)&&(_0xae5916=0x11);_0xae5916<=0x11?_0x4c2328+=_0xae5916[_0x1ab248(0x20f)](0x10)[_0x1ab248(0x1e5)](0x2,'0'):console[_0x1ab248(0x201)](_0x1ab248(0x1b4));_0x269c37<=0xc8?_0x4c2328+=_0x269c37[_0x1ab248(0x20f)](0x10)[_0x1ab248(0x1e5)](0x2,'0'):console[_0x1ab248(0x201)](_0x1ab248(0x22b));_0x3d3a7b<=0xff?_0x4c2328+=_0x3d3a7b[_0x1ab248(0x20f)](0x10)[_0x1ab248(0x1e5)](0x2,'0'):console[_0x1ab248(0x201)](_0x1ab248(0x19a));let _0x52e1d6=new Uint8Array(_0x4c2328[_0x1ab248(0x1e0)](/[\da-f]{2}/gi)[_0x1ab248(0x1f0)](function(_0x328854){return parseInt(_0x328854,0x10);}));this[_0x1ab248(0x236)][_0x1ab248(0x1a6)](_0x3e4dd5[_0x1ab248(0x1d0)],_0x52e1d6);}[_0x323375(0x1f1)](_0x1928c2){const _0x3fa1fb=_0x323375;let {mode:_0x68c6f4}=_0x1928c2;this[_0x3fa1fb(0x236)][_0x3fa1fb(0x1a6)](_0x3e4dd5[_0x3fa1fb(0x1e6)],[parseInt(_0x68c6f4)]);}['step_control'](_0xf87ee5){const _0x10c2f9=_0x323375;let {mode:_0x2a5d7d}=_0xf87ee5;this[_0x10c2f9(0x236)]['send'](_0x3e4dd5[_0x10c2f9(0x1be)],[parseInt(_0x2a5d7d)]);}[_0x323375(0x193)](_0x1b0422){const _0x4892c2=_0x323375;let {mode:_0xd276e6}=_0x1b0422;this[_0x4892c2(0x236)][_0x4892c2(0x1a6)](_0x3e4dd5[_0x4892c2(0x232)],[parseInt(_0xd276e6)]);}[_0x323375(0x216)](_0x26b61b){const _0xb4a798=_0x323375;let {td:_0x3053e4,type:_0x258cd0}=_0x26b61b;if(_0x3053e4===0x1||_0x3053e4==='A')return this[_0xb4a798(0x1ef)][_0x258cd0];else{if(_0x3053e4===0x2||_0x3053e4==='B')return this[_0xb4a798(0x21d)][_0x258cd0];else{if(_0x3053e4===0x3||_0x3053e4==='AB')return[this[_0xb4a798(0x1ef)][_0x258cd0],this[_0xb4a798(0x21d)][_0x258cd0]];}}}[_0x323375(0x19f)](_0x3de655){const _0x21b8e9=_0x323375;let {type:_0x360a9b}=_0x3de655;return this[_0x21b8e9(0x22c)][_0x360a9b];}['getdata'](_0x3a6b24){const _0x8b89a0=_0x323375;if(_0x3a6b24[_0x8b89a0(0x220)]===_0x8b89a0(0x1db))return this['motor'];else{if(_0x3a6b24[_0x8b89a0(0x220)]==='dl')return this['dl'];else{if(_0x3a6b24[_0x8b89a0(0x220)]===_0x8b89a0(0x196))return this[_0x8b89a0(0x196)];}}}}_0x1c634f[_0x323375(0x21e)][_0x323375(0x1f6)](new _0xf218bb());}(Scratch));