Skip to content
This repository was archived by the owner on Jun 18, 2021. It is now read-only.

Commit 3a6b84b

Browse files
committed
Fixing bugs and new windows cert
1 parent 600a75a commit 3a6b84b

File tree

6 files changed

+280
-250
lines changed

6 files changed

+280
-250
lines changed

blockly/blockly/generators/arduino/neo_pixel.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,15 @@ Blockly.Arduino['neo_pixel_setup'] = function (block) {
2626

2727
Blockly.Arduino['neo_pixel_set_color'] = function(block) {
2828
Blockly.Arduino.functionNames_['set_color'] = '\n\nvoid setNeoPixelColor(double pos, RGB color) {\n' +
29+
'\tpos = pos <= 0 ? 0 : pos;\n' +
30+
'\tpos = pos >= 1 ? pos - 1 : pos;\n' +
2931
'\tpixels.setPixelColor((int)pos, color.red, color.green, color.blue);\n' +
3032
'\tpixels.show();\n' +
3133
'}\n';
3234

3335
var color = Blockly.Arduino.valueToCode(block, 'COLOR', Blockly.Arduino.ORDER_ATOMIC);
34-
var position = Blockly.Arduino.valueToCode(block, 'POSITION', Blockly.Arduino.ORDER_ATOMIC);
3536

36-
position = parseInt(position) > 0 ? parseInt(position) - 1 : 0;
37+
var position = Blockly.Arduino.valueToCode(block, 'POSITION', Blockly.Arduino.ORDER_ATOMIC);
3738

3839
return '\tsetNeoPixelColor(' + position + ',' + color + ');\n';
39-
};
40+
};

blockly/blockly/msg/json/en.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"@metadata": {
33
"author": "Ellen Spertus <ellen.spertus@gmail.com>",
4-
"lastupdated": "2019-01-26 12:48:57.587855",
4+
"lastupdated": "2019-05-06 22:21:22.642962",
55
"locale": "en",
66
"messagedocumentation" : "qqq"
77
},

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "ElectroBlocks",
33
"productName": "ElectroBlocks A Blockly Based Arduino IDE",
44
"email": "Noah Glaser",
5-
"version": "2.0.8",
5+
"version": "2.0.9",
66
"description": "An ide for developing arduino code with blockly.",
77
"main": "app.js",
88
"author": "Noah Glaser",

view/blockly/arduino_compressed.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)