Skip to content

Commit

Permalink
Merge branch 'commaai:master' into odyssey_rc5
Browse files Browse the repository at this point in the history
  • Loading branch information
leonunix authored Dec 15, 2024
2 parents 15ab855 + 9272d4b commit 788827d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ RUN pip3 install --break-system-packages --no-cache-dir $PYTHONPATH/panda/[dev]

# TODO: this should be a "pip install" or not even in this repo at all
RUN git config --global --add safe.directory $PYTHONPATH/panda
ENV OPENDBC_REF="e1ce3619a5db661ef2b406ccf258a253baf6eebc"
ENV OPENDBC_REF="b89fe79950121ca93d8a1f0d3fd17df31703be2a"
RUN cd /tmp/ && \
git clone --depth 1 https://github.com/commaai/opendbc opendbc_repo && \
cd opendbc_repo && git fetch origin $OPENDBC_REF && git checkout FETCH_HEAD && rm -rf .git/ && \
pip3 install --break-system-packages --no-cache-dir Cython numpy && \
scons -j8 --minimal opendbc/ && \
ln -s $PWD/opendbc $PYTHONPATH/opendbc
ln -s $PWD/opendbc $PYTHONPATH/opendbc && \
scons -j8 --minimal opendbc/

# for Jenkins
COPY README.md panda.tar.* /tmp/
Expand Down
2 changes: 1 addition & 1 deletion board/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ static void tick_handler(void) {
}

if (controls_allowed || heartbeat_engaged) {
controls_allowed_countdown = 30U;
controls_allowed_countdown = 5U;
} else if (controls_allowed_countdown > 0U) {
controls_allowed_countdown -= 1U;
} else {
Expand Down
13 changes: 11 additions & 2 deletions board/safety/safety_hyundai.h
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,17 @@ static int hyundai_fwd_hook(int bus_num, int addr) {
if (bus_num == 0) {
bus_fwd = 2;
}
if ((bus_num == 2) && (addr != 0x340) && (addr != 0x485)) {
bus_fwd = 0;

if (bus_num == 2) {
// Stock LKAS11 messages
bool is_lkas_11 = (addr == 0x340);
// LFA and HDA cluster icons
bool is_lfahda_mfc = (addr == 0x485);

bool block_msg = is_lkas_11 || is_lfahda_mfc;
if (!block_msg) {
bus_fwd = 0;
}
}

return bus_fwd;
Expand Down

0 comments on commit 788827d

Please sign in to comment.