-
Notifications
You must be signed in to change notification settings - Fork 131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reset in pairing mode not available for radio programs #392
Comments
@jaustin @finneyj @microbit-sam this feature only works with a bluetooth program., can we get it always on? |
Looks like at the moment this is only getting handled in the PartialFlashingService but could potentially be registered in uBit https://github.com/lancaster-university/microbit/blob/master/source/MicroBit.cpp#L201 @microbit-sam what if we added a handler in uBit only if we're not also bringing up BLE? Looks like it relies on a StorageObject in BleManager at the moment hence the dependency but we do also have that in uBit. It might be a bit of duplication but we could possibly factor it out to a static method that takes a stroageobject in BLEManager? |
ack, will implement tomorrow |
PR in MakeCode: microsoft/pxt-microbit#1329 |
@microbit-sam ping |
Sorry for the delay @pelikhan I've moved it into uBit, however the existing event listener is listening for when other listeners are created. We can moved the reset into pairing mode code into this listener, but it means that the event required will be:
Which is probably a bad/confusing idea.. and it doesn't look possible to specify multiple event sources @finneyj is this a bad idea? |
@microbit-sam you should be able to use a full wildcard and register the uBit listener as (MICROBIT_ID_ANY, MICROBIT_EVT_ANY), but then all the events in the micro:bit's universe would get piped through that function. .. This is a processing / RAM usage tradeoff I guess... and the micro:bit is relatively processor rich. |
Cool, once the PRs submitted against microbit and microbit-dal are reviewed and merged you will be able to trigger a reset into pairing mode with a Example: |
I am also going to add back the "pairing mode" in our "open" setting in MakeCode. Otherwise, it's impossible to switch into this mode. |
To save resources we can implement this as a function call instead of an event. In that case we need to check if MakeCode has got anything implemented already in this area. |
This event is ignored when BLE is turned off.
The text was updated successfully, but these errors were encountered: