File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed
Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,10 @@ static bool honda_alt_brake_msg = false;
3737static bool honda_fwd_brake = false;
3838static bool honda_bosch_long = false;
3939static bool honda_bosch_radarless = false;
40+
41+
42+ static bool honda_addr_1a6_detect = false;
43+
4044typedef enum {HONDA_NIDEC , HONDA_BOSCH } HondaHw ;
4145static HondaHw honda_hw = HONDA_NIDEC ;
4246
@@ -87,8 +91,16 @@ static void honda_rx_hook(const CANPacket_t *to_push) {
8791
8892 // check ACC main state
8993 // 0x326 for all Bosch and some Nidec, 0x1A6 for some Nidec
90- if ((addr == 0x326 ) || (addr == 0x1A6 )) {
91- acc_main_on = GET_BIT (to_push , ((addr == 0x326 ) ? 28U : 47U ));
94+ // Odyssey RC5 japanese type use 0x1a6 for scm_buttons and main_on signal
95+ // But 0x326 also exist. So we need to ignore it.
96+ if (addr == 0x1A6 ) {
97+ honda_addr_1a6_detect = true;
98+ acc_main_on = GET_BIT (to_push , 47U );
99+ if (!acc_main_on ) {
100+ controls_allowed = false;
101+ }
102+ } else if (addr == 0x326 && !honda_addr_1a6_detect ) {
103+ acc_main_on = GET_BIT (to_push , 28U );
92104 if (!acc_main_on ) {
93105 controls_allowed = false;
94106 }
You can’t perform that action at this time.
0 commit comments