panic when radio does not start
This commit is contained in:
parent
cd91504c1f
commit
8fb96934ca
@ -13,7 +13,10 @@ namespace radio {
|
|||||||
|
|
||||||
int radioEnable() {
|
int radioEnable() {
|
||||||
int r = uBit.radio.enable();
|
int r = uBit.radio.enable();
|
||||||
if (r != MICROBIT_OK) return r;
|
if (r != MICROBIT_OK) {
|
||||||
|
uBit.panic(43);
|
||||||
|
return r;
|
||||||
|
}
|
||||||
if (!radioEnabled) {
|
if (!radioEnabled) {
|
||||||
uBit.radio.setGroup(pxt::programHash());
|
uBit.radio.setGroup(pxt::programHash());
|
||||||
radioEnabled = true;
|
radioEnabled = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user