1
0
Fork 0

Bugfix error reset HB consumer

Exclude the HB status "UNKNOWN" when updating the state of allMonitoredActiveCurrent.
This commit is contained in:
Frab012 2026-07-03 14:00:35 +02:00 committed by GitHub
parent 8c09a433ef
commit 3f5edb7d59
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -377,11 +377,13 @@ CO_HBconsumer_process(CO_HBconsumer_t* HBcons, bool_t NMTisPreOrOperational, uin
#endif
}
if (monitoredNode->HBstate != CO_HBconsumer_ACTIVE) {
allMonitoredActiveCurrent = false;
}
if (monitoredNode->NMTstate != CO_NMT_OPERATIONAL) {
allMonitoredOperationalCurrent = false;
if (monitoredNode->HBstate != CO_HBconsumer_UNKNOWN) {
if (monitoredNode->HBstate != CO_HBconsumer_ACTIVE) {
allMonitoredActiveCurrent = false;
}
if (monitoredNode->NMTstate != CO_NMT_OPERATIONAL) {
allMonitoredOperationalCurrent = false;
}
}
#if (((CO_CONFIG_HB_CONS)&CO_CONFIG_HB_CONS_CALLBACK_CHANGE) != 0) \
|| (((CO_CONFIG_HB_CONS)&CO_CONFIG_HB_CONS_CALLBACK_MULTI) != 0)