Skip to content

Commit 0b10bb7

Browse files
committedMar 5, 2019
Subaru safety: move camera to bus 2
1 parent bce279a commit 0b10bb7

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed
 

‎board/safety/safety_subaru.h

+5-5
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,17 @@ static int subaru_tx_hook(CAN_FIFOMailBox_TypeDef *to_send) {
1212
}
1313

1414
static int subaru_fwd_hook(int bus_num, CAN_FIFOMailBox_TypeDef *to_fwd) {
15-
15+
1616
// shifts bits 29 > 11
1717
int32_t addr = to_fwd->RIR >> 21;
1818

1919
// forward CAN 0 > 1
2020
if (bus_num == 0) {
21-
return 1; // ES CAN
21+
return 2; // ES CAN
2222
}
2323
// forward CAN 1 > 0, except ES_LKAS
24-
else if (bus_num == 1) {
25-
24+
else if (bus_num == 2) {
25+
2626
// outback 2015
2727
if (addr == 0x164) {
2828
return -1;
@@ -46,4 +46,4 @@ const safety_hooks subaru_hooks = {
4646
.tx_lin = nooutput_tx_lin_hook,
4747
.ignition = default_ign_hook,
4848
.fwd = subaru_fwd_hook,
49-
};
49+
};

0 commit comments

Comments
 (0)