added block to convert gesture in number
This commit is contained in:
parent
8d81b2a132
commit
65171081a9
10
main.ts
10
main.ts
@ -574,7 +574,15 @@ namespace grove {
|
||||
return joystick.joyread(xpin, ypin);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Converts the gesture name to a number
|
||||
* Useful for comparisons
|
||||
*/
|
||||
//% blockId=ggesture block="%key"
|
||||
export function ggesture(g: GroveGesture): number {
|
||||
return g;
|
||||
}
|
||||
|
||||
/**
|
||||
* Do something when a gesture is detected by Grove - Gesture
|
||||
* @param gesture type of gesture to detect
|
||||
|
Loading…
Reference in New Issue
Block a user