|
|
|
@ -46,9 +46,12 @@ int main()
|
|
|
|
|
|
|
|
|
|
if (i == 10)
|
|
|
|
|
{
|
|
|
|
|
// Bring up the BLE stack if it isn't alredy done.
|
|
|
|
|
// Start the BLE stack, if it isn't already running.
|
|
|
|
|
if (!uBit.ble)
|
|
|
|
|
uBit.bleManager.init(uBit.getName(), uBit.getSerial());
|
|
|
|
|
{
|
|
|
|
|
uBit.bleManager.init(uBit.getName(), uBit.getSerial(), true);
|
|
|
|
|
uBit.ble = uBit.bleManager.ble;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Enter pairing mode, using the LED matrix for any necessary pairing operations
|
|
|
|
|
uBit.bleManager.pairingMode(uBit.display);
|
|
|
|
@ -56,6 +59,15 @@ int main()
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#if CONFIG_ENABLED(MICROBIT_BLE_ENABLED)
|
|
|
|
|
// Start the BLE stack, if it isn't already running.
|
|
|
|
|
if (!uBit.ble)
|
|
|
|
|
{
|
|
|
|
|
uBit.bleManager.init(uBit.getName(), uBit.getSerial(), false);
|
|
|
|
|
uBit.ble = uBit.bleManager.ble;
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
app_main();
|
|
|
|
|
|
|
|
|
|
// If app_main exits, there may still be other fibers running, registered event handlers etc.
|
|
|
|
|