Skip to content

Commit

Permalink
Minor modifications to set up for a release version.
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosperate committed Feb 21, 2016
1 parent 1856f76 commit 75d1c3d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
8 changes: 6 additions & 2 deletions ardublockly/ardublockly.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Ardublockly.init = function() {
// Inject Blockly into content_blocks and fetch additional blocks
Ardublockly.injectBlockly(document.getElementById('content_blocks'),
Ardublockly.TOOLBOX_XML, '../blockly/');
Ardublockly.importExtraBlocks();
//Ardublockly.importExtraBlocks();

Ardublockly.designJsInit();
Ardublockly.initialiseIdeButtons();
Expand Down Expand Up @@ -667,7 +667,11 @@ Ardublockly.isToolboxVisible = function() {
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() {
/**
* Parses the JSON data to find the block and languages js files.
Expand Down
8 changes: 4 additions & 4 deletions blockly/generators/arduino.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ Blockly.Arduino.DEF_FUNC_NAME = Blockly.Arduino.FUNCTION_NAME_PLACEHOLDER_;
Blockly.Arduino.init = function(workspace) {
// Create a dictionary of definitions to be printed at the top of the sketch
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);
// Create a dictionary of functions from the code generator
Blockly.Arduino.codeFunctions_ = Object.create(null);
Expand Down Expand Up @@ -259,7 +259,7 @@ Blockly.Arduino.reservePin = function(block, pin, pinType, warningTag) {
if (Blockly.Arduino.pins_[pin] != pinType) {
block.setWarningText(
'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 {
block.setWarningText(null, warningTag);
}
Expand Down Expand Up @@ -361,8 +361,8 @@ Blockly.Arduino.getArduinoType_ = function(typeBlockly) {
return 'undefined';
case Blockly.Types.CHILD_BLOCK_MISSING.typeName:
// If no block connected default to int, change for easier debugging
return 'ChildBlockMissing';
//return 'int';
//return 'ChildBlockMissing';
return 'int';
default:
return 'Invalid Blockly Type';
}
Expand Down

0 comments on commit 75d1c3d

Please sign in to comment.