Exit onConnect() when disconnected per @stigbjorlykke observation

master
Martin Woolley 2016-08-05 13:43:17 +01:00
parent b573c615b1
commit f7e55cd8a5
1 changed files with 1 additions and 1 deletions

View File

@ -44,7 +44,7 @@ void onConnected(MicroBitEvent)
// mobile app will send ASCII strings terminated with the colon character
ManagedString eom(":");
while(1) {
while(connected == 1) {
ManagedString msg = uart->readUntil(eom);
uBit.display.scroll(msg);
}