Skip to content

Commit 5b1470f

Browse files
authored
Merge pull request #677 from entrylabs/develop-hw
1.9.47 버전업
2 parents bb34332 + 684834f commit 5b1470f

16 files changed

+23386
-21426
lines changed

app/firmwares/dalgona.hex

Lines changed: 1146 additions & 1125 deletions
Large diffs are not rendered by default.

app/firmwares/dalgona_basic.hex

Lines changed: 1162 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 832 additions & 808 deletions
Large diffs are not rendered by default.

app/firmwares/microbit_compatible.hex renamed to app/firmwares/microbit_compatible_lite.hex

Lines changed: 18996 additions & 19345 deletions
Large diffs are not rendered by default.

app/modules/ProboConnect.js

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -326,24 +326,24 @@ class ProboConnect extends BaseModule {
326326
//this.sensors = data;
327327
}
328328

329-
// 커스텀 버튼을 사용자에게 보여줄지 여부
330-
canShowCustomButton() {
331-
return true;
332-
}
329+
// // 커스텀 버튼을 사용자에게 보여줄지 여부
330+
// canShowCustomButton() {
331+
// return true;
332+
// }
333333

334334
// 커스텀 버튼 클릭시 동작할 로직
335-
customButtonClicked(key) {
336-
switch (key) {
337-
case "case1":
338-
//버튼 1 로직
339-
break;
340-
case "case2":
341-
//버튼 2 로직
342-
break;
343-
default:
344-
console.log(key);
345-
}
346-
}
335+
// customButtonClicked(key) {
336+
// switch (key) {
337+
// case "case1":
338+
// //버튼 1 로직
339+
// break;
340+
// case "case2":
341+
// //버튼 2 로직
342+
// break;
343+
// default:
344+
// console.log(key);
345+
// }
346+
// }
347347

348348
}
349349

app/modules/ProboConnect.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010
"driver": [{
1111
"win32-ia32": "CH34x_Install_Windows_v3_4/CH34x_Install_Windows_v3_4.exe",
1212
"win32-x64": "CH34x_Install_Windows_v3_4/CH34x_Install_Windows_v3_4.exe",
13-
"translate": "드라이버 설치"},
13+
"translate": "드라이버 설치1"},
1414
{
1515
"win32-ia32": "Easy_Down_Entry/PROBO_Easy_Down_Entry_ver8.38_install.exe",
1616
"win32-x64": "Easy_Down_Entry/PROBO_Easy_Down_Entry_ver8.38_install.exe",
17-
"translate": "펌웨어 설치"}
17+
"translate": "드라이버 설치2"}
1818
],
1919
"url": "https://www.probo.kr/",
2020
"email": "[email protected]",

app/modules/asomekit.js

Lines changed: 37 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,13 @@ class AsomeKit extends BaseModule {
1313
this.msg_id = '';
1414
this.sendToEntry = {
1515
msg_id: "",
16-
distance: 0,
16+
bt_value: 0,
17+
cm: 0,
18+
humidity: 0,
19+
temperature: 0,
20+
light: 0,
21+
vibration: 0,
22+
sound: 0,
1723
udp_msg: "",
1824
};
1925
}
@@ -110,9 +116,37 @@ class AsomeKit extends BaseModule {
110116

111117
console.log("from AsomeBot: ", line);
112118

113-
if (line.indexOf('#DT') >= 0) {
119+
if (line.indexOf('#BT') >= 0) {
114120
var values = line.split(" ");
115-
if (values.length > 1) this.sendToEntry.distance = values[1];
121+
if (values.length > 1) this.sendToEntry.bt_value = values[1];
122+
}
123+
if (line.indexOf('#CM') >= 0) {
124+
var values = line.split(" ");
125+
if (values.length > 1) this.sendToEntry.cm = values[1];
126+
}
127+
if (line.indexOf('#HD') >= 0) {
128+
var values = line.split(" ");
129+
if (values.length > 1) this.sendToEntry.humidity = values[1];
130+
}
131+
if (line.indexOf('#TP') >= 0) {
132+
var values = line.split(" ");
133+
if (values.length > 1) this.sendToEntry.temperature = values[1];
134+
}
135+
if (line.indexOf('#BN') >= 0) {
136+
var values = line.split(" ");
137+
if (values.length > 1) this.sendToEntry.light = values[1];
138+
}
139+
if (line.indexOf('#VT') >= 0) {
140+
var values = line.split(" ");
141+
if (values.length > 1) {
142+
if (values[1] == 'False') {
143+
this.sendToEntry.vibration = 0;
144+
} else {this.sendToEntry.vibration = 1;}
145+
}
146+
}
147+
if (line.indexOf('#SO') >= 0) {
148+
var values = line.split(" ");
149+
if (values.length > 1) this.sendToEntry.sound = values[1];
116150
}
117151
if (line.indexOf('#UDP') >= 0) {
118152
var values = line.split(" ");

app/modules/dalgona.js

Lines changed: 18 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,13 @@ function Module() {
5656
GYROY: 56,
5757
GYROZ: 57,
5858
PULLUP: 58,
59-
// FNDINIT: 59,
59+
TONETOGGLE: 59,
6060
};
6161

6262
this.actionTypes = {
6363
GET: 1,
6464
SET: 2,
65-
MODUEL: 3,
65+
MODULE: 3,
6666
RESET: 4,
6767
};
6868

@@ -548,7 +548,10 @@ Module.prototype.makeOutputBuffer = function (device, port, data) {
548548
buffer = Buffer.concat([buffer, value1, value2, stime, dummy]);
549549
break;
550550
}
551-
case this.sensorTypes.DIGITAL:
551+
case this.sensorTypes.DIGITAL:{
552+
console.log("digital");
553+
console.log(buffer);
554+
}
552555
case this.sensorTypes.PWM: {
553556
value.writeInt16LE(data);
554557
buffer = new Buffer([255, 85, 6, sensorIdx, this.actionTypes.SET, device, port]);
@@ -573,6 +576,18 @@ Module.prototype.makeOutputBuffer = function (device, port, data) {
573576
buffer = Buffer.concat([buffer, value, time, dummy]);
574577
break;
575578
}
579+
580+
case this.sensorTypes.TONETOGGLE:{
581+
value.writeInt16LE(data);
582+
buffer = new Buffer([255, 85, 6, sensorIdx, this.actionTypes.SET, device, port]);
583+
buffer = Buffer.concat([buffer, value, dummy]);
584+
585+
console.log("tonetoggle");
586+
console.log(buffer);
587+
588+
break;
589+
}
590+
576591
case this.sensorTypes.RGBLED: {
577592
const port1 = new Buffer(2);
578593
const port2 = new Buffer(2);
@@ -634,62 +649,6 @@ Module.prototype.makeOutputBuffer = function (device, port, data) {
634649
}
635650

636651

637-
// case this.sensorTypes.FNDINIT: {
638-
// const fndClk = Buffer.alloc(2);
639-
// const fndDio = Buffer.alloc(2);
640-
// const fndBrightnessLev = Buffer.alloc(2);
641-
// const fndOnOff = Buffer.alloc(2);
642-
// const fndBlockIndex = Buffer.alloc(2);
643-
// const fndDelayMs = Buffer.alloc(2);
644-
// const fndDisplayStrLength = Buffer.alloc(2);
645-
// const fndDisplayStr0 = Buffer.alloc(2);
646-
// const fndDisplayStr1 = Buffer.alloc(2);
647-
// const fndDisplayStr2 = Buffer.alloc(2);
648-
// const fndDisplayStr3 = Buffer.alloc(2);
649-
650-
// if ($.isPlainObject(data)) {
651-
// fndClk.writeInt16LE(data.clk_pin);
652-
// fndDio.writeInt16LE(data.dio_pin);
653-
// // FND Init Block Area Above
654-
655-
// fndBrightnessLev.writeInt16LE(data.level_val);
656-
// fndBlockIndex.writeInt16LE(data.block_index);
657-
// // FND Display Block Area Above
658-
659-
// fndOnOff.writeInt16LE(data.onoff);
660-
// fndDelayMs.writeInt16LE(data.delay_ms);
661-
662-
// fndDisplayStrLength.writeInt16LE(data.str_length);
663-
// fndDisplayStr0.writeInt16LE(data.data_0);
664-
// fndDisplayStr1.writeInt16LE(data.data_1);
665-
// fndDisplayStr2.writeInt16LE(data.data_2);
666-
// fndDisplayStr3.writeInt16LE(data.data_3);
667-
// } else {
668-
// fndClk.writeInt16LE(0);
669-
// fndDio.writeInt16LE(0);
670-
// // FND Init Block Area Above
671-
672-
// fndBrightnessLev.writeInt16LE(0);
673-
// fndBlockIndex.writeInt16LE(0);
674-
// // FND Display Block Area Above
675-
676-
// fndOnOff.writeInt16LE(0);
677-
// fndDelayMs.writeInt16LE(0);
678-
679-
// fndDisplayStrLength.writeInt16LE(0);
680-
// fndDisplayStr0.writeInt16LE(0);
681-
// fndDisplayStr1.writeInt16LE(0);
682-
// fndDisplayStr2.writeInt16LE(0);
683-
// fndDisplayStr3.writeInt16LE(0);
684-
// }
685-
686-
// buffer = Buffer.from([255, 85, 26, sensorIdx, this.actionTypes.MODUEL, device, port]);
687-
// buffer = Buffer.concat([buffer, fndBlockIndex, fndClk, fndDio, fndBrightnessLev, fndOnOff, fndDisplayStrLength, fndDisplayStr0, fndDisplayStr1, fndDisplayStr2, fndDisplayStr3, fndDelayMs, dummy]);
688-
689-
// break;
690-
// }
691-
692-
693652
case this.sensorTypes.NEOPIXELINIT: {
694653
value.writeInt16LE(data);
695654
buffer = new Buffer([255, 85, 6, sensorIdx, this.actionTypes.SET, device, port]);

0 commit comments

Comments
 (0)