From 7d5a55742d312aba36fdd9940c64efee093f3ae8 Mon Sep 17 00:00:00 2001 From: GrandpaBond <89019204+GrandpaBond@users.noreply.github.com> Date: Fri, 17 Nov 2023 09:15:34 +0000 Subject: [PATCH] Fix setNextTempo() + test.ts issues --- flexFX.ts | 2 +- pxt.json | 3 +-- test.ts | 6 +++++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/flexFX.ts b/flexFX.ts index 34a9581..66b6d98 100644 --- a/flexFX.ts +++ b/flexFX.ts @@ -862,7 +862,7 @@ namespace flexFX { //% group="Play-list" //% weight=210 export function setNextTempo(bpm: number) { - tickMs = 60000/bpm; + tickMs = 15000/bpm; // = (60*1000) / (4*bpm) } diff --git a/pxt.json b/pxt.json index 0c01c6f..8c4fb79 100644 --- a/pxt.json +++ b/pxt.json @@ -9,8 +9,7 @@ "flexFX.ts", "README.md", "tutorial-info-cache.json", - "main.ts", - "temp.md" + "main.ts" ], "testFiles": [ "test.ts" diff --git a/test.ts b/test.ts index 0347060..1647caa 100644 --- a/test.ts +++ b/test.ts @@ -186,15 +186,19 @@ pause(2000); // check asynchrony of tunes basic.showIcon(IconNames.Target); -flexFX.playTune("birthday", "hum", false, 200, 6000, -24); +flexFX.playTune("birthday", "hum", false, 200, 12000, -5); basic.showNumber(flexFX.waitingToPlay()); pause(1000); flexFX.startPlaying(); while (flexFX.isActive()) { images.iconImage(IconNames.StickFigure).showImage(-1, 150); + pause(200); images.iconImage(IconNames.StickFigure).showImage(0, 150); + pause(200); images.iconImage(IconNames.StickFigure).showImage(1, 150); + pause(200); images.iconImage(IconNames.StickFigure).showImage(0, 150); + pause(200); } basic.showIcon(IconNames.Yes);