Skip to content

Commit 5a8ad42

Browse files
committed
add Qx names for Jolt.js in blockly
1 parent 528729a commit 5a8ad42

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

blockly/blockly_espruino.js

+18-2
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,24 @@ Blockly.setBoardJSON = function(info) {
127127
for (i in info.pins)
128128
if (!("NO_BLOCKLY" in info.pins[i].functions))
129129
PINS.push([info.pins[i].name, info.pins[i].name]);
130-
131-
130+
/* Quick hack for Jolt.js, at least until we have some
131+
other way of putting this in JSON */
132+
if (info.info && info.info.name=="Jolt.js") {
133+
PINS.push(["Q0 SDA", "Q0.sda"]);
134+
PINS.push(["Q0 SCL", "Q0.scl"]);
135+
PINS.push(["Q0 FET", "Q0.fet"]);
136+
PINS.push(["Q1 SDA", "Q1.sda"]);
137+
PINS.push(["Q1 SCL", "Q1.scl"]);
138+
PINS.push(["Q1 FET", "Q1.fet"]);
139+
PINS.push(["Q2 SDA", "Q2.sda"]);
140+
PINS.push(["Q2 SCL", "Q2.scl"]);
141+
PINS.push(["Q2 GND", "Q2.gnd"]);
142+
PINS.push(["Q2 VCC", "Q2.vcc"]);
143+
PINS.push(["Q3 SDA", "Q3.sda"]);
144+
PINS.push(["Q3 SCL", "Q3.scl"]);
145+
PINS.push(["Q3 GND", "Q3.gnd"]);
146+
PINS.push(["Q3 VCC", "Q3.vcc"]);
147+
}
132148
};
133149
// ---------------------------------
134150

0 commit comments

Comments
 (0)