reduce signal change logs when generating syn

This commit is contained in:
John
2022-11-03 07:40:06 +01:00
parent 6495851c7f
commit 7ff161465a
2 changed files with 8 additions and 2 deletions
+6 -2
View File
@@ -1094,9 +1094,13 @@ result_t BusHandler::setState(BusState state, result_t result, bool firstRepetit
logDebug(lf_bus, "switching from %s to %s", getStateCode(m_state), getStateCode(state));
}
if (state == bs_noSignal) {
logError(lf_bus, "signal lost");
if (m_generateSynInterval == 0 || m_state != bs_skip) {
logError(lf_bus, "signal lost");
}
} else if (m_state == bs_noSignal) {
logNotice(lf_bus, "signal acquired");
if (m_generateSynInterval == 0 || state != bs_skip) {
logNotice(lf_bus, "signal acquired");
}
}
m_state = state;