Skip to content

Commit eea045b

Browse files
authored
Merge pull request #659 from Crocuse/develop-hw
Develop hw
2 parents d699c56 + 90f2d7a commit eea045b

File tree

4 files changed

+81
-7
lines changed

4 files changed

+81
-7
lines changed
Binary file not shown.

app/modules/ProboConnect.js

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
const Lodash = require('lodash');
12
const BaseModule = require('./baseModule');
23

34
class ProboConnect extends BaseModule {
@@ -60,7 +61,28 @@ class ProboConnect extends BaseModule {
6061
EC:0,
6162
EEPR2:0,
6263
EEPR1:0
64+
},
65+
Infinite:{
66+
ROTATION_1:0,
67+
ROTATION_2:0,
68+
ROTATION_3:0,
69+
ROTATION_4:0
70+
},
71+
Acceler:{
72+
AXIS_X1:0,
73+
AXIS_X2:0,
74+
AXIS_X3:0,
75+
AXIS_X4:0,
76+
AXIS_Y1:0,
77+
AXIS_Y2:0,
78+
AXIS_Y3:0,
79+
AXIS_Y4:0,
80+
AXIS_Z1:0,
81+
AXIS_Z2:0,
82+
AXIS_Z3:0,
83+
AXIS_Z4:0,
6384
}
85+
6486
};
6587

6688
this.RemoteData = {
@@ -87,6 +109,10 @@ class ProboConnect extends BaseModule {
87109
ASET1:0
88110
};
89111

112+
// this.Infinite_Buff = { AA1: 0, AA2: 0, AA3: 0, AA4: 0 },
113+
// this.Infinite_Count = { AA1: 0, AA2: 0, AA3: 0, AA4: 0 },
114+
// this.Infinite_Start = { AA1: 0, AA2: 0, AA3: 0, AA4: 0 },
115+
90116
this.OutputData = new Buffer(22);
91117

92118
this.OutputData[0] = 0xAD;
@@ -273,13 +299,53 @@ class ProboConnect extends BaseModule {
273299
this.InputData.EEPROM.EC = data[13];
274300
this.InputData.EEPROM.EEPR2 = data[14];
275301
this.InputData.EEPROM.EEPR1 = data[15];
302+
303+
this.InputData.Infinite.ROTATION_1 = (data[16]>>6)&0xC;
304+
this.InputData.Infinite.ROTATION_2 = (data[16]>>4)&0xC;
305+
this.InputData.Infinite.ROTATION_3 = (data[16]>>2)&0xC;
306+
this.InputData.Infinite.ROTATION_4 = (data[16]>>0)&0xC;
307+
308+
this.InputData.Acceler.AXIS_X1 = data[4];
309+
this.InputData.Acceler.AXIS_X2 = data[5];
310+
this.InputData.Acceler.AXIS_X3 = data[6];
311+
this.InputData.Acceler.AXIS_X4 = data[7];
312+
313+
this.InputData.Acceler.AXIS_Y1 = data[17];
314+
this.InputData.Acceler.AXIS_Y2 = data[19];
315+
this.InputData.Acceler.AXIS_Y3 = data[21];
316+
this.InputData.Acceler.AXIS_Y4 = data[23];
317+
318+
this.InputData.Acceler.AXIS_Z1 = data[18];
319+
this.InputData.Acceler.AXIS_Z2 = data[20];
320+
this.InputData.Acceler.AXIS_Z3 = data[22];
321+
this.InputData.Acceler.AXIS_Z4 = data[24];
322+
276323
}
277324
else
278325
console.count('CheckSum Err');
279326
}
280327
//this.sensors = data;
281328
}
282329

330+
// 커스텀 버튼을 사용자에게 보여줄지 여부
331+
canShowCustomButton() {
332+
return true;
333+
}
334+
335+
// 커스텀 버튼 클릭시 동작할 로직
336+
customButtonClicked(key) {
337+
switch (key) {
338+
case "case1":
339+
//버튼 1 로직
340+
break;
341+
case "case2":
342+
//버튼 2 로직
343+
break;
344+
default:
345+
console.log(key);
346+
}
347+
}
348+
283349
}
284350

285351
module.exports = new ProboConnect();

app/modules/ProboConnect.json

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,25 @@
44
"en": "ProboConnect",
55
"ko": "프로보커넥트"
66
},
7-
"category": "module",
87
"platform": ["win32"],
98
"icon" : "ProboConnect.png",
109
"module": "ProboConnect.js",
11-
"driver": {
10+
"driver": [{
1211
"win32-ia32": "CH34x_Install_Windows_v3_4/CH34x_Install_Windows_v3_4.exe",
13-
"win32-x64": "CH34x_Install_Windows_v3_4/CH34x_Install_Windows_v3_4.exe"
14-
},
12+
"win32-x64": "CH34x_Install_Windows_v3_4/CH34x_Install_Windows_v3_4.exe",
13+
"translate": "드라이버 설치"},
14+
{
15+
"win32-ia32": "Easy_Down_Entry/PROBO_Easy_Down_Entry_ver8.38_install.exe",
16+
"win32-x64": "Easy_Down_Entry/PROBO_Easy_Down_Entry_ver8.38_install.exe",
17+
"translate": "펌웨어 설치"}
18+
],
1519
"url": "https://www.probo.kr/",
16-
"email": "alswn5609@naver.com",
20+
"email": "tkddnjs10@naver.com",
1721
"reconnect": true,
18-
"selectPort": true,
22+
"select_com_port": true,
23+
"entry": {
24+
"protocol": "json"
25+
},
1926
"hardware": {
2027
"type": "serial",
2128
"control": "slave",
@@ -30,4 +37,5 @@
3037
"delimiter" : "",
3138
"flowControl" : "Connect"
3239
}
33-
}
40+
41+
}

app/modules/ProboConnect.png

34.5 KB
Loading

0 commit comments

Comments
 (0)