22goog . provide ( 'Blockly.Blocks.pins' ) ;
33goog . require ( 'Blockly.Blocks' ) ;
44Blockly . Blocks . pins . HUE = 230 ;
5- profile [ "default" ] = profile [ "esp32_arduino" ] ;
65
76Blockly . Blocks [ 'pins_dac' ] = {
8- init : function ( ) {
7+ init : function ( ) {
98 this . setColour ( Blockly . Blocks . pins . HUE ) ;
109 this . appendDummyInput ( "" )
11- . appendField ( new Blockly . FieldDropdown ( profile . default . dac ) , 'PIN' ) ;
10+ . appendField ( new Blockly . FieldDropdown ( profile . default . dac ) , 'PIN' ) ;
1211 this . setOutput ( true ) ;
13- }
12+ }
1413} ;
1514
1615Blockly . Blocks [ 'pins_button' ] = {
17- init : function ( ) {
16+ init : function ( ) {
1817 this . setColour ( Blockly . Blocks . pins . HUE ) ;
1918 this . appendDummyInput ( "" )
20- . appendField ( new Blockly . FieldDropdown ( profile . default . button ) , 'PIN' ) ;
19+ . appendField ( new Blockly . FieldDropdown ( profile . default . button ) , 'PIN' ) ;
2120 this . setOutput ( true , Number ) ;
22- }
21+ }
2322} ;
2423
2524Blockly . Blocks [ 'pins_touch' ] = {
26- init : function ( ) {
25+ init : function ( ) {
2726 this . setColour ( Blockly . Blocks . pins . HUE ) ;
2827 this . appendDummyInput ( "" )
29- . appendField ( new Blockly . FieldDropdown ( profile . default . touch ) , 'PIN' ) ;
28+ . appendField ( new Blockly . FieldDropdown ( profile . default . touch ) , 'PIN' ) ;
3029 this . setOutput ( true ) ;
31- }
30+ }
3231} ;
3332
3433Blockly . Blocks [ 'pins_serial' ] = {
3534 init : function ( ) {
3635 this . setColour ( Blockly . Blocks . pins . HUE ) ;
3736 this . appendDummyInput ( "" )
38- . appendField ( new Blockly . FieldDropdown ( profile . default . serial_pin ) , 'PIN' ) ;
37+ . appendField ( new Blockly . FieldDropdown ( profile . default . serial_pin ) , 'PIN' ) ;
3938 this . setOutput ( true , Number ) ;
4039 }
4140} ;
@@ -44,7 +43,7 @@ Blockly.Blocks['pins_playlist'] = {
4443 init : function ( ) {
4544 this . setColour ( Blockly . Blocks . pins . HUE ) ;
4645 this . appendDummyInput ( "" )
47- . appendField ( new Blockly . FieldDropdown ( profile . default . playlist ) , 'PIN' ) ;
46+ . appendField ( new Blockly . FieldDropdown ( profile . default . playlist ) , 'PIN' ) ;
4847 this . setOutput ( true ) ;
4948 }
5049} ;
@@ -53,7 +52,7 @@ Blockly.Blocks['pins_exlcdh'] = {
5352 init : function ( ) {
5453 this . setColour ( Blockly . Blocks . pins . HUE ) ;
5554 this . appendDummyInput ( "" )
56- . appendField ( new Blockly . FieldDropdown ( profile . default . exlcdh ) , 'PIN' ) ;
55+ . appendField ( new Blockly . FieldDropdown ( profile . default . exlcdh ) , 'PIN' ) ;
5756 this . setOutput ( true , Number ) ;
5857 }
5958} ;
@@ -62,7 +61,7 @@ Blockly.Blocks['pins_exlcdv'] = {
6261 init : function ( ) {
6362 this . setColour ( Blockly . Blocks . pins . HUE ) ;
6463 this . appendDummyInput ( "" )
65- . appendField ( new Blockly . FieldDropdown ( profile . default . exlcdv ) , 'PIN' ) ;
64+ . appendField ( new Blockly . FieldDropdown ( profile . default . exlcdv ) , 'PIN' ) ;
6665 this . setOutput ( true , Number ) ;
6766 }
6867} ;
@@ -71,15 +70,15 @@ Blockly.Blocks['pins_axis'] = {
7170 init : function ( ) {
7271 this . setColour ( Blockly . Blocks . pins . HUE ) ;
7372 this . appendDummyInput ( "" )
74- . appendField ( new Blockly . FieldDropdown ( profile . default . axis ) , 'PIN' ) ;
73+ . appendField ( new Blockly . FieldDropdown ( profile . default . axis ) , 'PIN' ) ;
7574 this . setOutput ( true , Number ) ;
7675 }
7776} ;
7877Blockly . Blocks [ 'pins_brightness' ] = {
7978 init : function ( ) {
8079 this . setColour ( Blockly . Blocks . pins . HUE ) ;
8180 this . appendDummyInput ( "" )
82- . appendField ( new Blockly . FieldDropdown ( profile . default . brightness ) , 'PIN' ) ;
81+ . appendField ( new Blockly . FieldDropdown ( profile . default . brightness ) , 'PIN' ) ;
8382 this . setOutput ( true , Number ) ;
8483 }
8584} ;
@@ -88,7 +87,7 @@ Blockly.Blocks['pins_tone_notes'] = {
8887 init : function ( ) {
8988 this . setColour ( Blockly . Blocks . pins . HUE ) ;
9089 this . appendDummyInput ( "" )
91- . appendField ( new Blockly . FieldDropdown ( profile . default . tone_notes ) , 'PIN' ) ;
90+ . appendField ( new Blockly . FieldDropdown ( profile . default . tone_notes ) , 'PIN' ) ;
9291 this . setOutput ( true , Number ) ;
9392 }
9493} ;
@@ -97,7 +96,7 @@ Blockly.Blocks['pins_radio_power'] = {
9796 init : function ( ) {
9897 this . setColour ( Blockly . Blocks . pins . HUE ) ;
9998 this . appendDummyInput ( "" )
100- . appendField ( new Blockly . FieldDropdown ( profile . default . radio_power ) , 'PIN' ) ;
99+ . appendField ( new Blockly . FieldDropdown ( profile . default . radio_power ) , 'PIN' ) ;
101100 this . setOutput ( true , Number ) ;
102101 }
103102} ;
@@ -106,7 +105,7 @@ Blockly.Blocks['pins_radio_datarate'] = {
106105 init : function ( ) {
107106 this . setColour ( Blockly . Blocks . pins . HUE ) ;
108107 this . appendDummyInput ( "" )
109- . appendField ( new Blockly . FieldDropdown ( profile . default . radio_datarate ) , 'PIN' ) ;
108+ . appendField ( new Blockly . FieldDropdown ( profile . default . radio_datarate ) , 'PIN' ) ;
110109 this . setOutput ( true , Number ) ;
111110 }
112111} ;
@@ -115,7 +114,7 @@ Blockly.Blocks['pins_one_more'] = {
115114 init : function ( ) {
116115 this . setColour ( Blockly . Blocks . pins . HUE ) ;
117116 this . appendDummyInput ( "" )
118- . appendField ( new Blockly . FieldDropdown ( profile . default . one_more ) , 'PIN' ) ;
117+ . appendField ( new Blockly . FieldDropdown ( profile . default . one_more ) , 'PIN' ) ;
119118 this . setOutput ( true ) ;
120119 }
121120} ;
@@ -124,7 +123,7 @@ Blockly.Blocks['serial_select'] = {
124123 init : function ( ) {
125124 this . setColour ( Blockly . Blocks . pins . HUE ) ;
126125 this . appendDummyInput ( "" )
127- . appendField ( new Blockly . FieldDropdown ( profile . default . serial_select ) , 'PIN' ) ;
126+ . appendField ( new Blockly . FieldDropdown ( profile . default . serial_select ) , 'PIN' ) ;
128127 this . setOutput ( true ) ;
129128 }
130129} ;
0 commit comments