opendbc updates (#2245)

* opendbc updates

* get latest opendbc in docker

* .
This commit is contained in:
Adeeb Shihadeh
2025-07-29 14:16:20 -07:00
committed by GitHub
parent 9c0be978d5
commit b23c7aa38b
3 changed files with 15 additions and 11 deletions

View File

@@ -11,5 +11,9 @@ COPY pyproject.toml __init__.py setup.sh $WORKDIR
RUN mkdir -p $WORKDIR/python/ && touch $WORKDIR/__init__.py RUN mkdir -p $WORKDIR/python/ && touch $WORKDIR/__init__.py
RUN apt-get update && apt-get install -y --no-install-recommends sudo && DEBIAN_FRONTEND=noninteractive $WORKDIR/setup.sh RUN apt-get update && apt-get install -y --no-install-recommends sudo && DEBIAN_FRONTEND=noninteractive $WORKDIR/setup.sh
# second pass for the opendbc moving tag
ARG CACHEBUST=1
RUN DEBIAN_FRONTEND=noninteractive $WORKDIR/setup.sh
RUN git config --global --add safe.directory $WORKDIR/panda RUN git config --global --add safe.directory $WORKDIR/panda
COPY . $WORKDIR COPY . $WORKDIR

2
Jenkinsfile vendored
View File

@@ -85,7 +85,7 @@ pipeline {
steps { steps {
timeout(time: 20, unit: 'MINUTES') { timeout(time: 20, unit: 'MINUTES') {
script { script {
dockerImage = docker.build("${env.DOCKER_IMAGE_TAG}") dockerImage = docker.build("${env.DOCKER_IMAGE_TAG}", "--build-arg CACHEBUST=${env.BUILD_NUMBER} .")
} }
} }
} }

View File

@@ -160,28 +160,28 @@ void can_set_forwarding(uint8_t from, uint8_t to) {
} }
#endif #endif
void ignition_can_hook(CANPacket_t *to_push) { void ignition_can_hook(CANPacket_t *msg) {
int bus = GET_BUS(to_push); int bus = GET_BUS(msg);
if (bus == 0) { if (bus == 0) {
int addr = GET_ADDR(to_push); int addr = GET_ADDR(msg);
int len = GET_LEN(to_push); int len = GET_LEN(msg);
// GM exception // GM exception
if ((addr == 0x1F1) && (len == 8)) { if ((addr == 0x1F1) && (len == 8)) {
// SystemPowerMode (2=Run, 3=Crank Request) // SystemPowerMode (2=Run, 3=Crank Request)
ignition_can = (GET_BYTE(to_push, 0) & 0x2U) != 0U; ignition_can = (msg->data[0] & 0x2U) != 0U;
ignition_can_cnt = 0U; ignition_can_cnt = 0U;
} }
// Rivian R1S/T GEN1 exception // Rivian R1S/T GEN1 exception
if ((addr == 0x152) && (len == 8)) { if ((addr == 0x152) && (len == 8)) {
// 0x152 overlaps with Subaru pre-global which has this bit as the high beam // 0x152 overlaps with Subaru pre-global which has this bit as the high beam
int counter = GET_BYTE(to_push, 1) & 0xFU; // max is only 14 int counter = msg->data[1] & 0xFU; // max is only 14
static int prev_counter_rivian = -1; static int prev_counter_rivian = -1;
if ((counter == ((prev_counter_rivian + 1) % 15)) && (prev_counter_rivian != -1)) { if ((counter == ((prev_counter_rivian + 1) % 15)) && (prev_counter_rivian != -1)) {
// VDM_OutputSignals->VDM_EpasPowerMode // VDM_OutputSignals->VDM_EpasPowerMode
ignition_can = ((GET_BYTE(to_push, 7) >> 4U) & 0x3U) == 1U; // VDM_EpasPowerMode_Drive_On=1 ignition_can = ((msg->data[7] >> 4U) & 0x3U) == 1U; // VDM_EpasPowerMode_Drive_On=1
ignition_can_cnt = 0U; ignition_can_cnt = 0U;
} }
prev_counter_rivian = counter; prev_counter_rivian = counter;
@@ -190,12 +190,12 @@ void ignition_can_hook(CANPacket_t *to_push) {
// Tesla Model 3/Y exception // Tesla Model 3/Y exception
if ((addr == 0x221) && (len == 8)) { if ((addr == 0x221) && (len == 8)) {
// 0x221 overlaps with Rivian which has random data on byte 0 // 0x221 overlaps with Rivian which has random data on byte 0
int counter = GET_BYTE(to_push, 6) >> 4; int counter = msg->data[6] >> 4;
static int prev_counter_tesla = -1; static int prev_counter_tesla = -1;
if ((counter == ((prev_counter_tesla + 1) % 16)) && (prev_counter_tesla != -1)) { if ((counter == ((prev_counter_tesla + 1) % 16)) && (prev_counter_tesla != -1)) {
// VCFRONT_LVPowerState->VCFRONT_vehiclePowerState // VCFRONT_LVPowerState->VCFRONT_vehiclePowerState
int power_state = (GET_BYTE(to_push, 0) >> 5U) & 0x3U; int power_state = (msg->data[0] >> 5U) & 0x3U;
ignition_can = power_state == 0x3; // VEHICLE_POWER_STATE_DRIVE=3 ignition_can = power_state == 0x3; // VEHICLE_POWER_STATE_DRIVE=3
ignition_can_cnt = 0U; ignition_can_cnt = 0U;
} }
@@ -204,7 +204,7 @@ void ignition_can_hook(CANPacket_t *to_push) {
// Mazda exception // Mazda exception
if ((addr == 0x9E) && (len == 8)) { if ((addr == 0x9E) && (len == 8)) {
ignition_can = (GET_BYTE(to_push, 0) >> 5) == 0x6U; ignition_can = (msg->data[0] >> 5) == 0x6U;
ignition_can_cnt = 0U; ignition_can_cnt = 0U;
} }