Minor clean up to Subaru fwd hook

master
Riccardo 2019-06-11 19:42:53 -07:00
parent b4c52a1bda
commit 264de67fe8
1 changed files with 2 additions and 9 deletions

View File

@ -94,18 +94,11 @@ static int subaru_tx_hook(CAN_FIFOMailBox_TypeDef *to_send) {
}
static int subaru_fwd_hook(int bus_num, CAN_FIFOMailBox_TypeDef *to_fwd) {
// shifts bits 29 > 11
int32_t addr = to_fwd->RIR >> 21;
// forward CAN 0 > 1
if (bus_num == 0) {
return 2; // ES CAN
}
// forward CAN 1 > 0, except ES_LKAS
else if (bus_num == 2) {
return 2; // Camera CAN
} else if (bus_num == 2) {
// 356 is LKAS for outback 2015
// 356 is LKAS for Global Platform
// 545 is ES_Distance