added pins->on pulsed

This commit is contained in:
Peli de Halleux
2016-05-16 16:24:44 -07:00
parent a667467bbd
commit 89f09c7f35
11 changed files with 117 additions and 31 deletions

View File

@ -104,7 +104,7 @@ namespace input {
* @param button TODO
* @param body TODO
*/
//% help=input/on-button-pressed weight=85
//% help=input/on-button-pressed weight=85 blockGap=8
//% blockId=device_button_event block="on button|%NAME|pressed" icon="\uf192"
void onButtonPressed(Button button, Action body) {
registerWithDal((int)button, MICROBIT_BUTTON_EVT_CLICK, body);
@ -114,7 +114,7 @@ namespace input {
* Attaches code to run when the screen is facing up.
* @param body TODO
*/
//% help=input/on-gesture weight=84
//% help=input/on-gesture weight=84 blockGap=8
//% blockId=device_gesture_event block="on |%NAME" icon="\uf135"
void onGesture(Gesture gesture, Action body) {
registerWithDal(MICROBIT_ID_GESTURE, (int)gesture, body);