From 1856f7652c74a12c3b3f847f180573bacd0b3a82 Mon Sep 17 00:00:00 2001 From: carlosperate Date: Sun, 21 Feb 2016 18:52:16 +0000 Subject: [PATCH] Minor updates to block wording. --- blockly/blocks/arduino/io.js | 2 +- blockly/blocks/arduino/procedures.js | 2 +- blockly/blocks/arduino/servo.js | 4 ++-- blockly/generators/arduino/io.js | 4 ++-- blockly/generators/arduino/serial.js | 1 - 5 files changed, 6 insertions(+), 7 deletions(-) diff --git a/blockly/blocks/arduino/io.js b/blockly/blocks/arduino/io.js index 9caabef69b..8968ebe7ac 100644 --- a/blockly/blocks/arduino/io.js +++ b/blockly/blocks/arduino/io.js @@ -37,7 +37,7 @@ Blockly.Blocks['io_digitalwrite'] = { this.setInputsInline(false); this.setPreviousStatement(true, null); this.setNextStatement(true, null); - this.setTooltip('Write digital value to a specific Port.'); + this.setTooltip('Write digital value to a specific pin.'); }, /** * Updates the content of the the pin related fields. diff --git a/blockly/blocks/arduino/procedures.js b/blockly/blocks/arduino/procedures.js index 63230da8bc..24072d8542 100644 --- a/blockly/blocks/arduino/procedures.js +++ b/blockly/blocks/arduino/procedures.js @@ -23,7 +23,7 @@ Blockly.Blocks['arduino_functions'] = { */ init: function() { this.appendDummyInput() - .appendField('Arduino run once:'); + .appendField('Arduino run first:'); this.appendStatementInput('SETUP_FUNC'); this.appendDummyInput() .appendField('Arduino loop forever:'); diff --git a/blockly/blocks/arduino/servo.js b/blockly/blocks/arduino/servo.js index 2074052d02..3a471f2931 100644 --- a/blockly/blocks/arduino/servo.js +++ b/blockly/blocks/arduino/servo.js @@ -30,7 +30,7 @@ Blockly.Blocks['servo_write'] = { this.setHelpUrl('http://arduino.cc/en/Reference/ServoWrite'); this.setColour(Blockly.Blocks.servo.HUE); this.appendDummyInput() - .appendField('Set SERVO from Pin') + .appendField('set SERVO from Pin') .appendField(new Blockly.FieldDropdown( Blockly.Arduino.Boards.selected.pwmPins), 'SERVO_PIN'); this.setInputsInline(false); @@ -63,7 +63,7 @@ Blockly.Blocks['servo_read'] = { this.setHelpUrl('http://arduino.cc/en/Reference/ServoRead'); this.setColour(Blockly.Blocks.servo.HUE); this.appendDummyInput() - .appendField('Read SERVO from PIN#') + .appendField('read SERVO from PIN#') .appendField(new Blockly.FieldDropdown( Blockly.Arduino.Boards.selected.pwmPins), 'SERVO_PIN'); this.setOutput(true, Blockly.Types.NUMBER.basicType); diff --git a/blockly/generators/arduino/io.js b/blockly/generators/arduino/io.js index 56461a3c3f..84faa8d3c5 100644 --- a/blockly/generators/arduino/io.js +++ b/blockly/generators/arduino/io.js @@ -24,7 +24,7 @@ goog.require('Blockly.Arduino'); Blockly.Arduino['io_digitalwrite'] = function(block) { var pin = block.getFieldValue('PIN'); var stateOutput = Blockly.Arduino.valueToCode( - block, 'STATE', Blockly.Arduino.ORDER_ATOMIC) || '0'; + block, 'STATE', Blockly.Arduino.ORDER_ATOMIC) || 'LOW'; Blockly.Arduino.reservePin( block, pin, Blockly.Arduino.PinTypes.OUTPUT, 'Digital Write'); @@ -65,7 +65,7 @@ Blockly.Arduino['io_digitalread'] = function(block) { Blockly.Arduino['io_builtin_led'] = function(block) { var pin = block.getFieldValue('BUILT_IN_LED'); var stateOutput = Blockly.Arduino.valueToCode( - block, 'STATE', Blockly.Arduino.ORDER_ATOMIC) || '0'; + block, 'STATE', Blockly.Arduino.ORDER_ATOMIC) || 'LOW'; Blockly.Arduino.reservePin( block, pin, Blockly.Arduino.PinTypes.OUTPUT, 'Set LED'); diff --git a/blockly/generators/arduino/serial.js b/blockly/generators/arduino/serial.js index c824955932..9bdba3d16c 100644 --- a/blockly/generators/arduino/serial.js +++ b/blockly/generators/arduino/serial.js @@ -40,7 +40,6 @@ Blockly.Arduino['serial_print'] = function(block) { } else { var code = serialId + '.print(' + content + ');\n'; } - return code; };