From 5a8ad429aca90fa9a944c864266ac8bf492e9275 Mon Sep 17 00:00:00 2001 From: Gordon Williams Date: Wed, 9 Oct 2024 15:12:46 +0100 Subject: [PATCH] add Qx names for Jolt.js in blockly --- blockly/blockly_espruino.js | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/blockly/blockly_espruino.js b/blockly/blockly_espruino.js index 3e3a8fdf..e372ed8b 100644 --- a/blockly/blockly_espruino.js +++ b/blockly/blockly_espruino.js @@ -127,8 +127,24 @@ Blockly.setBoardJSON = function(info) { for (i in info.pins) if (!("NO_BLOCKLY" in info.pins[i].functions)) PINS.push([info.pins[i].name, info.pins[i].name]); - - + /* Quick hack for Jolt.js, at least until we have some + other way of putting this in JSON */ + if (info.info && info.info.name=="Jolt.js") { + PINS.push(["Q0 SDA", "Q0.sda"]); + PINS.push(["Q0 SCL", "Q0.scl"]); + PINS.push(["Q0 FET", "Q0.fet"]); + PINS.push(["Q1 SDA", "Q1.sda"]); + PINS.push(["Q1 SCL", "Q1.scl"]); + PINS.push(["Q1 FET", "Q1.fet"]); + PINS.push(["Q2 SDA", "Q2.sda"]); + PINS.push(["Q2 SCL", "Q2.scl"]); + PINS.push(["Q2 GND", "Q2.gnd"]); + PINS.push(["Q2 VCC", "Q2.vcc"]); + PINS.push(["Q3 SDA", "Q3.sda"]); + PINS.push(["Q3 SCL", "Q3.scl"]); + PINS.push(["Q3 GND", "Q3.gnd"]); + PINS.push(["Q3 VCC", "Q3.vcc"]); + } }; // ---------------------------------