Skip to content

Commit

Permalink
231122_동작개선 및 블럭 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
cdp404 committed Nov 22, 2023
1 parent 0643089 commit 5375925
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions app/modules/KKMOO.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,15 @@ class KKMOO extends BaseModule {
}
handleLocalData(data) {
const received = data.toString("ascii");
if (received.includes("entry:")) {
if (received.includes("true")) {
this.isPlaying = "true";
if (received.includes('entry:')) {
if (received.includes('true')) {
this.isPlaying = 'true';
}
else {
this.isPlaying = "false";
this.isPlaying = 'false';
}
}
if (received.includes("ATfinRobot")) {
if (received.includes('ATfinRobot')) {
//console.log("ATfinRobot");
this.buffercnt++;
if (this.sendBuffer[this.buffercnt] != null) {
Expand All @@ -74,7 +74,7 @@ class KKMOO extends BaseModule {
}
}
requestRemoteData(handler) {
handler.write("data", this.isPlaying);
handler.write('data', this.isPlaying);
}

// 엔트리에서 받은 데이터에 대한 처리
Expand Down Expand Up @@ -110,9 +110,9 @@ class KKMOO extends BaseModule {
if (angle < 0) {
angle = 4096 + angle;
}
motnum = motnum.toString(16).padStart(2, '0')
motnum = motnum.toString(16).padStart(2, '0');
msg += motnum;
angle = angle.toString(16).padStart(3, '0')
angle = angle.toString(16).padStart(3, '0');
msg += angle;

var cmd = "^AN" + msg;

Check warning on line 118 in app/modules/KKMOO.js

View workflow job for this annotation

GitHub Actions / runner / eslint

[eslint] reported by reviewdog 🐶 Unexpected var, use let or const instead. Raw Output: {"ruleId":"no-var","severity":1,"message":"Unexpected var, use let or const instead.","line":118,"column":21,"nodeType":"VariableDeclaration","endLine":118,"endColumn":43}

Check warning on line 118 in app/modules/KKMOO.js

View workflow job for this annotation

GitHub Actions / runner / eslint

[eslint] reported by reviewdog 🐶 Strings must use singlequote. Raw Output: {"ruleId":"quotes","severity":1,"message":"Strings must use singlequote.","line":118,"column":31,"nodeType":"Literal","endLine":118,"endColumn":36,"fix":{"range":[3448,3453],"text":"'^AN'"}}

Check warning on line 118 in app/modules/KKMOO.js

View workflow job for this annotation

GitHub Actions / runner / eslint

[eslint] reported by reviewdog 🐶 Unexpected string concatenation. Raw Output: {"ruleId":"prefer-template","severity":1,"message":"Unexpected string concatenation.","line":118,"column":31,"nodeType":"BinaryExpression","endLine":118,"endColumn":42,"fix":{"range":[3448,3459],"text":"`^AN${ msg}`"}}
Expand Down

0 comments on commit 5375925

Please sign in to comment.