|
7 | 7 | // brake rising edge
|
8 | 8 | // brake > 0mph
|
9 | 9 | const AddrBus HONDA_N_TX_MSGS[] = {{0xE4, 0}, {0x194, 0}, {0x1FA, 0}, {0x200, 0}, {0x30C, 0}, {0x33D, 0}};
|
10 |
| -const AddrBus HONDA_BG_TX_MSGS[] = {{0xE4, 2}, {0x296, 0}, {0x33D, 2}}; // Bosch Giraffe |
11 |
| -const AddrBus HONDA_BH_TX_MSGS[] = {{0xE4, 0}, {0x296, 1}, {0x33D, 0}}; // Bosch Harness |
| 10 | +const AddrBus HONDA_BG_TX_MSGS[] = {{0xE4, 2}, {0xE5, 2}, {0x296, 0}, {0x33D, 2}}; // Bosch Giraffe |
| 11 | +const AddrBus HONDA_BH_TX_MSGS[] = {{0xE4, 0}, {0xE5, 0}, {0x296, 1}, {0x33D, 0}}; // Bosch Harness |
12 | 12 |
|
13 | 13 | // Roughly calculated using the offsets in openpilot +5%:
|
14 | 14 | // In openpilot: ((gas1_norm + gas2_norm)/2) > 15
|
@@ -238,6 +238,13 @@ static int honda_tx_hook(CAN_FIFOMailBox_TypeDef *to_send) {
|
238 | 238 | }
|
239 | 239 | }
|
240 | 240 |
|
| 241 | + // Bosch supplemental control check |
| 242 | + if (addr == 0xE5) { |
| 243 | + if ((GET_BYTES_04(to_send) != 0x10800004) || ((GET_BYTES_48(to_send) & 0x00FFFFFF) != 0x0)) { |
| 244 | + tx = 0; |
| 245 | + } |
| 246 | + } |
| 247 | + |
241 | 248 | // GAS: safety check
|
242 | 249 | if (addr == 0x200) {
|
243 | 250 | if (!current_controls_allowed) {
|
@@ -322,7 +329,7 @@ static int honda_bosch_fwd_hook(int bus_num, CAN_FIFOMailBox_TypeDef *to_fwd) {
|
322 | 329 | }
|
323 | 330 | if (bus_num == bus_rdr_cam) {
|
324 | 331 | int addr = GET_ADDR(to_fwd);
|
325 |
| - int is_lkas_msg = (addr == 0xE4) || (addr == 0x33D); |
| 332 | + int is_lkas_msg = (addr == 0xE4) || (addr == 0xE5) || (addr == 0x33D); |
326 | 333 | if (!is_lkas_msg) {
|
327 | 334 | bus_fwd = bus_rdr_car;
|
328 | 335 | }
|
|
0 commit comments