diff --git a/src/extensions/scratch3_ev3/index.js b/src/extensions/scratch3_ev3/index.js index 4bea1bb17..f09b496b8 100644 --- a/src/extensions/scratch3_ev3/index.js +++ b/src/extensions/scratch3_ev3/index.js @@ -76,9 +76,9 @@ const Ev3Opcode = { * @enum {number} */ const Ev3ByteValue = { - NUM8: 0x81, // = 0b1000-001 = 1 byte to follow - NUM16: 0x82, // = 0b1000-010 = 2 bytes to follow - NUM32: 0x83, // = 0b1000-011 = 4 bytes to follow + NUM8: 0x81, // = 0b1000-001 = 1 byte to follow // TODO: rename + NUM16: 0x82, // = 0b1000-010 = 2 bytes to follow // TODO: rename + NUM32: 0x83, // = 0b1000-011 = 4 bytes to follow // TODO: rename GLOBAL8: 0xE1, // = 0b1110-001 = size of global var - 1 byte to follow GLOBAL_INDEX_0: 0x20 // = 0b00100000 = global var index "0" }; @@ -735,7 +735,7 @@ class EV3 { if (this._pollingCounter % 20 === 0) { // GET DEVICE LIST cmds[0] = Ev3Opcode.OPINPUT_DEVICE_LIST; - cmds[1] = Ev3ByteValue.NUM8; // 1 byte to follow + cmds[1] = Ev3ByteValue.NUM8; cmds[2] = 33; // 0x21 ARRAY // TODO: document cmds[3] = 96; // 0x60 CHANGED // TODO: document cmds[4] = Ev3ByteValue.GLOBAL8; @@ -818,9 +818,7 @@ class EV3 { _onMessage (params) { const message = params.message; const data = Base64Util.base64ToUint8Array(message); - // log.info(`received array: ${array}`); - // TODO: Is this the correct check? if (data[4] !== Ev3Command.DIRECT_REPLY) { return; }