mirror of
https://github.com/infiniteCable2/panda.git
synced 2026-02-18 09:13:52 +08:00
opendbc updates (#2245)
* opendbc updates * get latest opendbc in docker * .
This commit is contained in:
@@ -11,5 +11,9 @@ COPY pyproject.toml __init__.py setup.sh $WORKDIR
|
||||
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
|
||||
|
||||
# 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
|
||||
COPY . $WORKDIR
|
||||
|
||||
2
Jenkinsfile
vendored
2
Jenkinsfile
vendored
@@ -85,7 +85,7 @@ pipeline {
|
||||
steps {
|
||||
timeout(time: 20, unit: 'MINUTES') {
|
||||
script {
|
||||
dockerImage = docker.build("${env.DOCKER_IMAGE_TAG}")
|
||||
dockerImage = docker.build("${env.DOCKER_IMAGE_TAG}", "--build-arg CACHEBUST=${env.BUILD_NUMBER} .")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -160,28 +160,28 @@ void can_set_forwarding(uint8_t from, uint8_t to) {
|
||||
}
|
||||
#endif
|
||||
|
||||
void ignition_can_hook(CANPacket_t *to_push) {
|
||||
int bus = GET_BUS(to_push);
|
||||
void ignition_can_hook(CANPacket_t *msg) {
|
||||
int bus = GET_BUS(msg);
|
||||
if (bus == 0) {
|
||||
int addr = GET_ADDR(to_push);
|
||||
int len = GET_LEN(to_push);
|
||||
int addr = GET_ADDR(msg);
|
||||
int len = GET_LEN(msg);
|
||||
|
||||
// GM exception
|
||||
if ((addr == 0x1F1) && (len == 8)) {
|
||||
// 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;
|
||||
}
|
||||
|
||||
// Rivian R1S/T GEN1 exception
|
||||
if ((addr == 0x152) && (len == 8)) {
|
||||
// 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;
|
||||
if ((counter == ((prev_counter_rivian + 1) % 15)) && (prev_counter_rivian != -1)) {
|
||||
// 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;
|
||||
}
|
||||
prev_counter_rivian = counter;
|
||||
@@ -190,12 +190,12 @@ void ignition_can_hook(CANPacket_t *to_push) {
|
||||
// Tesla Model 3/Y exception
|
||||
if ((addr == 0x221) && (len == 8)) {
|
||||
// 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;
|
||||
if ((counter == ((prev_counter_tesla + 1) % 16)) && (prev_counter_tesla != -1)) {
|
||||
// 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_cnt = 0U;
|
||||
}
|
||||
@@ -204,7 +204,7 @@ void ignition_can_hook(CANPacket_t *to_push) {
|
||||
|
||||
// Mazda exception
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user