Fix slave error source
This commit is contained in:
parent
ce4d7253eb
commit
c54f3a65e3
|
@ -87,9 +87,7 @@ void slaves_check() {
|
||||||
min_voltage = min_voltage_new;
|
min_voltage = min_voltage_new;
|
||||||
max_temp = max_temp_new;
|
max_temp = max_temp_new;
|
||||||
|
|
||||||
if (any_slave_error) {
|
ts_sm_set_error_source(TS_ERROR_SOURCE_SLAVES, any_slave_error);
|
||||||
ts_sm_set_error_source(TS_ERROR_SOURCE_SLAVES, 1);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void slaves_handle_panic(const uint8_t *data) {
|
void slaves_handle_panic(const uint8_t *data) {
|
||||||
|
@ -112,6 +110,7 @@ void slaves_handle_panic(const uint8_t *data) {
|
||||||
}
|
}
|
||||||
slaves[idx].error.data = ftcan_unmarshal_unsigned(&data, 4);
|
slaves[idx].error.data = ftcan_unmarshal_unsigned(&data, 4);
|
||||||
slaves[idx].last_message = HAL_GetTick();
|
slaves[idx].last_message = HAL_GetTick();
|
||||||
|
ts_sm_set_error_source(TS_ERROR_SOURCE_SLAVES, 1);
|
||||||
can_send_error(TS_ERRORKIND_SLAVE_PANIC, slave_id);
|
can_send_error(TS_ERRORKIND_SLAVE_PANIC, slave_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue