Ok, just fixed it I think. Try the latest cutting edge build.
What was happening was since 2v13 the start time was set wrong (at time=0). After I'd made the timer improvements in 2v13 I did test waveform, but I basically booted the device up so getTime()==0 and checked the waveform almost right away with repeat=true - and in that case it worked.
But otherwise it would have failed. I'm pretty surprised this was never found as the Micro:bit 2 build has a 'play' function that would have been affected by this too!
... and @fanoush is right re: on("finish" position too - if it was set earlier you'd have seen it being called. It just would have been called almost immediately (when it shouldn't have)
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Ok, just fixed it I think. Try the latest cutting edge build.
What was happening was since 2v13 the start time was set wrong (at time=0). After I'd made the timer improvements in 2v13 I did test waveform, but I basically booted the device up so getTime()==0 and checked the waveform almost right away with repeat=true - and in that case it worked.
But otherwise it would have failed. I'm pretty surprised this was never found as the Micro:bit 2 build has a 'play' function that would have been affected by this too!
... and @fanoush is right re:
on("finish"
position too - if it was set earlier you'd have seen it being called. It just would have been called almost immediately (when it shouldn't have)