Even more v2.2

This commit is contained in:
Gunnar Skjold
2022-12-02 20:38:56 +01:00
parent 0927cab8e2
commit b07ed075f4
38 changed files with 68 additions and 25 deletions

View File

@@ -216,9 +216,14 @@ bool AmsData::isTwoPhase() {
}
int8_t AmsData::getLastError() {
return lastError;
return lastErrorCount > 3 ? lastError : 0;
}
void AmsData::setLastError(int8_t lastError) {
this->lastError = lastError;
if(lastError == 0) {
lastErrorCount = 0;
} else {
lastErrorCount++;
}
}