also revert result back to timeout when decoding the scan result failed

This commit is contained in:
john30
2017-06-03 14:07:44 +02:00
parent 4f9959448a
commit 7a569e274a
+1 -1
View File
@@ -1480,7 +1480,7 @@ result_t BusHandler::scanAndWait(symbol_t dstAddress, bool loadScanConfig, bool
bool timedOut = result == RESULT_ERR_TIMEOUT;
if (timedOut || result == RESULT_OK) {
result = loadScanConfigFile(m_messages, dstAddress, false, &file); // try to load even if one message timed out
if (timedOut && result == RESULT_EMPTY) {
if (timedOut && result != RESULT_OK) {
result = RESULT_ERR_TIMEOUT; // back to previous result
}
}