mirror of
https://github.com/UtilitechAS/amsreader-firmware.git
synced 2026-01-23 11:08:25 +00:00
Better debug output whem receiving unknown data
This commit is contained in:
parent
2850be4e48
commit
1b6ce203b7
@ -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) {
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user