Commit 75d1c3d7 authored by carlosperate's avatar carlosperate

Minor modifications to set up for a release version.

parent 1856f765
...@@ -29,7 +29,7 @@ Ardublockly.init = function() { ...@@ -29,7 +29,7 @@ Ardublockly.init = function() {
// Inject Blockly into content_blocks and fetch additional blocks // Inject Blockly into content_blocks and fetch additional blocks
Ardublockly.injectBlockly(document.getElementById('content_blocks'), Ardublockly.injectBlockly(document.getElementById('content_blocks'),
Ardublockly.TOOLBOX_XML, '../blockly/'); Ardublockly.TOOLBOX_XML, '../blockly/');
Ardublockly.importExtraBlocks(); //Ardublockly.importExtraBlocks();
Ardublockly.designJsInit(); Ardublockly.designJsInit();
Ardublockly.initialiseIdeButtons(); Ardublockly.initialiseIdeButtons();
...@@ -667,7 +667,11 @@ Ardublockly.isToolboxVisible = function() { ...@@ -667,7 +667,11 @@ Ardublockly.isToolboxVisible = function() {
return Ardublockly.TOOLBAR_SHOWING_; return Ardublockly.TOOLBAR_SHOWING_;
}; };
/** Lazy loads the additional blocks from the ./block directory. */ /**
* Lazy loads the additional block JS files from the ./block directory.
* Initialises any additional Ardublockly extensions.
* TODO: Loads the examples into the examples modal
*/
Ardublockly.importExtraBlocks = function() { Ardublockly.importExtraBlocks = function() {
/** /**
* Parses the JSON data to find the block and languages js files. * Parses the JSON data to find the block and languages js files.
......
...@@ -91,7 +91,7 @@ Blockly.Arduino.DEF_FUNC_NAME = Blockly.Arduino.FUNCTION_NAME_PLACEHOLDER_; ...@@ -91,7 +91,7 @@ Blockly.Arduino.DEF_FUNC_NAME = Blockly.Arduino.FUNCTION_NAME_PLACEHOLDER_;
Blockly.Arduino.init = function(workspace) { Blockly.Arduino.init = function(workspace) {
// Create a dictionary of definitions to be printed at the top of the sketch // Create a dictionary of definitions to be printed at the top of the sketch
Blockly.Arduino.includes_ = Object.create(null); Blockly.Arduino.includes_ = Object.create(null);
// Create a dictionary of definitions to be printed after variable definitions // Create a dictionary of global definitions to be printed after variables
Blockly.Arduino.definitions_ = Object.create(null); Blockly.Arduino.definitions_ = Object.create(null);
// Create a dictionary of functions from the code generator // Create a dictionary of functions from the code generator
Blockly.Arduino.codeFunctions_ = Object.create(null); Blockly.Arduino.codeFunctions_ = Object.create(null);
...@@ -259,7 +259,7 @@ Blockly.Arduino.reservePin = function(block, pin, pinType, warningTag) { ...@@ -259,7 +259,7 @@ Blockly.Arduino.reservePin = function(block, pin, pinType, warningTag) {
if (Blockly.Arduino.pins_[pin] != pinType) { if (Blockly.Arduino.pins_[pin] != pinType) {
block.setWarningText( block.setWarningText(
'Pin ' + pin + ' is needed for ' + warningTag + ' as pin ' + pinType + 'Pin ' + pin + ' is needed for ' + warningTag + ' as pin ' + pinType +
'. Already used as ' + Blockly.Arduino.pins_[pin] + '.', warningTag); '.\nAlready used as ' + Blockly.Arduino.pins_[pin] + '.', warningTag);
} else { } else {
block.setWarningText(null, warningTag); block.setWarningText(null, warningTag);
} }
...@@ -361,8 +361,8 @@ Blockly.Arduino.getArduinoType_ = function(typeBlockly) { ...@@ -361,8 +361,8 @@ Blockly.Arduino.getArduinoType_ = function(typeBlockly) {
return 'undefined'; return 'undefined';
case Blockly.Types.CHILD_BLOCK_MISSING.typeName: case Blockly.Types.CHILD_BLOCK_MISSING.typeName:
// If no block connected default to int, change for easier debugging // If no block connected default to int, change for easier debugging
return 'ChildBlockMissing'; //return 'ChildBlockMissing';
//return 'int'; return 'int';
default: default:
return 'Invalid Blockly Type'; return 'Invalid Blockly Type';
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment