diff --git a/data/minifigs.json b/data/minifigs.json index 22126a3..183e0f9 100644 --- a/data/minifigs.json +++ b/data/minifigs.json @@ -6,5 +6,7 @@ "40 42 b2 2a 49 80": "Slimer", "ed 0c 32 75 40 84": "Bane", "d4 61 82 55 42 80": "Lloyd", - "54 60 a2 5b 49 81": "Krusty-the-Clown" + "54 60 a2 5b 49 81": "Krusty-the-Clown", + "87 b8 1a 7f 49 80": "Peter Venkman", + "0a 2e aa 5c 49 81": "Kai" } \ No newline at end of file diff --git a/src/toypad.js b/src/toypad.js index 9707e4c..95a3dd6 100644 --- a/src/toypad.js +++ b/src/toypad.js @@ -103,11 +103,13 @@ class ToyPad extends EventEmitter { this.emit("connect"); } else if (cmd == Command.ACTION) { - let action = data[5]; + let action = data[5], + sig = ToyPad._bufferToHexString(data.slice(7, 13)); let emitPayload = { panel: data[2], - sig: ToyPad._bufferToHexString(data.slice(7, 13)) + sig: sig, + recognized: !!minifigData[sig] }; if (action == Action.ADD) {