From da7c11ae52219d1e972e88c0e82cea9ee2a538ab Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Tue, 29 Aug 2023 12:49:12 +0000 Subject: [PATCH] fix https://github.com/microsoft/jacdac/issues/1319 --- led-strip/client.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/led-strip/client.ts b/led-strip/client.ts index ec022fde6..7b4db5fca 100644 --- a/led-strip/client.ts +++ b/led-strip/client.ts @@ -325,7 +325,10 @@ namespace modules { //% weight=80 blockGap=8 //% group="LED Strip" setAll(rgb: number) { - this.runEncoded("fade # wait 1", [rgb]) + if (!rgb) + this.runEncoded("setall #000000") + else + this.runEncoded("fade # wait 1", [rgb]) } private currAnimation = 0