diff --git a/Dockerfile b/Dockerfile index 6a844ef6be..b2c2073297 100644 --- a/Dockerfile +++ b/Dockerfile @@ -52,7 +52,7 @@ ENV PATH="/root/.pyenv/bin:/root/.pyenv/shims:${PATH}" ENV PANDA_PATH=/tmp/openpilot/panda ENV OPENPILOT_REF="5690386d8d731c9bebda536a5c71c890f6dfe98c" -ENV OPENDBC_REF="5b0c73977f1428700d0344d52874a90a4c5168fb" +ENV OPENDBC_REF="40d9c723d48496229fecc436046538a53af19c11" COPY requirements.txt /tmp/ RUN pyenv install 3.11.4 && \ diff --git a/board/safety/safety_subaru.h b/board/safety/safety_subaru.h index 4fb19cac3a..12868d40fd 100644 --- a/board/safety/safety_subaru.h +++ b/board/safety/safety_subaru.h @@ -203,7 +203,7 @@ static bool subaru_tx_hook(CANPacket_t *to_send) { // check es_distance cruise_throttle limits if (addr == MSG_SUBARU_ES_Distance) { - int cruise_throttle = (GET_BYTES(to_send, 2, 2) & 0xFFFU); + int cruise_throttle = (GET_BYTES(to_send, 2, 2) & 0x1FFFU); bool cruise_cancel = GET_BIT(to_send, 56U) != 0U; if (subaru_longitudinal) { @@ -218,7 +218,7 @@ static bool subaru_tx_hook(CANPacket_t *to_send) { // check es_status transmission_rpm limits if (addr == MSG_SUBARU_ES_Status) { - int transmission_rpm = (GET_BYTES(to_send, 2, 2) & 0xFFFU); + int transmission_rpm = (GET_BYTES(to_send, 2, 2) & 0x1FFFU); violation |= longitudinal_transmission_rpm_checks(transmission_rpm, SUBARU_LONG_LIMITS); } diff --git a/tests/safety/test_subaru.py b/tests/safety/test_subaru.py index eb316ad975..61d3d9183e 100755 --- a/tests/safety/test_subaru.py +++ b/tests/safety/test_subaru.py @@ -122,7 +122,7 @@ class TestSubaruLongitudinalSafetyBase(TestSubaruSafetyBase, common.Longitudinal MIN_GAS = 808 MAX_GAS = 3400 INACTIVE_GAS = 1818 - MAX_POSSIBLE_GAS = 2**12 + MAX_POSSIBLE_GAS = 2**13 MIN_BRAKE = 0 MAX_BRAKE = 600 @@ -130,7 +130,7 @@ class TestSubaruLongitudinalSafetyBase(TestSubaruSafetyBase, common.Longitudinal MIN_RPM = 0 MAX_RPM = 2400 - MAX_POSSIBLE_RPM = 2**12 + MAX_POSSIBLE_RPM = 2**13 FWD_BLACKLISTED_ADDRS = {2: [SubaruMsg.ES_LKAS, SubaruMsg.ES_Brake, SubaruMsg.ES_Distance, SubaruMsg.ES_Status, SubaruMsg.ES_DashStatus,