From 2bcae024936b2cbf86f1d7bdd018b95d298e4519 Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Fri, 5 Oct 2018 14:51:27 -0700 Subject: [PATCH] control.reset support (#1352) * control.reset support * updated pxt --- package.json | 2 +- sim/state/misc.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 0628c5e4..9d90b4c1 100644 --- a/package.json +++ b/package.json @@ -42,6 +42,6 @@ }, "dependencies": { "pxt-common-packages": "0.24.2", - "pxt-core": "4.1.18" + "pxt-core": "4.1.19" } } diff --git a/sim/state/misc.ts b/sim/state/misc.ts index a5d39e40..c58f80f3 100644 --- a/sim/state/misc.ts +++ b/sim/state/misc.ts @@ -40,7 +40,8 @@ namespace pxsim.control { } export function reset() { - U.userError("reset not implemented in simulator yet") + const cb = getResume(); + pxsim.runtime.restart(); } export function waitMicros(micros: number) {