@@ -43,16 +43,16 @@ Blockly.Blocks.debug_lcd_init = {
4343 }
4444} ;
4545
46- Blockly . Blocks . debug_lcd_clear = {
47- init : function ( ) {
48- this . setColour ( colorPalette . getColor ( 'protocols' ) ) ;
49- this . appendDummyInput ( )
50- . appendField ( "LCD clear" ) ;
51-
52- this . setPreviousStatement ( true , null ) ;
53- this . setNextStatement ( true , null ) ;
54- }
55- } ;
46+ // Blockly.Blocks.debug_lcd_clear = {
47+ // init: function () {
48+ // this.setColour(colorPalette.getColor('protocols'));
49+ // this.appendDummyInput()
50+ // .appendField("LCD clear");
51+ //
52+ // this.setPreviousStatement(true, null);
53+ // this.setNextStatement(true, null);
54+ // }
55+ // };
5656
5757Blockly . Blocks . debug_lcd_print = {
5858 init : function ( ) {
@@ -85,8 +85,21 @@ Blockly.Blocks.debug_lcd_action = {
8585 init : function ( ) {
8686 this . setColour ( colorPalette . getColor ( 'protocols' ) ) ;
8787 this . appendDummyInput ( )
88- . appendField ( "LCD action" )
89- . appendField ( new Blockly . FieldDropdown ( [ [ "newline" , "13" ] ] ) , "ACTION" ) ;
88+ . appendField ( "LCD command" )
89+ . appendField ( new Blockly . FieldDropdown ( [
90+ [ "clear screen" , "12" ] ,
91+ [ "move cursor right" , "9" ] ,
92+ [ "move cursor left" , "8" ] ,
93+ [ "move cursor down" , "10" ] ,
94+ [ "carriage return" , "13" ] ,
95+ [ "backlight on" , "17" ] ,
96+ [ "backlight off" , "18" ] ,
97+ [ "display off" , "21" ] ,
98+ [ "display on, cursor off" , "22" ] ,
99+ [ "display on, cursor off, blink" , "23" ] ,
100+ [ "display on, cursor on" , "24" ] ,
101+ [ "display on, cursor on, blink" , "25" ]
102+ ] ) , "ACTION" ) ;
90103
91104 this . setPreviousStatement ( true , null ) ;
92105 this . setNextStatement ( true , null ) ;
@@ -103,9 +116,9 @@ Blockly.propc.debug_lcd_init = function () {
103116 return code ;
104117} ;
105118
106- Blockly . propc . debug_lcd_clear = function ( ) {
107- return 'writeChar(debug_lcd, 12);\npause(5);\n' ;
108- } ;
119+ // Blockly.propc.debug_lcd_clear = function () {
120+ // return 'writeChar(debug_lcd, 12);\npause(5);\n';
121+ // };
109122
110123Blockly . propc . debug_lcd_print = function ( ) {
111124 var text = this . getFieldValue ( 'TEXT' ) ;
0 commit comments