Skip to content

Commit 5df547b

Browse files
authored
Merge pull request #658 from entrylabs/develop-hw
1.9.45 버전업 2차
2 parents 44441a7 + 426488c commit 5df547b

11 files changed

+3941
-3874
lines changed

app/firmwares/0uboard.bin

-5.8 KB
Binary file not shown.

app/firmwares/dalgona.hex

Lines changed: 1110 additions & 1115 deletions
Large diffs are not rendered by default.

app/firmwares/roborobo_cube.hex

Lines changed: 1983 additions & 1939 deletions
Large diffs are not rendered by default.

app/firmwares/runcoding.hex

Lines changed: 798 additions & 787 deletions
Large diffs are not rendered by default.

app/modules/0uboard.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ function Module() {
1313
OLED: 241,
1414
COM: 242,
1515
NEOPIXEL: 243,
16-
ULTRASONIC_COUNTER: 244,
16+
//ULTRASONIC_COUNTER: 244,
1717
DOTMATRIX: 245
1818
}
1919

app/modules/asomebot.json

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,20 @@
1111
],
1212
"icon": "asomebot.png",
1313
"module": "asomebot.js",
14-
"driver": {
15-
"win32-ia32": "CP210x_VCP_Windows/CP210xVCPInstaller_x86.exe",
16-
"win32-x64": "CP210x_VCP_Windows/CP210xVCPInstaller_x64.exe",
17-
"darwin-x64": "Mac_OSX_VCP_Driver/SiLabsUSBDriverDisk.dmg"
18-
},
14+
"driver": [
15+
{
16+
"win32-ia32": "CP210x_VCP_Windows/CP210xVCPInstaller_x86.exe",
17+
"win32-x64": "CP210x_VCP_Windows/CP210xVCPInstaller_x64.exe",
18+
"darwin-x64": "Mac_OSX_VCP_Driver/SiLabsUSBDriverDisk.dmg",
19+
"translate": "USB 드라이버 "
20+
},
21+
{
22+
"win32-ia32": "CH34x_Install_Windows_v3_4/CH34x_Install_Windows_v3_4.EXE",
23+
"win32-x64": "CH34x_Install_Windows_v3_4/CH34x_Install_Windows_v3_4.EXE",
24+
"darwin-x64": "https://entrylabs.github.io/docs/files/drivers/CH34x_Install_MAC_10_9_AND_ABOVE/CH34x_Install_V1.3.pkg",
25+
"translate": "CH340 드라이버"
26+
}
27+
],
1928
"selectPort": true,
2029
"reconnect": true,
2130
"hardware": {

app/modules/asomekit.json

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,20 @@
1111
],
1212
"icon": "asomekit.png",
1313
"module": "asomekit.js",
14-
"driver": {
15-
"win32-ia32": "CP210x_VCP_Windows/CP210xVCPInstaller_x86.exe",
16-
"win32-x64": "CP210x_VCP_Windows/CP210xVCPInstaller_x64.exe",
17-
"darwin-x64": "Mac_OSX_VCP_Driver/SiLabsUSBDriverDisk.dmg"
18-
},
14+
"driver": [
15+
{
16+
"win32-ia32": "CP210x_VCP_Windows/CP210xVCPInstaller_x86.exe",
17+
"win32-x64": "CP210x_VCP_Windows/CP210xVCPInstaller_x64.exe",
18+
"darwin-x64": "Mac_OSX_VCP_Driver/SiLabsUSBDriverDisk.dmg",
19+
"translate": "USB 드라이버 "
20+
},
21+
{
22+
"win32-ia32": "CH34x_Install_Windows_v3_4/CH34x_Install_Windows_v3_4.EXE",
23+
"win32-x64": "CH34x_Install_Windows_v3_4/CH34x_Install_Windows_v3_4.EXE",
24+
"darwin-x64": "https://entrylabs.github.io/docs/files/drivers/CH34x_Install_MAC_10_9_AND_ABOVE/CH34x_Install_V1.3.pkg",
25+
"translate": "CH340 드라이버"
26+
}
27+
],
1928
"selectPort": true,
2029
"reconnect": true,
2130
"hardware": {

app/modules/dalgona.js

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -345,15 +345,18 @@ Module.prototype.requestLocalData = function () {
345345
/*
346346
ff 55 idx size data a
347347
*/
348+
349+
// 펌웨어에서 입력된 값을 처리하는 Buffer
348350
Module.prototype.handleLocalData = function (data) {
349351
const self = this;
350352
const datas = this.getDataByBuffer(data);
351-
353+
// console.log(datas);
352354
datas.forEach((data) => {
353355
if (data.length <= 4 || data[0] !== 255 || data[1] !== 85) {
354356
return;
355357
}
356358
const readData = data.subarray(2, data.length);
359+
// console.log(readData);
357360
let value;
358361
switch (readData[0]) {
359362
case self.sensorValueSize.FLOAT: {
@@ -380,7 +383,10 @@ Module.prototype.handleLocalData = function (data) {
380383

381384
const type = readData[readData.length - 1];
382385
const port = readData[readData.length - 2];
383-
386+
// if(port == 9)
387+
// {
388+
// console.log(readData);
389+
// }
384390
switch (type) {
385391
case self.sensorTypes.DIGITAL: {
386392
self.sensorData.DIGITAL[port] = value;
@@ -408,8 +414,6 @@ Module.prototype.handleLocalData = function (data) {
408414
}
409415
case self.sensorTypes.ULTRASONIC: {
410416
self.sensorData.ULTRASONIC[port] = value;
411-
// console.log(port);
412-
// console.log(self.sensorData.ULTRASONIC[port]);
413417
break;
414418
}
415419
case self.sensorTypes.DUST: {
@@ -426,14 +430,12 @@ Module.prototype.handleLocalData = function (data) {
426430
}
427431
case self.sensorTypes.RFIDTAP: {
428432
self.sensorData.RFIDTAP = value;
429-
// console.log('RFIDTAP');
430-
// console.log(value);
431433
break;
432434
}
433435
case self.sensorTypes.RFIDVALUE: {
434436
value = value.substring(0, value.length - 1); //마지막에 쓰레기값 출력X
435437
self.sensorData.RFIDVALUE = value;
436-
// console.log(value);
438+
// console.log(readData);
437439
break;
438440
}
439441
case self.sensorTypes.MLXOBJ: {
@@ -455,20 +457,17 @@ Module.prototype.handleLocalData = function (data) {
455457
ff 55 len idx action device port slot data a
456458
0 1 2 3 4 5 6 7 8
457459
*/
458-
460+
// 엔트리 블럭 화면에서 입력에 해당하는 블럭을 사용했을 때, 펌웨어쪽으로 보내는 Buffer
459461
Module.prototype.makeSensorReadBuffer = function (device, port, data) {
460462
let buffer;
461463
const dummy = new Buffer([10]);
462464
if (device == this.sensorTypes.DIGITAL) {
463465
//data 2: pull up, 0: normal
464-
//console.log(data)
465466
buffer = new Buffer([255, 85, 6, sensorIdx, this.actionTypes.GET, device, port, data, 10]);
466467
} else if (device == this.sensorTypes.PULLUP) {
467468
//data 2: pull up, 0: normal
468-
//console.log(data)
469469
//pullup인 경우
470470
buffer = new Buffer([255, 85, 6, sensorIdx, this.actionTypes.GET, device, port, data, 10]);
471-
//console.log(buffer);
472471
} else if (device == this.sensorTypes.RFIDTAP) {
473472
buffer = new Buffer([255, 85, 5, sensorIdx, this.actionTypes.GET, device, port, 10]);
474473
} else if (device == this.sensorTypes.ULTRASONIC) {
@@ -524,6 +523,8 @@ Module.prototype.makeSensorReadBuffer = function (device, port, data) {
524523
};
525524

526525
//0xff 0x55 0x6 0x0 0x1 0xa 0x9 0x0 0x0 0xa
526+
527+
// 엔트리 블럭 화면에서 출력에 해당하는 블럭을 사용했을 때, 펌웨어쪽으로 보내는 Buffer
527528
Module.prototype.makeOutputBuffer = function (device, port, data) {
528529
let buffer;
529530
const value = new Buffer(2);
@@ -684,13 +685,12 @@ Module.prototype.makeOutputBuffer = function (device, port, data) {
684685

685686
// buffer = Buffer.from([255, 85, 26, sensorIdx, this.actionTypes.MODUEL, device, port]);
686687
// buffer = Buffer.concat([buffer, fndBlockIndex, fndClk, fndDio, fndBrightnessLev, fndOnOff, fndDisplayStrLength, fndDisplayStr0, fndDisplayStr1, fndDisplayStr2, fndDisplayStr3, fndDelayMs, dummy]);
687-
// console.log(buffer);
688+
688689
// break;
689690
// }
690691

691692

692693
case this.sensorTypes.NEOPIXELINIT: {
693-
console.log('NEOPIXELINIT');
694694
value.writeInt16LE(data);
695695
buffer = new Buffer([255, 85, 6, sensorIdx, this.actionTypes.SET, device, port]);
696696
buffer = Buffer.concat([buffer, value, dummy]);
@@ -914,7 +914,6 @@ Module.prototype.makeOutputBuffer = function (device, port, data) {
914914
case this.sensorTypes.DOTMATRIXCLEAR: {
915915
buffer = new Buffer([255, 85, 4, sensorIdx, this.actionTypes.SET, device, port]);
916916
buffer = Buffer.concat([buffer, dummy]);
917-
console.log(buffer);
918917
break;
919918
}
920919
case this.sensorTypes.LCDINIT: {
@@ -946,7 +945,6 @@ Module.prototype.makeOutputBuffer = function (device, port, data) {
946945

947946
if ($.isPlainObject(data)) {
948947
textLen = ('' + data.text).length;
949-
// console.log(textLen);
950948
text = Buffer.from('' + data.text, 'ascii');
951949
line.writeInt16LE(data.line);
952950
textLenBuf.writeInt16LE(textLen);
@@ -1064,7 +1062,6 @@ Module.prototype.makeOutputBuffer = function (device, port, data) {
10641062
} else {
10651063
num.writeFloatLE(0);
10661064
}
1067-
console.log(num);
10681065
buffer = new Buffer([255, 85, 8, sensorIdx, this.actionTypes.SET, device, port]);
10691066
buffer = Buffer.concat([buffer, num, dummy]);
10701067

@@ -1096,6 +1093,9 @@ Module.prototype.getDataByBuffer = function (buffer) {
10961093
if (value == 13 && buffer[idx + 1] == 10) {
10971094
datas.push(buffer.subarray(lastIndex, idx));
10981095
lastIndex = idx + 2;
1096+
// if(buffer[idx-1] == 9)
1097+
// console.log(datas);
1098+
10991099
}
11001100
});
11011101

@@ -1119,4 +1119,4 @@ Module.prototype.reset = function () {
11191119

11201120
Module.prototype.lostController = function () {};
11211121

1122-
module.exports = new Module();
1122+
module.exports = new Module();

app/modules/dalgona.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"id": "540101",
33
"name": {
4-
"en": "dalgona board",
5-
"ko": "달고나 제어보드"
4+
"en": "Dalgona.Edu Plus",
5+
"ko": "달고나.에듀 Plus"
66
},
77
"category": "board",
88
"platform": ["win32", "darwin"],

app/modules/runcoding.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"id": "170101",
33
"name": {
44
"en": "runcoding",
5-
"ko": "런코딩"
5+
"ko": "코마크레 런코딩"
66
},
77
"category": "board",
88
"platform": ["win32", "darwin"],
@@ -17,13 +17,12 @@
1717
"email": "[email protected]",
1818
"reconnect": true,
1919
"firmware": "runcoding",
20-
"selectPort": true,
2120
"hardware": {
2221
"type": "serial",
2322
"control": "slave",
2423
"duration": 32,
2524
"vendor": ["Arduino", "wch.cn", "FTDI"],
26-
"baudRate": 115200,
25+
"baudRate": 38400,
2726
"firmwarecheck": false,
2827
"byteDelimiter": [13, 10]
2928
}

app/modules/runcoding.png

42.5 KB
Loading

0 commit comments

Comments
 (0)