Some HAN serial port debugging

This commit is contained in:
Gunnar Skjold
2023-04-07 08:36:42 +02:00
parent 68bbfd6527
commit b7854baa6d
5 changed files with 56 additions and 14 deletions

View File

@@ -219,7 +219,7 @@ bool AmsData::isTwoPhase() {
}
int8_t AmsData::getLastError() {
return lastErrorCount > 3 ? lastError : 0;
return lastErrorCount > 1 ? lastError : 0;
}
void AmsData::setLastError(int8_t lastError) {

File diff suppressed because one or more lines are too long

View File

@@ -117,6 +117,12 @@ export function hanError(err) {
case -52: return "Decryption failed";
case -53: return "Encryption key invalid";
case 90: return "No HAN data received last 30s";
case 91: return "Serial break";
case 92: return "Serial buffer full";
case 93: return "Serial FIFO overflow";
case 94: return "Serial frame error";
case 95: return "Serial parity error";
case 96: return "RX error";
case 98: return "Exception in code, debugging necessary";
case 99: return "Autodetection failed";
}