Updating X-Trail/Rogue gas_pressed threshold (#585)

This commit is contained in:
Andre Volmensky 2020-08-09 03:10:32 +09:00 committed by GitHub
parent 32199b2e49
commit 3a8430b9d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -56,7 +56,7 @@ static int nissan_rx_hook(CAN_FIFOMailBox_TypeDef *to_push) {
// X-Trail 0x15c, Leaf 0x239
if ((addr == 0x15c) || (addr == 0x239)) {
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 {
gas_pressed = GET_BYTE(to_push, 0) > 3;
}

View File

@ -19,7 +19,7 @@ class TestNissanSafety(common.PandaSafetyTest):
TX_MSGS = [[0x169, 0], [0x2b1, 0], [0x4cc, 0], [0x20b, 2], [0x280, 2]]
STANDSTILL_THRESHOLD = 0
GAS_PRESSED_THRESHOLD = 1
GAS_PRESSED_THRESHOLD = 3
RELAY_MALFUNCTION_ADDR = 0x169
RELAY_MALFUNCTION_BUS = 0
FWD_BLACKLISTED_ADDRS = {0: [0x280], 2: [0x169, 0x2b1, 0x4cc]}