Browse Source

modified: lars_blocks.js

pull/1/head
roboticafacil 1 year ago
parent
commit
21db36369b
1 changed files with 11 additions and 2 deletions
  1. 11
    2
      lars_blocks.js

+ 11
- 2
lars_blocks.js View File

@@ -4,18 +4,27 @@ Facilino.LANG_COLOUR_MOVEMENT_WALK = '#8D8D25';
4 4
 Blockly.Blocks['LARS_init'] = {
5 5
 	category: Facilino.locales.getKey('LANG_CATEGORY_MOVEMENT'),
6 6
 	subcategory: Facilino.locales.getKey('LANG_SUBCATEGORY_WALK'),
7
-	helpUrl: Facilino.getHelpUrl('LARS_init'),
8 7
 	category_colour: Facilino.LANG_COLOUR_MOVEMENT,
9 8
 	colour: Facilino.LANG_COLOUR_MOVEMENT_WALK,
9
+	helpUrl: Facilino.getHelpUrl('LARS_init'),
10 10
 	tags: [],
11 11
 	examples: [],
12 12
 	init: function () {
13
+		this.appendDummyInput('').appendField(new Blockly.FieldImage('img/blocks/LARS.svg', 32*options.zoom, 32*options.zoom)).appendField(Facilino.locales.getKey('LANG_MOVEMENT_LARS_ROBOT'));
14
+		this.appendValueInput('FRH').appendField(new Blockly.FieldImage('img/blocks/LARS_FRH.svg', 24*options.zoom, 24*options.zoom)).appendField(Facilino.locales.getKey('LANG_MOVEMENT_LARS_FRH')).appendField(new Blockly.FieldImage('img/blocks/pwm_signal.svg', 24*options.zoom, 24*options.zoom)).setAlign(Blockly.ALIGN_RIGHT);
15
+		this.appendValueInput('FLH').appendField(new Blockly.FieldImage('img/blocks/LARS_FLH.svg', 24*options.zoom, 24*options.zoom)).appendField(Facilino.locales.getKey('LANG_MOVEMENT_LARS_FLH')).appendField(new Blockly.FieldImage('img/blocks/pwm_signal.svg', 24*options.zoom, 24*options.zoom)).setAlign(Blockly.ALIGN_RIGHT);
16
+		this.appendValueInput('BRH').appendField(new Blockly.FieldImage('img/blocks/LARS_BRH.svg', 24*options.zoom, 24*options.zoom)).appendField(Facilino.locales.getKey('LANG_MOVEMENT_LARS_BRH')).appendField(new Blockly.FieldImage('img/blocks/pwm_signal.svg', 24*options.zoom, 24*options.zoom)).setAlign(Blockly.ALIGN_RIGHT);
17
+		this.appendValueInput('BLH').appendField(new Blockly.FieldImage('img/blocks/LARS_BLH.svg', 24*options.zoom, 24*options.zoom)).appendField(Facilino.locales.getKey('LANG_MOVEMENT_LARS_BLH')).appendField(new Blockly.FieldImage('img/blocks/pwm_signal.svg', 24*options.zoom, 24*options.zoom)).setAlign(Blockly.ALIGN_RIGHT);
18
+		this.appendValueInput('FRL').appendField(new Blockly.FieldImage('img/blocks/LARS_FRL.svg', 24*options.zoom, 24*options.zoom)).appendField(Facilino.locales.getKey('LANG_MOVEMENT_LARS_FRL')).appendField(new Blockly.FieldImage('img/blocks/pwm_signal.svg', 24*options.zoom, 24*options.zoom)).setAlign(Blockly.ALIGN_RIGHT);
19
+		this.appendValueInput('FLL').appendField(new Blockly.FieldImage('img/blocks/LARS_FLL.svg', 24*options.zoom, 24*options.zoom)).appendField(Facilino.locales.getKey('LANG_MOVEMENT_LARS_FLL')).appendField(new Blockly.FieldImage('img/blocks/pwm_signal.svg', 24*options.zoom, 24*options.zoom)).setAlign(Blockly.ALIGN_RIGHT);
20
+		this.appendValueInput('BRL').appendField(new Blockly.FieldImage('img/blocks/LARS_BRL.svg', 24*options.zoom, 24*options.zoom)).appendField(Facilino.locales.getKey('LANG_MOVEMENT_LARS_BRL')).appendField(new Blockly.FieldImage('img/blocks/pwm_signal.svg', 24*options.zoom, 24*options.zoom)).setAlign(Blockly.ALIGN_RIGHT);
21
+		this.appendValueInput('BLL').appendField(new Blockly.FieldImage('img/blocks/LARS_BLL.svg', 24*options.zoom, 24*options.zoom)).appendField(Facilino.locales.getKey('LANG_MOVEMENT_LARS_BLL')).appendField(new Blockly.FieldImage('img/blocks/pwm_signal.svg', 24*options.zoom, 24*options.zoom)).setAlign(Blockly.ALIGN_RIGHT);
13 22
 		this.setPreviousStatement(true,'code');
14 23
 		this.setNextStatement(true,'code');
15 24
 		this.setColour(Facilino.LANG_COLOUR_MOVEMENT_WALK);
16 25
 		this.setTooltip(Facilino.locales.getKey('LANG_LARS_INIT_TOOLTIP'));
17 26
 	}
18
-}
27
+};
19 28
 
20 29
 Blockly.Arduino['LARS_init'] = function(block) {
21 30
 			  var code='';

Loading…
Cancel
Save