From d883bf1db32745ecb97caf350069920e2390a747 Mon Sep 17 00:00:00 2001 From: Caitlin Hennessy Date: Tue, 1 Aug 2017 09:58:16 -0700 Subject: [PATCH 1/3] Add eventTimestamp and eventValue to pxsim.control --- sim/state/misc.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sim/state/misc.ts b/sim/state/misc.ts index 19804c42..1212fbf1 100644 --- a/sim/state/misc.ts +++ b/sim/state/misc.ts @@ -65,6 +65,14 @@ namespace pxsim.control { // TODO mode? board().bus.queue(id, evid) } + + export function eventTimestamp() { + return board().bus.getLastEventTime() + } + + export function eventValue() { + return board().bus.getLastEvent() + } } namespace pxsim.pxtcore { From 511dd423d0cfec891865ff9760104385aad7e588 Mon Sep 17 00:00:00 2001 From: Caitlin Hennessy Date: Tue, 1 Aug 2017 17:03:16 -0700 Subject: [PATCH 2/3] Rename 'lastEvent' to 'lastEventValue' to match microbit docs --- sim/state/misc.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sim/state/misc.ts b/sim/state/misc.ts index 1212fbf1..cc16ed92 100644 --- a/sim/state/misc.ts +++ b/sim/state/misc.ts @@ -71,7 +71,7 @@ namespace pxsim.control { } export function eventValue() { - return board().bus.getLastEvent() + return board().bus.getLastEventValue() } } From 2fd1d4c69dbdee8ba4f62803d4f34e27316697f5 Mon Sep 17 00:00:00 2001 From: Caitlin Hennessy Date: Wed, 2 Aug 2017 10:41:49 -0700 Subject: [PATCH 3/3] Increment pxt-core version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a35fe6e6..2b835d40 100644 --- a/package.json +++ b/package.json @@ -38,6 +38,6 @@ "semantic-ui-less": "^2.2.4" }, "dependencies": { - "pxt-core": "0.12.103" + "pxt-core": "0.12.104" } }