Disregard AMS slave status error flag

This commit is contained in:
Jasper Blanckenburg 2023-07-12 19:34:30 +02:00
parent 410597c0f3
commit 61155995f8
1 changed files with 1 additions and 5 deletions

View File

@ -119,11 +119,7 @@ void slaves_handle_status(const uint8_t *data) {
uint8_t slave_id = data[0] & 0x7F; uint8_t slave_id = data[0] & 0x7F;
uint8_t idx = get_slave_index(slave_id); uint8_t idx = get_slave_index(slave_id);
int error = data[0] & 0x80; int error = data[0] & 0x80;
if (error) { if (!error) {
if (slaves[idx].error.kind == SLAVE_ERR_NONE) {
slaves[idx].error.kind = SLAVE_ERR_UNKNOWN;
}
} else {
slaves[idx].error.kind = SLAVE_ERR_NONE; slaves[idx].error.kind = SLAVE_ERR_NONE;
} }
slaves[idx].soc = data[1]; slaves[idx].soc = data[1];