From 1ac227fb7f1d178b6923e1c143ff46a72aac00cb Mon Sep 17 00:00:00 2001 From: HelenFoster Date: Fri, 28 Jul 2017 15:44:07 +0100 Subject: [PATCH] Add button down/up to EventBusValue (#468) --- libs/core/control.cpp | 4 ++++ libs/core/enums.d.ts | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/libs/core/control.cpp b/libs/core/control.cpp index 87498723..6c137720 100644 --- a/libs/core/control.cpp +++ b/libs/core/control.cpp @@ -84,6 +84,10 @@ enum EventBusValue { //% blockIdentity="control.eventValueId" MICROBIT_EVT_ANY_ = MICROBIT_EVT_ANY, //% blockIdentity="control.eventValueId" + MICROBIT_BUTTON_EVT_DOWN_ = MICROBIT_BUTTON_EVT_DOWN, + //% blockIdentity="control.eventValueId" + MICROBIT_BUTTON_EVT_UP_ = MICROBIT_BUTTON_EVT_UP, + //% blockIdentity="control.eventValueId" MICROBIT_BUTTON_EVT_CLICK_ = MICROBIT_BUTTON_EVT_CLICK, //% blockIdentity="control.eventValueId" MICROBIT_RADIO_EVT_DATAGRAM_ = MICROBIT_RADIO_EVT_DATAGRAM, diff --git a/libs/core/enums.d.ts b/libs/core/enums.d.ts index a8193d72..116ffdda 100644 --- a/libs/core/enums.d.ts +++ b/libs/core/enums.d.ts @@ -243,6 +243,10 @@ declare namespace input { //% blockIdentity="control.eventValueId" MICROBIT_EVT_ANY = 0, // MICROBIT_EVT_ANY //% blockIdentity="control.eventValueId" + MICROBIT_BUTTON_EVT_DOWN = 1, // MICROBIT_BUTTON_EVT_DOWN + //% blockIdentity="control.eventValueId" + MICROBIT_BUTTON_EVT_UP = 2, // MICROBIT_BUTTON_EVT_UP + //% blockIdentity="control.eventValueId" MICROBIT_BUTTON_EVT_CLICK = 3, // MICROBIT_BUTTON_EVT_CLICK //% blockIdentity="control.eventValueId" MICROBIT_RADIO_EVT_DATAGRAM = 1, // MICROBIT_RADIO_EVT_DATAGRAM