From 362f288a16c014fd5d0b9442fae2ea939762705c Mon Sep 17 00:00:00 2001 From: bigstone77 Date: Tue, 17 Dec 2024 21:37:18 +0900 Subject: [PATCH 1/3] =?UTF-8?q?JDCode=20=EB=B0=8F=20JCBoard=EC=97=90?= =?UTF-8?q?=EC=84=9C=20true=20or=20false=20=EB=B0=98=ED=99=98=EA=B0=92?= =?UTF-8?q?=EC=9D=84=201=20or=200=EC=9C=BC=EB=A1=9C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/modules/jcboard.js | 4 ++-- app/modules/jdcode.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/modules/jcboard.js b/app/modules/jcboard.js index 17ac30020..950836000 100644 --- a/app/modules/jcboard.js +++ b/app/modules/jcboard.js @@ -73,8 +73,8 @@ Module.prototype.handleLocalData = function(data) { }; Module.prototype.requestRemoteData = function(handler) { - handler.write('A0', !!(this.sensorData[6] & 0x01)); - handler.write('A1', !!(this.sensorData[6] & 0x02)); + handler.write('A0', (this.sensorData[6] & 0x01)!=0? 1 : 0); + handler.write('A1', !!(this.sensorData[6] & 0x02)!=0? 1 : 0); handler.write('A2', this.sensorData[7]); handler.write('A3', this.sensorData[8]); handler.write('A4', this.sensorData[9]); diff --git a/app/modules/jdcode.js b/app/modules/jdcode.js index 0cc9c0e23..87404bb14 100644 --- a/app/modules/jdcode.js +++ b/app/modules/jdcode.js @@ -247,12 +247,12 @@ Module.prototype.handleLocalData = function(data) { }); if(dongleData[1] == (sum&0xFF)){ deviceType = 2; - sensorData[6] = true; + sensorData[6] = 1; sensorData[15] = dongleData[5]; sensorData[7] = dongleData[9]; sensorData[8] = dongleData[7]; sensorData[9] = dongleData[8]; - sensorData[10] = (dongleData[3]&0x03)? false : true; + sensorData[10] = (dongleData[3]&0x03)? 0 : 1; sensorData[16] = dongleData[10]; sensorData[17] = dongleData[11]; sensorData[18] = dongleData[12]; From 6d99dafe3f23f5681a44c1baf4bbac6984a37ebb Mon Sep 17 00:00:00 2001 From: bigstone77 Date: Tue, 17 Dec 2024 21:39:18 +0900 Subject: [PATCH 2/3] =?UTF-8?q?RoboDog=20=EC=A7=80=EC=9B=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/modules/robodog.js | 175 +++++++++++++++++++++++++++++++++++++++ app/modules/robodog.json | 26 ++++++ app/modules/robodog.png | Bin 0 -> 16076 bytes 3 files changed, 201 insertions(+) create mode 100644 app/modules/robodog.js create mode 100644 app/modules/robodog.json create mode 100644 app/modules/robodog.png diff --git a/app/modules/robodog.js b/app/modules/robodog.js new file mode 100644 index 000000000..142c8f05b --- /dev/null +++ b/app/modules/robodog.js @@ -0,0 +1,175 @@ +function Module() { + this.cmdData = [0x26, 0xA8, 0x14, 0x81, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]; + this.sensorData = [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]; + this.dongleData = [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]; + this.robodog_head = [0x26, 0xA8, 0x14, 0x8A]; + this.rk_cnt = 0; + this.pktCnt = -1; + this.pktLength = 6; + this.ledPacket = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + this.txCnt = 0; +} + +Module.prototype.init = function(handler, config) { +}; + +Module.prototype.requestInitialData = function() { + return null; +}; + +Module.prototype.checkInitialData = function(data, config) { + return true; +}; + +Module.prototype.validateLocalData = function(data) { + return true; +}; + + + +function checksum(cmd){ + let sum = 0; + + cmd.forEach(function (value, idx) { + if(idx > 5) + sum += value; + }); + return sum&0xFF; +} + + + /////////////// 엔트리에서 받은 데이터에 대한 처리 ///////////////////// +Module.prototype.handleRemoteData = function(handler) { + let cmd = handler.read('CMD'); + + if(typeof cmd !== 'object') + return; + + this.cmdData = cmd.slice(); + if(this.cmdData[14] > 0){ + if(this.cmdData[14] == 2){ + this.ledPacket[0] = (this.cmdData[14]&0xC0) | 0x82; + this.ledPacket[1] = this.ledPacket[1] | 0x80; + for(let n=0; n<16; n++) + this.ledPacket[2+n] = this.cmdData[24+n]; + } + if(this.cmdData[14] == 3){ + this.ledPacket[0] = (this.cmdData[14]&0xC0) | 0x83; + this.ledPacket[1] = this.ledPacket[1] | 0x80; + for(let n=0; n<16; n++) + this.ledPacket[2+n] = this.cmdData[24+n]; + } + if(this.cmdData[14] == 4){ + this.ledPacket[1] = (this.cmdData[14]&0xC0) | 0x44; + this.ledPacket[0] = this.ledPacket[0] | 0x40; + for(let n=0; n<16; n++) + this.ledPacket[18+n] = this.cmdData[24+n]; + } + } + else{ + this.ledPacket[0] = 0; + this.ledPacket[1] = 0; + } +}; + + + //////////////// 하드웨어로 보낼 데이터 로직 ///////////// +Module.prototype.requestLocalData = function() { + if(((this.ledPacket[0]&0xC0) == 0xC0) || ((this.ledPacket[1]&0xC0) == 0xC0)){ + if((this.txCnt%2) == 0){ + this.cmdData[14] = this.ledPacket[0]; + for(let n=0; n<16; n++) + this.cmdData[24+n] = this.ledPacket[2+n]; + } + else{ + this.cmdData[14] = this.ledPacket[1]; + for(let n=0; n<16; n++) + this.cmdData[24+n] = this.ledPacket[18+n]; + } + this.cmdData[5] = checksum(this.cmdData); + this.txCnt += 1; + } + return this.cmdData; +}; + +///////////// 하드웨어에서 온 데이터 처리 /////////////////// +Module.prototype.handleLocalData = function(data) { + let sensorData = this.sensorData; + let dongleData = this.dongleData; + let pktLength = this.pktLength; + + let robodog_head = this.robodog_head; + data.forEach(function (value) { + this.rk_cnt = (value==robodog_head[this.rk_cnt])? this.rk_cnt+1 : 0; + if(this.rk_cnt == 4){ + this.rk_cnt = 0; + this.pktCnt = 0; + } + else if(this.pktCnt >= 0){ + if(this.pktCnt == 0) + pktLength = ((value>0) && (value<19))? value-4 : 16; + dongleData[4+this.pktCnt++] = value; + } + + if(this.pktCnt == pktLength){ + this.pktCnt = -1; + var sum = 0; + dongleData.forEach(function (value, idx) { + if(idx > 5) + sum += value; + }); + if(dongleData[5] == (sum&0xFF)){ + dongleData.forEach(function (value, idx) { + sensorData[idx] = value; + }); + } + } + }); + this.pktLength = pktLength; +}; + +function unsingToSign8(data) +{ + return data>127? data-256 : data; +} +function unsingToSign16(data) +{ + return data>32767? data-65536 : data; +} + +///////////// 엔트리로 전달할 데이터 /////////////////////////// +Module.prototype.requestRemoteData = function(handler) { + handler.write("SENSORDATA", this.sensorData); + handler.write('BATTERY', this.sensorData[6]); + handler.write('TOF', this.sensorData[7]); + handler.write('ROLL', unsingToSign8(this.sensorData[8])); + handler.write('PITCH', unsingToSign8(this.sensorData[9])); + handler.write('YAW', unsingToSign16(this.sensorData[10] + this.sensorData[11]*256)); + handler.write('RB0', this.sensorData[12]>127? this.sensorData[12]-256 : this.sensorData[12]); + handler.write('RB1', this.sensorData[13]>127? this.sensorData[13]-256 : this.sensorData[13]); + handler.write('RB2', this.sensorData[14]>127? this.sensorData[14]-256 : this.sensorData[14]); + handler.write('RB3', this.sensorData[15]>127? this.sensorData[15]-256 : this.sensorData[15]); + handler.write('BUTTON', this.sensorData[16]); + handler.write('RB_WATCHDOG', this.sensorData[17]); + handler.write('RB4', this.sensorData[18]>127? this.sensorData[18]-256 : this.sensorData[18]); + handler.write('RB5', this.sensorData[19]>127? this.sensorData[19]-256 : this.sensorData[19]); +}; + +Module.prototype.reset = function() { + this.cmdData = [0x26, 0xA8, 0x14, 0x81, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64]; + this.sensorData = [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]; + this.ledPacket = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + console.log("reset"); +}; + +module.exports = new Module(); diff --git a/app/modules/robodog.json b/app/modules/robodog.json new file mode 100644 index 000000000..82cfbc47d --- /dev/null +++ b/app/modules/robodog.json @@ -0,0 +1,26 @@ +{ + "id": "1D0501", + "name": { + "en": "RoboDog", + "ko": "로보독" + }, + "category": "robot", + "platform": ["win32", "darwin"], + "icon": "robodog.png", + "module": "robodog.js", + "url": "http://www.junilab.co.kr", + "driver": { + "win32-ia32": "JuniLab/dongleSetup.bat", + "win32-x64": "JuniLab/dongleSetup.bat" + }, + "reconnect": true, + "hardware": { + "type": "serial", + "control": "slave", + "duration": 32, + "vendor": "Junilab_Inc", + "pnpId": "0226", + "baudRate": 19200, + "firmwarecheck": false + } +} diff --git a/app/modules/robodog.png b/app/modules/robodog.png new file mode 100644 index 0000000000000000000000000000000000000000..592b3163f455970c5a2392b4f4a9e049d5c994fd GIT binary patch literal 16076 zcmcJ0_g7Qh^L2WF1On1R?}E~cAU#oHc z06-uC00#`_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:49:05 +0900 Subject: [PATCH 3/3] =?UTF-8?q?JDCode=20=EB=B0=8F=20JCBoard=EC=97=90?= =?UTF-8?q?=EC=84=9C=20true=20or=20false=20=EB=B0=98=ED=99=98=EA=B0=92?= =?UTF-8?q?=EC=9D=84=201=20or=200=EC=9C=BC=EB=A1=9C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/modules/jcboard.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/modules/jcboard.js b/app/modules/jcboard.js index 950836000..bf9260071 100644 --- a/app/modules/jcboard.js +++ b/app/modules/jcboard.js @@ -73,8 +73,8 @@ Module.prototype.handleLocalData = function(data) { }; Module.prototype.requestRemoteData = function(handler) { - handler.write('A0', (this.sensorData[6] & 0x01)!=0? 1 : 0); - handler.write('A1', !!(this.sensorData[6] & 0x02)!=0? 1 : 0); + handler.write('A0', (this.sensorData[6] & 0x01)==0x01? 1 : 0); + handler.write('A1', (this.sensorData[6] & 0x02)==0x02? 1 : 0); handler.write('A2', this.sensorData[7]); handler.write('A3', this.sensorData[8]); handler.write('A4', this.sensorData[9]);