File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -58,6 +58,11 @@ export default function (Generator) {
58
58
return `${ Generator . spriteName ( ) } .when(:microbit_more_pin_connected, ${ pin } ) do\n` ;
59
59
} ;
60
60
61
+ Generator . microbitMore_isPinConnected = function ( block ) {
62
+ const pin = Generator . valueToCode ( block , 'PIN' , Generator . ORDER_NONE ) || null ;
63
+ return `microbit_more.pin_connected?(${ pin } )\n` ;
64
+ } ;
65
+
61
66
Generator . microbitMore_menu_buttons = function ( block ) {
62
67
const buttons = Generator . quote_ ( Generator . getFieldValue ( block , 'buttons' ) || 'A' ) ;
63
68
return [ buttons , Generator . ORDER_ATOMIC ] ;
@@ -83,6 +88,11 @@ export default function (Generator) {
83
88
return [ touchPins , Generator . ORDER_ATOMIC ] ;
84
89
} ;
85
90
91
+ Generator . microbitMore_menu_gpio = function ( block ) {
92
+ const gpio = Generator . getFieldValue ( block , 'gpio' ) || '0' ;
93
+ return [ gpio , Generator . ORDER_ATOMIC ] ;
94
+ } ;
95
+
86
96
Generator . matrix = function ( block ) {
87
97
let matrix = Generator . getFieldValue ( block , 'MATRIX' ) || '0000000000000000000000000' ;
88
98
matrix = matrix . replace ( / 0 / g, '.' ) ;
You can’t perform that action at this time.
0 commit comments