Closed tballmsft closed 2 weeks ago
OK. Here's what's going on (a bad interaction between features):
Sigh...
I think the solution here is for the Jacdac extension to have a way to specify that only one code (mbit) simulator is allowed. @eanders-ms, @pelikhan, @abchatra - what do you think? This can easily be done via providing a new method in the simulator framework that can be called from Static TypeScript.
The above changes provide a function to turn off multiple simulators (for the rest of a program execution). See following program
input.onButtonPressed(Button.A, function () {
radio.sendNumber(0)
})
input.onButtonPressed(Button.B, function () {
control.reset()
})
input.onButtonPressed(Button.AB, function () {
control.singleSimulator()
})
approved and committed (will need to bump pxt, pxt-common-packages, pxt-microbit): @abchatra
Done
See https://makecode.microbit.org/_Eei0YxUotXsy
The program uses the Jacdac extension and sends a radio message. The bad behavior:
Expected behavior: