mirror of https://github.com/commaai/panda.git
Updating X-Trail/Rogue gas_pressed threshold (#585)
This commit is contained in:
parent
32199b2e49
commit
3a8430b9d5
|
@ -56,7 +56,7 @@ static int nissan_rx_hook(CAN_FIFOMailBox_TypeDef *to_push) {
|
||||||
// X-Trail 0x15c, Leaf 0x239
|
// X-Trail 0x15c, Leaf 0x239
|
||||||
if ((addr == 0x15c) || (addr == 0x239)) {
|
if ((addr == 0x15c) || (addr == 0x239)) {
|
||||||
if (addr == 0x15c){
|
if (addr == 0x15c){
|
||||||
gas_pressed = ((GET_BYTE(to_push, 5) << 2) | ((GET_BYTE(to_push, 6) >> 6) & 0x3)) > 1;
|
gas_pressed = ((GET_BYTE(to_push, 5) << 2) | ((GET_BYTE(to_push, 6) >> 6) & 0x3)) > 3;
|
||||||
} else {
|
} else {
|
||||||
gas_pressed = GET_BYTE(to_push, 0) > 3;
|
gas_pressed = GET_BYTE(to_push, 0) > 3;
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,7 @@ class TestNissanSafety(common.PandaSafetyTest):
|
||||||
|
|
||||||
TX_MSGS = [[0x169, 0], [0x2b1, 0], [0x4cc, 0], [0x20b, 2], [0x280, 2]]
|
TX_MSGS = [[0x169, 0], [0x2b1, 0], [0x4cc, 0], [0x20b, 2], [0x280, 2]]
|
||||||
STANDSTILL_THRESHOLD = 0
|
STANDSTILL_THRESHOLD = 0
|
||||||
GAS_PRESSED_THRESHOLD = 1
|
GAS_PRESSED_THRESHOLD = 3
|
||||||
RELAY_MALFUNCTION_ADDR = 0x169
|
RELAY_MALFUNCTION_ADDR = 0x169
|
||||||
RELAY_MALFUNCTION_BUS = 0
|
RELAY_MALFUNCTION_BUS = 0
|
||||||
FWD_BLACKLISTED_ADDRS = {0: [0x280], 2: [0x169, 0x2b1, 0x4cc]}
|
FWD_BLACKLISTED_ADDRS = {0: [0x280], 2: [0x169, 0x2b1, 0x4cc]}
|
||||||
|
|
Loading…
Reference in New Issue