Commit 31c60dcf authored by Carlos Pereira Atencio's avatar Carlos Pereira Atencio Committed by carlospamg

Update to the "Arduino" app:

  Removed generators for js, python and dard.
  Added Arduino specif js block generators
  Change javascript namespace to the name of this app (from "code", the old app name)
parent 056bb99e
/**
* Blockly Apps: Code
* Blockly Apps: Arduino Code
*
* Copyright 2012 Google Inc.
* https://blockly.googlecode.com/
* Based on the "Code" app developed by: fraser@google.com (Neil Fraser)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview JavaScript for Blockly's Code application.
* @author fraser@google.com (Neil Fraser)
*/
// Supported languages.
......@@ -33,21 +17,21 @@ document.write('<script type="text/javascript" src="generated/' +
/**
* Create a namespace for the application.
*/
var Code = {};
var Arduino = {};
/**
* List of tab names.
* @private
*/
Code.TABS_ = ['blocks', 'arduino', 'javascript', 'python', 'dart', 'xml'];
Arduino.TABS_ = ['blocks', 'arduino', 'xml'];
Code.selected = 'blocks';
Arduino.selected = 'blocks';
/**
* Switch the visible pane when a tab is clicked.
* @param {string} clickedName Name of tab clicked.
*/
Code.tabClick = function(clickedName) {
Arduino.tabClick = function(clickedName) {
// If the XML tab was open, save and render the content.
if (document.getElementById('tab_xml').className == 'tabon') {
var xmlTextarea = document.getElementById('content_xml');
......@@ -70,27 +54,27 @@ Code.tabClick = function(clickedName) {
}
// Deselect all tabs and hide all panes.
for (var i = 0; i < Code.TABS_.length; i++) {
var name = Code.TABS_[i];
for (var i = 0; i < Arduino.TABS_.length; i++) {
var name = Arduino.TABS_[i];
document.getElementById('tab_' + name).className = 'taboff';
document.getElementById('content_' + name).style.visibility = 'hidden';
}
// Select the active tab.
Code.selected = clickedName;
Arduino.selected = clickedName;
document.getElementById('tab_' + clickedName).className = 'tabon';
// Show the selected pane.
document.getElementById('content_' + clickedName).style.visibility =
'visible';
Code.renderContent();
Arduino.renderContent();
Blockly.fireUiEvent(window, 'resize');
};
/**
* Populate the currently selected pane with content generated from the blocks.
*/
Code.renderContent = function() {
var content = document.getElementById('content_' + Code.selected);
Arduino.renderContent = function() {
var content = document.getElementById('content_' + Arduino.selected);
// Initialize the pane.
if (content.id == 'content_xml') {
var xmlTextarea = document.getElementById('content_xml');
......@@ -106,45 +90,21 @@ Code.renderContent = function() {
code = prettyPrintOne(code, 'js');
content.innerHTML = code;
}
} else if (content.id == 'content_javascript') {
var code = Blockly.JavaScript.workspaceToCode();
content.textContent = code;
if (typeof prettyPrintOne == 'function') {
code = content.innerHTML;
code = prettyPrintOne(code, 'js');
content.innerHTML = code;
}
} else if (content.id == 'content_python') {
code = Blockly.Python.workspaceToCode();
content.textContent = code;
if (typeof prettyPrintOne == 'function') {
code = content.innerHTML;
code = prettyPrintOne(code, 'py');
content.innerHTML = code;
}
} else if (content.id == 'content_dart') {
code = Blockly.Dart.workspaceToCode();
content.textContent = code;
if (typeof prettyPrintOne == 'function') {
code = content.innerHTML;
code = prettyPrintOne(code, 'dart');
content.innerHTML = code;
}
}
};
/**
* Initialize Blockly. Called on page load.
*/
Code.init = function() {
Arduino.init = function() {
BlocklyApps.init();
var rtl = BlocklyApps.isRtl();
var container = document.getElementById('content_area');
var onresize = function(e) {
var bBox = BlocklyApps.getBBox_(container);
for (var i = 0; i < Code.TABS_.length; i++) {
var el = document.getElementById('content_' + Code.TABS_[i]);
for (var i = 0; i < Arduino.TABS_.length; i++) {
var el = document.getElementById('content_' + Arduino.TABS_[i]);
el.style.top = bBox.y + 'px';
el.style.left = bBox.x + 'px';
// Height and width need to be set, read back, then set again to
......@@ -169,10 +129,6 @@ Code.init = function() {
rtl: rtl,
toolbox: toolbox});
// Add to reserved word list: Local variables in execution evironment (runJS)
// and the infinite loop detection function.
Blockly.JavaScript.addReservedWords('code,timeouts,checkTimeout');
BlocklyApps.loadBlocks('');
if ('BlocklyStorage' in window) {
......@@ -180,17 +136,17 @@ Code.init = function() {
BlocklyStorage.backupOnUnload();
}
Code.tabClick(Code.selected);
Arduino.tabClick(Arduino.selected);
Blockly.fireUiEvent(window, 'resize');
BlocklyApps.bindClick('trashButton',
function() {Code.discard(); Code.renderContent();});
BlocklyApps.bindClick('runButton', Code.runJS);
function() {Arduino.discard(); Arduino.renderContent();});
BlocklyApps.bindClick('runButton', Arduino.loadToArduino);
for (var i = 0; i < Code.TABS_.length; i++) {
var name = Code.TABS_[i];
for (var i = 0; i < Arduino.TABS_.length; i++) {
var name = Arduino.TABS_[i];
BlocklyApps.bindClick('tab_' + name,
function(name_) {return function() {Code.tabClick(name_);};}(name));
function(name_) {return function() {Arduino.tabClick(name_);};}(name));
}
// Lazy-load the syntax-highlighting.
......@@ -200,34 +156,21 @@ Code.init = function() {
if (window.location.pathname.match(/readonly.html$/)) {
window.addEventListener('load', BlocklyApps.initReadonly);
} else {
window.addEventListener('load', Code.init);
window.addEventListener('load', Arduino.init);
}
/**
* Execute the user's code.
* Just a quick and dirty eval. Catch infinite loops.
*/
Code.runJS = function() {
Blockly.JavaScript.INFINITE_LOOP_TRAP = ' checkTimeout();\n';
var timeouts = 0;
var checkTimeout = function() {
if (timeouts++ > 1000000) {
throw BlocklyApps.getMsg('Code_timeout');
}
};
var code = Blockly.JavaScript.workspaceToCode();
Blockly.JavaScript.INFINITE_LOOP_TRAP = null;
try {
eval(code);
} catch (e) {
alert(BlocklyApps.getMsg('Code_badCode').replace('%1', e));
}
Arduino.loadToArduino = function() {
// TODO
};
/**
* Discard all blocks from the workspace.
*/
Code.discard = function() {
Arduino.discard = function() {
var count = Blockly.mainWorkspace.getAllBlocks().length;
if (count < 2 ||
window.confirm(BlocklyApps.getMsg('Code_discard').replace('%1', count))) {
......
......@@ -41,15 +41,15 @@ codepage.messages = function(opt_data, opt_ignored, opt_ijData) {
codepage.start = function(opt_data, opt_ignored, opt_ijData) {
return codepage.messages(null, null, opt_ijData) + '<script type="text/javascript" src="../../blockly_compressed.js"><\/script><script type="text/javascript" src="../../blocks_compressed.js"><\/script><script type="text/javascript" src="../../generators/arduino.js"><\/script><script type="text/javascript" src="../../generators/arduino/base.js"><\/script><script type="text/javascript" src="../../generators/arduino/control.js"><\/script><script type="text/javascript" src="../../generators/arduino/logic.js"><\/script><!--script type="text/javascript" src="../../generators/arduino/loops.js"></script--><script type="text/javascript" src="../../generators/arduino/math.js"><\/script><script type="text/javascript" src="../../generators/arduino/text.js"><\/script><script type="text/javascript" src="../../generators/arduino/lists.js"><\/script><script type="text/javascript" src="../../generators/arduino/colour.js"><\/script><script type="text/javascript" src="../../generators/arduino/variables.js"><\/script><script type="text/javascript" src="../../generators/arduino/procedures.js"><\/script><script type="text/javascript" src="../../javascript_compressed.js"><\/script><script type="text/javascript" src="../../python_compressed.js"><\/script><script type="text/javascript" src="../../dart_compressed.js"><\/script><script type="text/javascript" src="../../' + soy.$$escapeHtml(opt_ijData.langSrc) + '"><\/script><table width="100%" height="100%"><tr><td><h1><span id="title"><a href="../index.html?lang=' + soy.$$escapeHtml(opt_ijData.lang) + '">Blockllllly</a> : Code</span></h1></td><td class="farSide"><select id="languageMenu"></select></td></tr><tr><td colspan=2><table width="100%"><tr id="tabRow" height="1em"><td id="tab_blocks" class="tabon">Blocks</td><td class="tabmin">&nbsp;</td><td id="tab_arduino" class="taboff">Arduino</td><td class="tabmin">&nbsp;</td><td id="tab_javascript" class="taboff">JavaScript</td><td class="tabmin">&nbsp;</td><td id="tab_python" class="taboff">Python</td><td class="tabmin">&nbsp;</td><td id="tab_dart" class="taboff">Dart</td><td class="tabmin">&nbsp;</td><td id="tab_xml" class="taboff">XML</td><td class="tabmax"><button id="trashButton" class="notext" title="Discard all blocks."><img src=\'../../media/1x1.gif\' class="trash icon21"></button> <button id="linkButton" class="notext" title="Save and link to blocks."><img src=\'../../media/1x1.gif\' class="link icon21"></button> <button id="runButton" class="notext primary" title="Run the program defined by the blocks in the workspace."><img src=\'../../media/1x1.gif\' class="run icon21"></button></td></tr></table></td></tr><tr><td height="99%" colspan=2 id="content_area">' + codepage.toolbox(null, null, opt_ijData) + '</td></tr></table><div id="content_blocks" class="content"></div><pre id="content_arduino" class="content"></pre><pre id="content_javascript" class="content"></pre><pre id="content_python" class="content"></pre><pre id="content_dart" class="content"></pre><textarea id="content_xml" class="content" wrap="off"></textarea>' + apps.dialog(null, null, opt_ijData) + apps.storageDialog(null, null, opt_ijData);
return codepage.messages(null, null, opt_ijData) + '<script type="text/javascript" src="../../blockly_uncompressed.js"><\/script><script type="text/javascript" src="../../blocks_compressed.js"><\/script><script type="text/javascript" src="../../generators/arduino.js"><\/script><script type="text/javascript" src="../../generators/arduino/base.js"><\/script><script type="text/javascript" src="../../generators/arduino/io.js"><\/script><script type="text/javascript" src="../../generators/arduino/lists.js"><\/script><script type="text/javascript" src="../../generators/arduino/logic.js"><\/script><script type="text/javascript" src="../../generators/arduino/loops.js"><\/script><script type="text/javascript" src="../../generators/arduino/math.js"><\/script><script type="text/javascript" src="../../generators/arduino/procedures.js"><\/script><script type="text/javascript" src="../../generators/arduino/text.js"><\/script><script type="text/javascript" src="../../generators/arduino/time.js"><\/script><script type="text/javascript" src="../../generators/arduino/variables.js"><\/script><script type="text/javascript" src="../../' + soy.$$escapeHtml(opt_ijData.langSrc) + '"><\/script><table width="100%" height="100%"><tr><td><h1><span id="title"><a href="../index.html?lang=' + soy.$$escapeHtml(opt_ijData.lang) + '">Blockly</a> : Code</span></h1></td><td class="farSide"><select id="languageMenu"></select></td></tr><tr><td colspan=2><table width="100%"><tr id="tabRow" height="1em"><td id="tab_blocks" class="tabon">Blocks</td><td class="tabmin">&nbsp;</td><td id="tab_arduino" class="taboff">Arduino</td><td class="tabmin">&nbsp;</td><td id="tab_xml" class="taboff">XML</td><td class="tabmax"><button id="trashButton" class="notext" title="Discard all blocks."><img src=\'../../media/1x1.gif\' class="trash icon21"></button> <button id="linkButton" class="notext" title="Save and link to blocks."><img src=\'../../media/1x1.gif\' class="link icon21"></button> <button id="runButton" class="notext primary" title="Run the program defined by the blocks in the workspace."><img src=\'../../media/1x1.gif\' class="run icon21"></button></td></tr></table></td></tr><tr><td height="99%" colspan=2 id="content_area">' + codepage.toolbox(null, null, opt_ijData) + '</td></tr></table><div id="content_blocks" class="content"></div><pre id="content_arduino" class="content"></pre><textarea id="content_xml" class="content" wrap="off"></textarea>' + apps.dialog(null, null, opt_ijData) + apps.storageDialog(null, null, opt_ijData);
};
codepage.toolbox = function(opt_data, opt_ignored, opt_ijData) {
return '<xml id="toolbox" style="display: none"><category name="Logic"><block type="controls_if"></block><block type="logic_compare"></block><block type="logic_operation"></block><block type="logic_negate"></block><block type="logic_boolean"></block><block type="logic_null"></block><block type="logic_ternary"></block></category><category name="Loops"><block type="controls_repeat_ext"><value name="TIMES"><block type="math_number"><field name="NUM">10</field></block></value></block><block type="controls_whileUntil"></block><block type="controls_for"><value name="FROM"><block type="math_number"><field name="NUM">1</field></block></value><value name="TO"><block type="math_number"><field name="NUM">10</field></block></value><value name="BY"><block type="math_number"><field name="NUM">1</field></block></value></block><block type="controls_forEach"></block><block type="controls_flow_statements"></block></category><category name="Math"><block type="math_number"></block><block type="math_arithmetic"></block><block type="math_single"></block><block type="math_trig"></block><block type="math_constant"></block><block type="math_number_property"></block><block type="math_change"><value name="DELTA"><block type="math_number"><field name="NUM">1</field></block></value></block><block type="math_round"></block><block type="math_on_list"></block><block type="math_modulo"></block><block type="math_constrain"><value name="LOW"><block type="math_number"><field name="NUM">1</field></block></value><value name="HIGH"><block type="math_number"><field name="NUM">100</field></block></value></block><block type="math_random_int"><value name="FROM"><block type="math_number"><field name="NUM">1</field></block></value><value name="TO"><block type="math_number"><field name="NUM">100</field></block></value></block><block type="math_random_float"></block></category><category name="Text"><block type="text"></block><block type="text_join"></block><block type="text_append"><value name="TEXT"><block type="text"></block></value></block><block type="text_length"></block><block type="text_isEmpty"></block><block type="text_indexOf"><value name="VALUE"><block type="variables_get"><field name="VAR">text</field></block></value></block><block type="text_charAt"><value name="VALUE"><block type="variables_get"><field name="VAR">text</field></block></value></block><block type="text_getSubstring"><value name="STRING"><block type="variables_get"><field name="VAR">text</field></block></value></block><block type="text_changeCase"></block><block type="text_trim"></block><block type="text_print"></block><block type="text_prompt_ext"><value name="TEXT"><block type="text"></block></value></block></category><category name="Lists"><block type="lists_create_empty"></block><block type="lists_create_with"></block><block type="lists_repeat"><value name="NUM"><block type="math_number"><field name="NUM">5</field></block></value></block><block type="lists_length"></block><block type="lists_isEmpty"></block><block type="lists_indexOf"><value name="VALUE"><block type="variables_get"><field name="VAR">list</field></block></value></block><block type="lists_getIndex"><value name="VALUE"><block type="variables_get"><field name="VAR">list</field></block></value></block><block type="lists_setIndex"><value name="LIST"><block type="variables_get"><field name="VAR">list</field></block></value></block><block type="lists_getSublist"><value name="LIST"><block type="variables_get"><field name="VAR">list</field></block></value></block></category><category name="Colour"><block type="colour_picker"></block><block type="colour_random"></block><block type="colour_rgb"></block><block type="colour_blend"></block></category><category name="Variables" custom="VARIABLE"></category><category name="Functions" custom="PROCEDURE"></category></xml>';
return '<xml id="toolbox" style="display: none"><category name="Logic"><block type="controls_if"></block><block type="logic_compare"></block><block type="logic_operation"></block><block type="logic_negate"></block><block type="logic_boolean"></block><block type="logic_null"></block><block type="logic_ternary"></block></category><category name="Loops"><block type="controls_repeat_ext"><value name="TIMES"><block type="math_number"><field name="NUM">10</field></block></value></block><block type="controls_whileUntil"></block><block type="controls_for"><value name="FROM"><block type="math_number"><field name="NUM">1</field></block></value><value name="TO"><block type="math_number"><field name="NUM">10</field></block></value><value name="BY"><block type="math_number"><field name="NUM">1</field></block></value></block><block type="controls_forEach"></block><block type="controls_flow_statements"></block></category><category name="Math"><block type="math_number"></block><block type="math_arithmetic"></block><block type="math_single"></block><block type="math_trig"></block><block type="math_constant"></block><block type="math_number_property"></block><block type="math_change"><value name="DELTA"><block type="math_number"><field name="NUM">1</field></block></value></block><block type="math_round"></block><block type="math_on_list"></block><block type="math_modulo"></block><block type="math_constrain"><value name="LOW"><block type="math_number"><field name="NUM">1</field></block></value><value name="HIGH"><block type="math_number"><field name="NUM">100</field></block></value></block><block type="math_random_int"><value name="FROM"><block type="math_number"><field name="NUM">1</field></block></value><value name="TO"><block type="math_number"><field name="NUM">100</field></block></value></block><block type="math_random_float"></block><block type="base_map"></block></category><category name="Text"><block type="text"></block><block type="text_join"></block><block type="text_append"><value name="TEXT"><block type="text"></block></value></block><block type="text_length"></block><block type="text_isEmpty"></block><block type="text_indexOf"><value name="VALUE"><block type="variables_get"><field name="VAR">text</field></block></value></block><block type="text_charAt"><value name="VALUE"><block type="variables_get"><field name="VAR">text</field></block></value></block><block type="text_getSubstring"><value name="STRING"><block type="variables_get"><field name="VAR">text</field></block></value></block><block type="text_changeCase"></block><block type="text_trim"></block><block type="text_print"></block><block type="text_prompt_ext"><value name="TEXT"><block type="text"></block></value></block></category><category name="Lists"><block type="lists_create_empty"></block><block type="lists_create_with"></block><block type="lists_repeat"><value name="NUM"><block type="math_number"><field name="NUM">5</field></block></value></block><block type="lists_length"></block><block type="lists_isEmpty"></block><block type="lists_indexOf"><value name="VALUE"><block type="variables_get"><field name="VAR">list</field></block></value></block><block type="lists_getIndex"><value name="VALUE"><block type="variables_get"><field name="VAR">list</field></block></value></block><block type="lists_setIndex"><value name="LIST"><block type="variables_get"><field name="VAR">list</field></block></value></block><block type="lists_getSublist"><value name="LIST"><block type="variables_get"><field name="VAR">list</field></block></value></block></category><category name="Variables" custom="VARIABLE"></category><category name="Functions" custom="PROCEDURE"></category><category name="Input/Output"><block type="io_digitalwrite"></block><block type="io_digitalread"></block><block type="io_builtin_led"></block><block type="io_analogwrite"></block><block type="io_analogread"></block><block type="io_highlow"></block></category><category name="Time"><block type="time_delay"></block><block type="time_delaymicros"></block><block type="time_millis"></block><block type="time_micros"></block></category></xml>';
};
codepage.readonly = function(opt_data, opt_ignored, opt_ijData) {
return codepage.messages(null, null, opt_ijData) + '<script type="text/javascript" src="../../blockly_compressed.js"><\/script><script type="text/javascript" src="../../blocks_compressed.js"><\/script><script type="text/javascript" src="../../' + soy.$$escapeHtml(opt_ijData.langSrc) + '"><\/script><div id="blockly"></div>';
return codepage.messages(null, null, opt_ijData) + '<script type="text/javascript" src="../../blockly_compressed.js"><\/script><script type="text/javascript" src="../../blocks_compressed.js"><\/script><script type="text/javascript" src="../../generators/arduino.js"><\/script><script type="text/javascript" src="../../generators/arduino/base.js"><\/script><script type="text/javascript" src="../../generators/arduino/io.js"><\/script><script type="text/javascript" src="../../generators/arduino/lists.js"><\/script><script type="text/javascript" src="../../generators/arduino/logic.js"><\/script><script type="text/javascript" src="../../generators/arduino/loops.js"><\/script><script type="text/javascript" src="../../generators/arduino/math.js"><\/script><script type="text/javascript" src="../../generators/arduino/procedures.js"><\/script><script type="text/javascript" src="../../generators/arduino/text.js"><\/script><script type="text/javascript" src="../../generators/arduino/time.js"><\/script><script type="text/javascript" src="../../generators/arduino/variables.js"><\/script><script type="text/javascript" src="../../' + soy.$$escapeHtml(opt_ijData.langSrc) + '"><\/script><div id="blockly"></div>';
};
......@@ -3,12 +3,12 @@
<head>
<meta charset="utf-8">
<meta name="google" value="notranslate">
<title>Blockly : Code</title>
<title>Blockly : Arduino Code</title>
<link rel="stylesheet" type="text/css" href="../common.css">
<link rel="stylesheet" type="text/css" href="style.css">
<script type="text/javascript" src="../_soy/soyutils.js"></script>
<script type="text/javascript" src="../common.js"></script>
<script type="text/javascript" src="code.js"></script>
<script type="text/javascript" src="arduino.js"></script>
<!--script type="text/javascript" src="/storage.js"></script-->
</head>
<body>
......
......@@ -27,28 +27,26 @@
*/
{template .start}
{call .messages /}
<script type="text/javascript" src="../../blockly_compressed.js"></script>
<script type="text/javascript" src="../../blockly_uncompressed.js"></script>
<script type="text/javascript" src="../../blocks_compressed.js"></script>
<script type="text/javascript" src="../../generators/arduino.js"></script>
<script type="text/javascript" src="../../generators/arduino/control.js"></script>
<script type="text/javascript" src="../../generators/arduino/base.js"></script>
<script type="text/javascript" src="../../generators/arduino/io.js"></script>
<script type="text/javascript" src="../../generators/arduino/lists.js"></script>
<script type="text/javascript" src="../../generators/arduino/logic.js"></script>
<script type="text/javascript" src="../../generators/arduino/loops.js"></script>
<script type="text/javascript" src="../../generators/arduino/math.js"></script>
<script type="text/javascript" src="../../generators/arduino/procedures.js"></script>
<script type="text/javascript" src="../../generators/arduino/text.js"></script>
<script type="text/javascript" src="../../generators/arduino/lists.js"></script>
<script type="text/javascript" src="../../generators/arduino/colour.js"></script>
<script type="text/javascript" src="../../generators/arduino/time.js"></script>
<script type="text/javascript" src="../../generators/arduino/variables.js"></script>
<script type="text/javascript" src="../../generators/arduino/procedures.js"></script>
<script type="text/javascript" src="../../javascript_compressed.js"></script>
<script type="text/javascript" src="../../python_compressed.js"></script>
<script type="text/javascript" src="../../dart_compressed.js"></script>
<script type="text/javascript" src="../../{$ij.langSrc}"></script>
<table width="100%" height="100%">
<tr>
<td>
<h1>
<span id="title">
<a href="../index.html?lang={$ij.lang}">{msg meaning="Apps.blocklyMessage" desc="IBID"}Blockllllly{/msg}</a>
<a href="../index.html?lang={$ij.lang}">{msg meaning="Apps.blocklyMessage" desc="IBID"}Blockly{/msg}</a>
{sp}:{sp}
{{msg meaning="Code.title" desc="title - Title of this application, indicating that it is for writing arbitrary programs.\n{lb}{lb}Identical|Code{rb}{rb}"}}
Code
......@@ -68,12 +66,6 @@
<td class="tabmin">&nbsp;</td>
<td id="tab_arduino" class="taboff">Arduino</td>
<td class="tabmin">&nbsp;</td>
<td id="tab_javascript" class="taboff">JavaScript</td>
<td class="tabmin">&nbsp;</td>
<td id="tab_python" class="taboff">Python</td>
<td class="tabmin">&nbsp;</td>
<td id="tab_dart" class="taboff">Dart</td>
<td class="tabmin">&nbsp;</td>
<td id="tab_xml" class="taboff">XML</td>
<td class="tabmax">
<button id="trashButton" class="notext" title="{msg meaning="Code.trashTooltip" desc="tooltip - Clicking on this causes the user program to be discarded."}Discard all blocks.{/msg}">
......@@ -98,9 +90,6 @@
</table>
<div id="content_blocks" class="content"></div>
<pre id="content_arduino" class="content"></pre>
<pre id="content_javascript" class="content"></pre>
<pre id="content_python" class="content"></pre>
<pre id="content_dart" class="content"></pre>
<textarea id="content_xml" class="content" wrap="off"></textarea>
{call apps.dialog /}
{call apps.storageDialog /}
......@@ -191,6 +180,7 @@
</value>
</block>
<block type="math_random_float"></block>
<block type="base_map"></block>
</category>
<category name="{msg meaning="Apps.catText" desc="IBID"}Text{/msg}">
<block type="text"></block>
......@@ -273,14 +263,22 @@
</value>
</block>
</category>
<category name="{msg meaning="Apps.catColour" desc="IBID"}Colour{/msg}">
<block type="colour_picker"></block>
<block type="colour_random"></block>
<block type="colour_rgb"></block>
<block type="colour_blend"></block>
</category>
<category name="{msg meaning="Apps.catVariables" desc="IBID"}Variables{/msg}" custom="VARIABLE"></category>
<category name="{msg meaning="Apps.catProcedures" desc="IBID"}Functions{/msg}" custom="PROCEDURE"></category>
<category name="{msg meaning="Apps.catIO" desc="IBID"}Input/Output{/msg}">
<block type="io_digitalwrite"></block>
<block type="io_digitalread"></block>
<block type="io_builtin_led"></block>
<block type="io_analogwrite"></block>
<block type="io_analogread"></block>
<block type="io_highlow"></block>
</category>
<category name="{msg meaning="Apps.catIO" desc="IBID"}Time{/msg}">
<block type="time_delay"></block>
<block type="time_delaymicros"></block>
<block type="time_millis"></block>
<block type="time_micros"></block>
</category>
</xml>
{/template}
......@@ -292,6 +290,17 @@
<script type="text/javascript" src="../../blockly_compressed.js"></script>
<script type="text/javascript" src="../../blocks_compressed.js"></script>
<script type="text/javascript" src="../../generators/arduino.js"></script>
<script type="text/javascript" src="../../generators/arduino/base.js"></script>
<script type="text/javascript" src="../../generators/arduino/io.js"></script>
<script type="text/javascript" src="../../generators/arduino/lists.js"></script>
<script type="text/javascript" src="../../generators/arduino/logic.js"></script>
<script type="text/javascript" src="../../generators/arduino/loops.js"></script>
<script type="text/javascript" src="../../generators/arduino/math.js"></script>
<script type="text/javascript" src="../../generators/arduino/procedures.js"></script>
<script type="text/javascript" src="../../generators/arduino/text.js"></script>
<script type="text/javascript" src="../../generators/arduino/time.js"></script>
<script type="text/javascript" src="../../generators/arduino/variables.js"></script>
<script type="text/javascript" src="../../{$ij.langSrc}"></script>
<div id="blockly"></div>
{/template}
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