diff --git a/Core/Src/slave_monitoring.c b/Core/Src/slave_monitoring.c index a6d568a..1066215 100644 --- a/Core/Src/slave_monitoring.c +++ b/Core/Src/slave_monitoring.c @@ -119,11 +119,7 @@ void slaves_handle_status(const uint8_t *data) { uint8_t slave_id = data[0] & 0x7F; uint8_t idx = get_slave_index(slave_id); int error = data[0] & 0x80; - if (error) { - if (slaves[idx].error.kind == SLAVE_ERR_NONE) { - slaves[idx].error.kind = SLAVE_ERR_UNKNOWN; - } - } else { + if (!error) { slaves[idx].error.kind = SLAVE_ERR_NONE; } slaves[idx].soc = data[1];