Better debug output whem receiving unknown data

This commit is contained in:
Gunnar Skjold 2022-10-13 17:40:44 +02:00
parent 2850be4e48
commit 1b6ce203b7
2 changed files with 7 additions and 2 deletions

View File

@ -830,6 +830,11 @@ bool readHanPort() {
}
if(pos == DATA_PARSE_INCOMPLETE) {
return false;
} else if(pos == DATA_PARSE_UNKNOWN_DATA) {
len = len + hanSerial->readBytes(hanBuffer+len, BUF_SIZE_HAN-len);
debugPrint(hanBuffer, 0, len);
len = 0;
return false;
}
if(pos == DATA_PARSE_INTERMEDIATE_SEGMENT) {

View File

@ -371,10 +371,10 @@ bool HwTools::ledOff(uint8_t color) {
bool HwTools::ledBlink(uint8_t color, uint8_t blink) {
for(int i = 0; i < blink; i++) {
if(!ledOn(color)) return false;
delay(50);
delay(150);
ledOff(color);
if(i != blink-1)
delay(200);
delay(250);
}
return true;
}