Handle slave status frames
This commit is contained in:
@ -15,8 +15,8 @@ void can_init(CAN_HandleTypeDef *handle) {
|
||||
ftcan_add_filter(CAN_ID_SHUNT_BASE, 0xFF0);
|
||||
ftcan_add_filter(CAN_ID_AMS_IN, 0xFFF);
|
||||
ftcan_add_filter(CAN_ID_SLAVE_PANIC, 0xFFF);
|
||||
ftcan_add_filter(CAN_ID_SLAVE_STATUS, 0xFFF);
|
||||
ftcan_add_filter(CAN_ID_SLAVE_LOG, 0xFFF);
|
||||
// TODO: Slave status?
|
||||
}
|
||||
|
||||
HAL_StatusTypeDef can_send_status() {
|
||||
@ -37,6 +37,9 @@ void ftcan_msg_received_cb(uint16_t id, size_t datalen, const uint8_t *data) {
|
||||
case CAN_ID_SLAVE_PANIC:
|
||||
slaves_handle_panic(data);
|
||||
break;
|
||||
case CAN_ID_SLAVE_STATUS:
|
||||
slaves_handle_status(data);
|
||||
break;
|
||||
case CAN_ID_SLAVE_LOG:
|
||||
slaves_handle_log(data);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user