small fixes

This commit is contained in:
Mario 2021-01-12 10:18:11 +01:00
parent 7a31d94a21
commit de9141c25c
8 changed files with 60 additions and 60 deletions

View File

@ -13,7 +13,7 @@ Blockly.Arduino.sensebox_rgb_led = function () {
var color = Blockly.Arduino.valueToCode(this, 'COLOR', Blockly.Arduino.ORDER_ATOMIC) || '0' var color = Blockly.Arduino.valueToCode(this, 'COLOR', Blockly.Arduino.ORDER_ATOMIC) || '0'
Blockly.Arduino.libraries_['define_rgb_led' + dropdown_pin] = '#include <Adafruit_NeoPixel.h>\n Adafruit_NeoPixel rgb_led_' + dropdown_pin + ' = Adafruit_NeoPixel(1,' + dropdown_pin + ',NEO_RGB + NEO_KHZ800);\n'; Blockly.Arduino.libraries_['define_rgb_led' + dropdown_pin] = '#include <Adafruit_NeoPixel.h>\n Adafruit_NeoPixel rgb_led_' + dropdown_pin + ' = Adafruit_NeoPixel(1,' + dropdown_pin + ',NEO_RGB + NEO_KHZ800);\n';
Blockly.Arduino.setupCode_['setup_rgb_led' + dropdown_pin] = 'rgb_led_' + dropdown_pin + '.begin();'; Blockly.Arduino.setupCode_['setup_rgb_led' + dropdown_pin] = 'rgb_led_' + dropdown_pin + '.begin();';
var code = 'rgb_led_' + dropdown_pin + '.setPixelColor(0,rgb_led_' + dropdown_pin + '.Color(' + color + ' ));\n'; var code = 'rgb_led_' + dropdown_pin + '.setPixelColor(0,rgb_led_' + dropdown_pin + '.Color(' + color + '));\n';
code += 'rgb_led_' + dropdown_pin + '.show();'; code += 'rgb_led_' + dropdown_pin + '.show();';
return code; return code;
}; };

View File

@ -12,3 +12,24 @@ Blockly.Msg.senseBox_ws2818_rgb_led_init_tooltip = "Schließe die RGB-LED an ein
Blockly.Msg.senseBox_ws2818_rgb_led_color = "Farbe" Blockly.Msg.senseBox_ws2818_rgb_led_color = "Farbe"
Blockly.Msg.senseBox_ws2818_rgb_led_number = "Anzahl" Blockly.Msg.senseBox_ws2818_rgb_led_number = "Anzahl"
/**
* Color
*/
Blockly.Msg.COLOUR_BLEND_COLOUR1 = "Farbe 1";
Blockly.Msg.COLOUR_BLEND_COLOUR2 = "mit Farbe 2";
Blockly.Msg.COLOUR_BLEND_HELPURL = "http://meyerweb.com/eric/tools/color-blend/";
Blockly.Msg.COLOUR_BLEND_RATIO = "im Verhältnis";
Blockly.Msg.COLOUR_BLEND_TITLE = "mische";
Blockly.Msg.COLOUR_BLEND_TOOLTIP = "Vermische 2 Farben mit konfigurierbaren Farbverhältnis (0.0 - 1.0).";
Blockly.Msg.COLOUR_PICKER_HELPURL = "https://de.wikipedia.org/wiki/Farbe";
Blockly.Msg.COLOUR_PICKER_TOOLTIP = "Wähle eine Farbe aus der Palette. Die Farbe wird automatisch in RGB-Werte konvertiert.";
Blockly.Msg.COLOUR_RANDOM_HELPURL = "http://randomcolour.com"; // untranslated
Blockly.Msg.COLOUR_RANDOM_TITLE = "zufällige Farbe";
Blockly.Msg.COLOUR_RANDOM_TOOLTIP = "Erstelle eine Farbe nach dem Zufallsprinzip.";
Blockly.Msg.COLOUR_RGB_BLUE = "blau";
Blockly.Msg.COLOUR_RGB_GREEN = "grün";
Blockly.Msg.COLOUR_RGB_HELPURL = "https://de.wikipedia.org/wiki/RGB-Farbraum";
Blockly.Msg.COLOUR_RGB_RED = "rot";
Blockly.Msg.COLOUR_RGB_TITLE = "Farbe mit";
Blockly.Msg.COLOUR_RGB_TOOLTIP = "Erstelle eine Farbe mit selbst definierten Rot-, Grün- und Blauwerten. Alle Werte müssen zwischen 0 und 255 liegen. 0 ist hierbei die geringte Intensität der Farbe 255 die höchste.";

View File

@ -6,23 +6,6 @@ Blockly.Msg.CHAT = "Chatte mit unserem Mitarbeiter durch Eingeben von Text in di
Blockly.Msg.CLEAN_UP = "Blöcke aufräumen"; Blockly.Msg.CLEAN_UP = "Blöcke aufräumen";
Blockly.Msg.COLLAPSE_ALL = "Alle Blöcke zusammenfalten"; Blockly.Msg.COLLAPSE_ALL = "Alle Blöcke zusammenfalten";
Blockly.Msg.COLLAPSE_BLOCK = "Block zusammenfalten"; Blockly.Msg.COLLAPSE_BLOCK = "Block zusammenfalten";
Blockly.Msg.COLOUR_BLEND_COLOUR1 = "Farbe 1";
Blockly.Msg.COLOUR_BLEND_COLOUR2 = "mit Farbe 2";
Blockly.Msg.COLOUR_BLEND_HELPURL = "http://meyerweb.com/eric/tools/color-blend/";
Blockly.Msg.COLOUR_BLEND_RATIO = "im Verhältnis";
Blockly.Msg.COLOUR_BLEND_TITLE = "mische";
Blockly.Msg.COLOUR_BLEND_TOOLTIP = "Vermische 2 Farben mit konfigurierbaren Farbverhältnis (0.0 - 1.0).";
Blockly.Msg.COLOUR_PICKER_HELPURL = "https://de.wikipedia.org/wiki/Farbe";
Blockly.Msg.COLOUR_PICKER_TOOLTIP = "Wähle eine Farbe aus der Palette. Die Farbe wird automatisch in RGB-Werte konvertiert.";
Blockly.Msg.COLOUR_RANDOM_HELPURL = "http://randomcolour.com"; // untranslated
Blockly.Msg.COLOUR_RANDOM_TITLE = "zufällige Farbe";
Blockly.Msg.COLOUR_RANDOM_TOOLTIP = "Erstelle eine Farbe nach dem Zufallsprinzip.";
Blockly.Msg.COLOUR_RGB_BLUE = "blau";
Blockly.Msg.COLOUR_RGB_GREEN = "grün";
Blockly.Msg.COLOUR_RGB_HELPURL = "https://de.wikipedia.org/wiki/RGB-Farbraum";
Blockly.Msg.COLOUR_RGB_RED = "rot";
Blockly.Msg.COLOUR_RGB_TITLE = "Farbe mit";
Blockly.Msg.COLOUR_RGB_TOOLTIP = "Erstelle eine Farbe mit selbst definierten Rot-, Grün- und Blauwerten. Alle Werte müssen zwischen 0 und 255 liegen. 0 ist hierbei die geringte Intensität der Farbe 255 die höchste.";
Blockly.Msg.DELETE_ALL_BLOCKS = "Alle %1 Bausteine löschen?"; Blockly.Msg.DELETE_ALL_BLOCKS = "Alle %1 Bausteine löschen?";

View File

@ -44,4 +44,4 @@ Blockly.Msg.cases_add = "Case";
Blockly.Msg.cases_condition = "Case (Variable) = "; Blockly.Msg.cases_condition = "Case (Variable) = ";
Blockly.Msg.cases_do = "Do"; Blockly.Msg.cases_do = "Do";
Blockly.Msg.cases_switch = "Variable"; Blockly.Msg.cases_switch = "Variable";
Blockly.Msg.cases_tooltip = "Does something if the condition is true. If there isn\'t a matching case the default function will be executed.'" Blockly.Msg.cases_tooltip = "Does something if the condition is true. If there isn't a matching case the default function will be executed.'"

View File

@ -1,6 +1,13 @@
import Blockly from 'blockly' import Blockly from 'blockly'
Blockly.Msg.senseBox_led = "LED connected to digital";
Blockly.Msg.senseBox_led_tip = "simple LED. Don't forget the resistor";
Blockly.Msg.senseBox_rgb_led = "RGB-LED";
Blockly.Msg.senseBox_rgb_led_tip = "RGB-LED";
/** /**
* WS2818 RGB LED * WS2818 RGB LED
*/ */
@ -13,3 +20,24 @@ Blockly.Msg.senseBox_ws2818_rgb_led_init_tooltip = "Connect the RGB LED to one o
Blockly.Msg.senseBox_ws2818_rgb_led_color = "Color" Blockly.Msg.senseBox_ws2818_rgb_led_color = "Color"
Blockly.Msg.senseBox_ws2818_rgb_led_number = "Number" Blockly.Msg.senseBox_ws2818_rgb_led_number = "Number"
/**
* Color
*/
Blockly.Msg.COLOUR_BLEND_COLOUR1 = "colour 1";
Blockly.Msg.COLOUR_BLEND_COLOUR2 = "colour 2";
Blockly.Msg.COLOUR_BLEND_HELPURL = "http://meyerweb.com/eric/tools/color-blend/";
Blockly.Msg.COLOUR_BLEND_RATIO = "ratio";
Blockly.Msg.COLOUR_BLEND_TITLE = "blend";
Blockly.Msg.COLOUR_BLEND_TOOLTIP = "Blends two colours together with a given ratio (0.0 - 1.0).";
Blockly.Msg.COLOUR_PICKER_HELPURL = "https://en.wikipedia.org/wiki/Color";
Blockly.Msg.COLOUR_PICKER_TOOLTIP = "Choose a colour from the palette.";
Blockly.Msg.COLOUR_RANDOM_HELPURL = "http://randomcolour.com";
Blockly.Msg.COLOUR_RANDOM_TITLE = "random colour";
Blockly.Msg.COLOUR_RANDOM_TOOLTIP = "Choose a colour at random.";
Blockly.Msg.COLOUR_RGB_BLUE = "blue";
Blockly.Msg.COLOUR_RGB_GREEN = "green";
Blockly.Msg.COLOUR_RGB_HELPURL = "http://www.december.com/html/spec/colorper.html";
Blockly.Msg.COLOUR_RGB_RED = "red";
Blockly.Msg.COLOUR_RGB_TITLE = "colour with";
Blockly.Msg.COLOUR_RGB_TOOLTIP = "Create a colour with the specified amount of red, green, and blue. All values must be between 0 and 255.";

View File

@ -32,6 +32,9 @@ Blockly.Msg.senseBox_temp = "Temperature in °C";
Blockly.Msg.senseBox_temp_hum = "Temperature/Humidity Sensor (HDC1080)"; Blockly.Msg.senseBox_temp_hum = "Temperature/Humidity Sensor (HDC1080)";
Blockly.Msg.senseBox_temp_hum_tooltip = "This block returns the temperature and humidity sensor readings. Connect the sensor to one of the 5 I2C ports. Measured value is output with 2 decimal places."; Blockly.Msg.senseBox_temp_hum_tooltip = "This block returns the temperature and humidity sensor readings. Connect the sensor to one of the 5 I2C ports. Measured value is output with 2 decimal places.";
Blockly.Msg.senseBox_temp_hum_helpurl = "https://en.docs.sensebox.de/hardware/sensoren-temperatur-luftfeuchte/" Blockly.Msg.senseBox_temp_hum_helpurl = "https://en.docs.sensebox.de/hardware/sensoren-temperatur-luftfeuchte/"
Blockly.Msg.senseBox_hum = "humidity in %";
Blockly.Msg.senseBox_hum_tip = "Measures humidity in %";
/** /**
* Ultraschalldistanzsensor * Ultraschalldistanzsensor
@ -140,7 +143,7 @@ Blockly.Msg.senseBox_bme680_helpurl = "https://en.docs.sensebox.de/hardware/sens
/** /**
* Truebner SMT50 * Truebner SMT50
*/ */
Blockly.Msg.senseBox_smt50 = "Bodenfeuchte/-temperatur (SMT50)"; Blockly.Msg.senseBox_smt50 = "Soil Moisture and Temperature (SMT50)";
Blockly.Msg.senseBox_smt50_helpurl = "https://docs.sensebox.de/hardware/sensoren-truebner/" Blockly.Msg.senseBox_smt50_helpurl = "https://docs.sensebox.de/hardware/sensoren-truebner/"
Blockly.Msg.senseBox_smt50_tooltip = "Schließe den Bodenfeuchtigkeit- und Temperatursensor an einen der 3 digital/analog Ports an und wähle den Port im Block aus. Der Sensor gibt die Bodentemperatur in °C und die Bodenfeuchtigkeit in % aus." Blockly.Msg.senseBox_smt50_tooltip = "Schließe den Bodenfeuchtigkeit- und Temperatursensor an einen der 3 digital/analog Ports an und wähle den Port im Block aus. Der Sensor gibt die Bodentemperatur in °C und die Bodenfeuchtigkeit in % aus."

View File

@ -1,6 +1,8 @@
import Blockly from 'blockly'; import Blockly from 'blockly';
Blockly.Msg.senseBox_interval = "ms";
Blockly.Msg.senseBox_interval_timer = "Measuring interval";
Blockly.Msg.senseBox_interval_timer_tip = "Setup an Intervall";
Blockly.Msg.ARD_TIME_DELAY = "wait"; Blockly.Msg.ARD_TIME_DELAY = "wait";
Blockly.Msg.ARD_TIME_DELAY_MICROS = "microseconds"; Blockly.Msg.ARD_TIME_DELAY_MICROS = "microseconds";
Blockly.Msg.ARD_TIME_DELAY_MICRO_TIP = "Wait specific time in microseconds"; Blockly.Msg.ARD_TIME_DELAY_MICRO_TIP = "Wait specific time in microseconds";
@ -12,6 +14,3 @@ Blockly.Msg.ARD_TIME_MICROS_TIP = "Returns the number of microseconds since the
Blockly.Msg.ARD_TIME_MILLIS = "current elapsed Time (milliseconds)"; Blockly.Msg.ARD_TIME_MILLIS = "current elapsed Time (milliseconds)";
Blockly.Msg.ARD_TIME_MILLIS_TIP = "Returns the number of milliseconds since the Arduino board began running the current program. Has to be stored in a positive long integer"; Blockly.Msg.ARD_TIME_MILLIS_TIP = "Returns the number of milliseconds since the Arduino board began running the current program. Has to be stored in a positive long integer";
Blockly.Msg.ARD_TIME_MS = "milliseconds"; Blockly.Msg.ARD_TIME_MS = "milliseconds";
Blockly.Msg.senseBox_interval = "ms";
Blockly.Msg.senseBox_interval_timer = "Measuring interval";
Blockly.Msg.senseBox_interval_timer_tip = "Setup an Intervall";

View File

@ -7,23 +7,6 @@ Blockly.Msg.CHAT = "Chat with your collaborator by typing in this box!";
Blockly.Msg.CLEAN_UP = "Clean up Blocks"; Blockly.Msg.CLEAN_UP = "Clean up Blocks";
Blockly.Msg.COLLAPSE_ALL = "Collapse Blocks"; Blockly.Msg.COLLAPSE_ALL = "Collapse Blocks";
Blockly.Msg.COLLAPSE_BLOCK = "Collapse Block"; Blockly.Msg.COLLAPSE_BLOCK = "Collapse Block";
Blockly.Msg.COLOUR_BLEND_COLOUR1 = "colour 1";
Blockly.Msg.COLOUR_BLEND_COLOUR2 = "colour 2";
Blockly.Msg.COLOUR_BLEND_HELPURL = "http://meyerweb.com/eric/tools/color-blend/";
Blockly.Msg.COLOUR_BLEND_RATIO = "ratio";
Blockly.Msg.COLOUR_BLEND_TITLE = "blend";
Blockly.Msg.COLOUR_BLEND_TOOLTIP = "Blends two colours together with a given ratio (0.0 - 1.0).";
Blockly.Msg.COLOUR_PICKER_HELPURL = "https://en.wikipedia.org/wiki/Color";
Blockly.Msg.COLOUR_PICKER_TOOLTIP = "Choose a colour from the palette.";
Blockly.Msg.COLOUR_RANDOM_HELPURL = "http://randomcolour.com";
Blockly.Msg.COLOUR_RANDOM_TITLE = "random colour";
Blockly.Msg.COLOUR_RANDOM_TOOLTIP = "Choose a colour at random.";
Blockly.Msg.COLOUR_RGB_BLUE = "blue";
Blockly.Msg.COLOUR_RGB_GREEN = "green";
Blockly.Msg.COLOUR_RGB_HELPURL = "http://www.december.com/html/spec/colorper.html";
Blockly.Msg.COLOUR_RGB_RED = "red";
Blockly.Msg.COLOUR_RGB_TITLE = "colour with";
Blockly.Msg.COLOUR_RGB_TOOLTIP = "Create a colour with the specified amount of red, green, and blue. All values must be between 0 and 100.";
Blockly.Msg.DELETE_ALL_BLOCKS = "Delete all %1 blocks?"; Blockly.Msg.DELETE_ALL_BLOCKS = "Delete all %1 blocks?";
Blockly.Msg.DELETE_BLOCK = "Delete Block"; Blockly.Msg.DELETE_BLOCK = "Delete Block";
Blockly.Msg.DELETE_X_BLOCKS = "Delete %1 Blocks"; Blockly.Msg.DELETE_X_BLOCKS = "Delete %1 Blocks";
@ -193,14 +176,11 @@ Blockly.Msg.senseBox_foto_tip = "simple light depending resistor, gives values b
Blockly.Msg.senseBox_gas = "Gas (VOC)"; Blockly.Msg.senseBox_gas = "Gas (VOC)";
Blockly.Msg.senseBox_hum = "humidity in %";
Blockly.Msg.senseBox_hum_tip = "Measures humidity in %";
Blockly.Msg.senseBox_ir = "infrared distance sensor"; Blockly.Msg.senseBox_ir = "infrared distance sensor";
Blockly.Msg.senseBox_ir_tip = "infrared distance sensor can measure the distance between 10 and 80 cm"; Blockly.Msg.senseBox_ir_tip = "infrared distance sensor can measure the distance between 10 and 80 cm";
Blockly.Msg.senseBox_led = "LED connected to digital";
Blockly.Msg.senseBox_led_tip = "simple LED. Don't forget the resistor";
Blockly.Msg.senseBox_lux = "lightsensor"; Blockly.Msg.senseBox_lux = "lightsensor";
Blockly.Msg.senseBox_lux_tip = "Light Sensor can measure the illuminance in lux"; Blockly.Msg.senseBox_lux_tip = "Light Sensor can measure the illuminance in lux";
@ -220,17 +200,7 @@ Blockly.Msg.senseBox_output_serialprint = "Print on Serial Monitor";
Blockly.Msg.senseBox_output_timestamp = "timestamp"; Blockly.Msg.senseBox_output_timestamp = "timestamp";
Blockly.Msg.senseBox_piezo_tip = "simple piezo to make sound"; Blockly.Msg.senseBox_piezo_tip = "simple piezo to make sound";
Blockly.Msg.senseBox_poti = "Potentiometer"; Blockly.Msg.senseBox_poti = "Potentiometer";
Blockly.Msg.senseBox_poti_tip = "Potentiometer"; Blockly.Msg.senseBox_poti_tip = "Potentiometer"
Blockly.Msg.senseBox_rgb_led = "RGB-LED";
Blockly.Msg.senseBox_rgb_led_tip = "RGB-LED";
Blockly.Msg.senseBox_sensor = "Sensors"; Blockly.Msg.senseBox_sensor = "Sensors";
Blockly.Msg.senseBox_serial_tip = "prints the values to the serial monitor in the arduino IDE. Good way to have a fast and easy feedback for your programm"; Blockly.Msg.senseBox_serial_tip = "prints the values to the serial monitor in the arduino IDE. Good way to have a fast and easy feedback for your programm";
@ -239,8 +209,4 @@ Blockly.Msg.senseBox_soil = "Soil Moisture";
Blockly.Msg.sensebox_soil_smt50 = "Soil Moisture and Temperature (SMT50)";