![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
First Commit
Dependencies: mbed Crypto_light mbed-rtos
Spin it 2 win it
Diff: main.cpp
- Revision:
- 13:ecccfc611025
- Parent:
- 12:1b2e2540e4e1
- Child:
- 14:66746291017c
diff -r 1b2e2540e4e1 -r ecccfc611025 main.cpp --- a/main.cpp Tue Mar 20 13:03:29 2018 +0000 +++ b/main.cpp Tue Mar 20 13:17:10 2018 +0000 @@ -151,20 +151,21 @@ if(bufPos >= CHAR_ARR_SIZE) { putMessage(MSG_OVERFLOW, bufPos); bufPos = 0; - break; } + else{ - osEvent newEvent = inCharQ.get(); - uint8_t newChar = (uint8_t)newEvent.value.p; + osEvent newEvent = inCharQ.get(); + uint8_t newChar = (uint8_t)newEvent.value.p; - if(newChar == '\r' || newChar == '\n') { - charSeq[bufPos] = '\0'; - bufPos = 0; - setNewCmd(charSeq); - } - else { - charSeq[bufPos] = newChar; - bufPos++; + if(newChar == '\r' || newChar == '\n') { + charSeq[bufPos] = '\0'; + bufPos = 0; + setNewCmd(charSeq); + } + else { + charSeq[bufPos] = newChar; + bufPos++; + } } } } @@ -173,7 +174,6 @@ - volatile uint16_t hashcount = 0; void do_hashcount() {