Arduino generators help URL fixed to new Blockly format.

parent 3e3add15
......@@ -28,9 +28,8 @@
Blockly.Blocks['base_map'] = {
category: 'Math',
helpUrl: 'http://arduino.cc/en/Reference/map',
init: function() {
this.setHelpUrl('http://arduino.cc/en/Reference/map');
this.setColour(230);
this.appendValueInput("NUM", 'Number')
.appendTitle("Map ")
......@@ -56,9 +55,8 @@ Blockly.Arduino['base_map'] = function(block) {
Blockly.Blocks['serial_print'] = {
category: 'Serial',
helpUrl: 'http://www.arduino.cc/en/Serial/Print',
init: function() {
this.setHelpUrl('http://www.arduino.cc/en/Serial/Print');
this.setColour(230);
this.appendValueInput("CONTENT", 'String')
.appendTitle("Serial Print");
......@@ -70,9 +68,7 @@ Blockly.Blocks['serial_print'] = {
Blockly.Arduino['serial_print'] = function(block) {
var content = Blockly.Arduino.valueToCode(block, 'CONTENT', Blockly.Arduino.ORDER_ATOMIC) || '0'
Blockly.Arduino.setups_['setup_serial_'+profile.default.serial] = 'Serial.begin('+profile.default.serial+');\n';
var code = 'Serial.print('+content+');\nSerial.print(\'\\t\');\n';
var code = 'Serial.print('+content+');\n';
return code;
};
......@@ -9,8 +9,8 @@
* Description
*/
Blockly.Blocks['io_digitalwrite'] = {
helpUrl: 'http://arduino.cc/en/Reference/DigitalWrite',
init: function() {
this.setHelpUrl('http://arduino.cc/en/Reference/DigitalWrite');
this.setColour(230);
this.appendDummyInput("")
.appendField("DigitalWrite PIN#")
......@@ -35,8 +35,8 @@ Blockly.Arduino['io_digitalwrite'] = function(block) {
* Description
*/
Blockly.Blocks['io_digitalread'] = {
helpUrl: 'http://arduino.cc/en/Reference/DigitalRead',
init: function() {
this.setHelpUrl('http://arduino.cc/en/Reference/DigitalRead');
this.setColour(230);
this.appendDummyInput("")
.appendField("DigitalRead PIN#")
......@@ -58,8 +58,8 @@ Blockly.Arduino['io_digitalread'] = function(block) {
* Description
*/
Blockly.Blocks['io_builtin_led'] = {
helpUrl: 'http://arduino.cc/en/Reference/DigitalWrite',
init: function() {
this.setHelpUrl('http://arduino.cc/en/Reference/DigitalWrite');
this.setColour(190);
this.appendDummyInput("")
.appendField("Build-in LED Stat")
......@@ -81,8 +81,8 @@ Blockly.Arduino['io_builtin_led'] = function(block) {
* Description
*/
Blockly.Blocks['io_analogwrite'] = {
helpUrl: 'http://arduino.cc/en/Reference/AnalogWrite',
init: function() {
this.setHelpUrl('http://arduino.cc/en/Reference/AnalogWrite');
this.setColour(230);
this.appendDummyInput("")
.appendField("AnalogWrite PIN#")
......@@ -110,8 +110,8 @@ Blockly.Arduino['io_analogwrite'] = function(block) {
* Description
*/
Blockly.Blocks['io_analogread'] = {
helpUrl: 'http://arduino.cc/en/Reference/AnalogRead',
init: function() {
this.setHelpUrl('http://arduino.cc/en/Reference/AnalogRead');
this.setColour(230);
this.appendDummyInput("")
.appendField("AnalogRead PIN#")
......@@ -132,8 +132,8 @@ Blockly.Arduino['io_analogread'] = function(block) {
* Description
*/
Blockly.Blocks['io_highlow'] = {
helpUrl: 'http://arduino.cc/en/Reference/Constants',
init: function() {
this.setHelpUrl('http://arduino.cc/en/Reference/Constants');
this.setColour(230);
this.appendDummyInput("")
.appendField(new Blockly.FieldDropdown([["HIGH", "HIGH"], ["LOW", "LOW"]]), 'BOOL')
......
......@@ -9,8 +9,8 @@
* Delay block definition
*/
Blockly.Blocks['time_delay'] = {
helpUrl: 'http://arduino.cc/en/Reference/Delay',
init: function() {
this.setHelpUrl('http://arduino.cc/en/Reference/Delay');
this.setColour(120);
this.appendValueInput("DELAY_TIME", 'Number')
.appendField("Delay")
......@@ -37,8 +37,8 @@ Blockly.Blocks['time_delay'] = {
* delayMicroseconds block definition
*/
Blockly.Blocks['time_delaymicros'] = {
helpUrl: 'http://arduino.cc/en/Reference/DelayMicroseconds',
init: function() {
this.setHelpUrl('http://arduino.cc/en/Reference/DelayMicroseconds');
this.setColour(120);
this.appendValueInput("DELAY_TIME_MS", 'Number')
.appendField("Delay")
......@@ -64,8 +64,8 @@ Blockly.Blocks['time_delaymicros'] = {
* millis block definition
*/
Blockly.Blocks['time_millis'] = {
helpUrl: 'http://arduino.cc/en/Reference/Millis',
init: function() {
this.setHelpUrl('http://arduino.cc/en/Reference/Millis');
this.setColour(120);
this.appendDummyInput("")
.appendField("Elapsed Time (Milli)");
......@@ -87,8 +87,8 @@ Blockly.Blocks['time_millis'] = {
* micros block definition
*/
Blockly.Blocks['time_micros'] = {
helpUrl: 'http://arduino.cc/en/Reference/Micros',
init: function() {
this.setHelpUrl('http://arduino.cc/en/Reference/Micros');
this.setColour(120);
this.appendDummyInput("")
.appendField("Elapsed Time (Micro)");
......
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