Commit c2a0853 1 parent 594863c commit c2a0853 Copy full SHA for c2a0853
File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ int hyundai_giraffe_switch_1 = 0; // is giraffe switch 1 high?
4
4
static void hyundai_rx_hook (CAN_FIFOMailBox_TypeDef * to_push ) {
5
5
6
6
int bus = (to_push -> RDTR >> 4 ) & 0xF ;
7
- // 832 is lkas cmd. If it is on bus 0, then giraffe switch 1 is high
7
+ // 832 is lkas cmd. If it is on bus 0, then giraffe switch 1 is high and we want stock
8
8
if ((to_push -> RIR >>21 ) == 832 && (bus == 0 )) {
9
9
hyundai_giraffe_switch_1 = 1 ;
10
10
}
@@ -17,10 +17,10 @@ static void hyundai_init(int16_t param) {
17
17
18
18
static int hyundai_fwd_hook (int bus_num , CAN_FIFOMailBox_TypeDef * to_fwd ) {
19
19
20
- // forward cam to radar and viceversa if car is dsu-less, except lkas cmd and hud
20
+ // forward camera to car and viceversa, excpet for lkas11 and mdps12
21
21
if ((bus_num == 0 || bus_num == 2 ) && !hyundai_giraffe_switch_1 ) {
22
22
int addr = to_fwd -> RIR >>21 ;
23
- bool is_lkas_msg = (addr == 832 || addr == 1342 ) && bus_num == 2 ;
23
+ bool is_lkas_msg = (addr == 832 && bus_num == 2 ) || ( addr == 593 && bus_num == 0 ) ;
24
24
return is_lkas_msg ? -1 : (uint8_t )(~bus_num & 0x2 );
25
25
}
26
26
return -1 ;
You can’t perform that action at this time.
0 commit comments