panic when radio does not start

This commit is contained in:
Peli de Halleux 2016-04-15 22:41:30 -07:00
parent cd91504c1f
commit 8fb96934ca

View File

@ -13,7 +13,10 @@ namespace radio {
int radioEnable() {
int r = uBit.radio.enable();
if (r != MICROBIT_OK) return r;
if (r != MICROBIT_OK) {
uBit.panic(43);
return r;
}
if (!radioEnabled) {
uBit.radio.setGroup(pxt::programHash());
radioEnabled = true;