Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
94 commits
Select commit Hold shift + click to select a range
efb313c
Fix query_fw_versions.py (#2140)
lukasloetkolben Feb 10, 2025
6064f2b
new opendbc debug api (#2141)
sshane Feb 10, 2025
f52d0b8
Remove car specific flags (#2116)
nworb-cire Feb 11, 2025
b9d0f26
Rename to SafetyFlags (#2144)
sshane Feb 12, 2025
64a7f15
Move safety constants to opendbc (#2145)
sshane Feb 12, 2025
6a1d307
Missing Safety references (#2146)
sshane Feb 12, 2025
dcadf21
Fix opendbc hitl test (#2147)
sshane Feb 12, 2025
d3f1776
split libpanda library (#2149)
sshane Feb 13, 2025
02fadbe
Remove hw type from safety tests (#2151)
sshane Feb 13, 2025
d161bc5
Tesla: update ignition signal for Model 3/Y (#2153)
sshane Feb 17, 2025
3e6d8aa
Safety for Tesla Model 3 / Model Y (#2036)
lukasloetkolben Feb 18, 2025
38f3b96
Move car safety modes to opendbc (#2143)
sshane Feb 20, 2025
30ff748
bump opendbc ref to master
sshane Feb 20, 2025
64c4ccd
Change safety model imports (#2158)
sshane Feb 22, 2025
fe7aac5
Rivian: add CAN ignition (#2157)
lukasloetkolben Feb 22, 2025
c3b2f4e
safety_replay: opendbc libsafety + msg sorting (#2162)
fredyshox Feb 23, 2025
b0e4be3
Safety replay: support Rivian
sshane Feb 24, 2025
7bc65c6
Fix Rivian ignition (#2163)
sshane Feb 24, 2025
bb57e12
Rivian: fix ignition signal overlap (#2165)
sshane Feb 24, 2025
ecd1059
Move isotp.py, ccp.py and xcp.py to opendbc (#2166)
pd0wm Feb 26, 2025
82be1f1
safety replay: use lr.first()
sshane Feb 27, 2025
3e21f7e
Move safety replay to opendbc (#2167)
sshane Feb 27, 2025
74fa678
add set_alternative_experience method to Panda class (#2168)
deanlee Feb 27, 2025
366a7ae
pre-commit: autoupdate hooks (#2071)
commaci-public Mar 1, 2025
3ce371e
Lower fan setting on boot (#2119)
adeebshihadeh Mar 2, 2025
f6716cf
Update udev rules in README (#2159)
jyoung8607 Mar 2, 2025
22e9344
ignition: add Rivian comment
sshane Mar 4, 2025
23cc8e8
Rivian: properly parse ignition signal
sshane Mar 4, 2025
c3585a0
More sound fixes (#2169)
robbederks Mar 6, 2025
ea6877a
Refactor and cleanup board init (part 1) (#2094)
robbederks Mar 12, 2025
ccd19e5
Init cleanup: global LED driver (#2170)
robbederks Mar 14, 2025
aec158f
disable that for now
adeebshihadeh Mar 22, 2025
4b09100
Fan controller fixes (#2177)
robbederks Mar 27, 2025
1cd52a9
Fan controller: fix instability on high rpm fans (#2179)
robbederks Apr 2, 2025
6f0d92e
Log divergent registers once (#2182)
robbederks Apr 9, 2025
48c71bf
1min is a bit tight
robbederks Apr 9, 2025
c099166
Cleanup common and useless debug logs (#2183)
robbederks Apr 9, 2025
dc359de
Cuatro: changes for new board rev (#2176)
robbederks Apr 10, 2025
d7ae891
CAN ignition: fix unscoped prev counter (#2191)
sshane Apr 15, 2025
1560242
Delete unused watchdog, lldac, uart_rx_ring (#2188)
aubsw Apr 15, 2025
d5a88e2
Add guards around platform-specific code (#2189)
aubsw Apr 17, 2025
76eae60
ignition: suffix counters (#2194)
sshane Apr 25, 2025
1d8f0f5
Fix register errors (#2197)
robbederks May 13, 2025
256dfc6
fix(macos): macOS 15 and greater (#2196)
greatgitsby May 13, 2025
cc58a4e
Fix safety flag rename (#2198)
sshane May 14, 2025
36a0865
setup opendbc dependency properly (#2202)
adeebshihadeh May 18, 2025
369678d
setup script (#2201)
adeebshihadeh May 18, 2025
209adf7
pre-commit: autoupdate hooks (#2178)
commaci-public May 18, 2025
c6abfab
rm linux driver
adeebshihadeh May 18, 2025
82d9515
remove socketcan ci job
adeebshihadeh May 18, 2025
93a64d8
Update GitHub Actions actions versions (#2204)
adeebshihadeh May 20, 2025
97b31e3
reorg (#2206)
adeebshihadeh May 20, 2025
3755374
Move setup to pyproject (#2207)
adeebshihadeh May 20, 2025
ff19619
remove dead mull stuff (#2208)
adeebshihadeh May 20, 2025
b7ff279
speeeedy ci (#2209)
adeebshihadeh May 20, 2025
4825df2
test.sh: the master test script (#2210)
adeebshihadeh May 20, 2025
cff9314
CI: speed up MISRA mutation job (#2213)
adeebshihadeh May 20, 2025
d4935bd
no more socketcan
adeebshihadeh May 20, 2025
e385eef
initialize DAC with silent value (#2215)
maxime-desroches May 20, 2025
04a5aee
setup.sh: no homebrew autoupdate
adeebshihadeh May 25, 2025
1eac1e2
add macOS to CI (#2217)
adeebshihadeh May 25, 2025
8bf79bb
enable amp on that pin too (#2219)
robbederks May 27, 2025
b860531
sound-new-rev
May 27, 2025
6917d99
Revert "sound-new-rev"
May 27, 2025
7c4247c
cuatro: test in CI (#2218)
maxime-desroches May 27, 2025
56821ec
PWM-ing LED (#2221)
robbederks May 28, 2025
08a6a4a
no more pylint
adeebshihadeh Jun 1, 2025
1a848c8
endpoint to set TIM1 period and channel pulse length (#2222)
maxime-desroches Jun 4, 2025
e5f29ac
Deprecate uno + grey (#2223)
adeebshihadeh Jun 6, 2025
2e780bc
Add support for generating clang compilation database by default (#2225)
devtekve Jul 3, 2025
667257e
Deprecate white and black pandas (#2227)
adeebshihadeh Jul 19, 2025
21662dd
Deprecate jungle v1 (#2228)
adeebshihadeh Jul 19, 2025
603a618
gitignore compile_commands.json
adeebshihadeh Jul 19, 2025
8345ef2
make jenkins green again (#2230)
adeebshihadeh Jul 19, 2025
efbbdb3
simplify HITL tests (#2229)
adeebshihadeh Jul 19, 2025
97e634d
quick garbage collection pass (#2231)
adeebshihadeh Jul 20, 2025
dfc1786
Include from project root (#2232)
adeebshihadeh Jul 20, 2025
7ee57cf
cleanup build (#2234)
adeebshihadeh Jul 20, 2025
3c96fa5
move bootstub define
adeebshihadeh Jul 20, 2025
1bcfff4
fix pwm.h indentation
adeebshihadeh Jul 20, 2025
ff73b7b
fix external build
adeebshihadeh Jul 22, 2025
9e3fd53
always use opendbc master (#2244)
adeebshihadeh Jul 27, 2025
a9d7248
remove some old comments
adeebshihadeh Jul 27, 2025
34bf863
opendbc updates (#2245)
adeebshihadeh Jul 29, 2025
dfa49e7
Differential sound (#2220)
robbederks Jul 30, 2025
c9287bb
Generic ADC implementation (#2246)
robbederks Jul 30, 2025
a0e3249
SPI: spi_error_count is a better name (#2248)
adeebshihadeh Jul 31, 2025
f608123
a few more spi error counts
adeebshihadeh Jul 31, 2025
b002c5f
SPI: add NACK test endpoint (#2249)
adeebshihadeh Jul 31, 2025
540da5c
ci: swap bootkick device (#2250)
maxime-desroches Jul 31, 2025
98cddb9
ADC VDDA calibration (#2247)
robbederks Jul 31, 2025
30729a2
Keep supporting White/Black pandas from Python side (#2252)
pd0wm Aug 3, 2025
242b54e
CI: auto-update cppcheck weekly (#2253)
adeebshihadeh Aug 3, 2025
4c6ed67
Panda.list() optimization for comma three (#2255)
adeebshihadeh Aug 4, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 0 additions & 29 deletions .github/workflows/drivers.yaml

This file was deleted.

28 changes: 0 additions & 28 deletions .github/workflows/repo.yml

This file was deleted.

128 changes: 34 additions & 94 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,133 +11,73 @@ concurrency:
cancel-in-progress: true

env:
RUN: docker run -v ${{ github.workspace }}:/tmp/pythonpath/panda -w /tmp/pythonpath/panda --rm panda /bin/bash -c
BUILD: |
export DOCKER_BUILDKIT=1
docker build --pull --build-arg BUILDKIT_INLINE_CACHE=1 --cache-from ghcr.io/commaai/panda:latest -t panda -f Dockerfile .

PYTHONWARNINGS: "error"
RUN: source .venv/bin/activate && /bin/bash -c

jobs:
docker_push:
name: docker push
runs-on: ubuntu-latest
timeout-minutes: 20
if: github.ref == 'refs/heads/master' && github.event_name != 'pull_request' && github.repository == 'commaai/panda'
steps:
- uses: actions/checkout@v2
- name: Build Docker image
timeout-minutes: 11
run: eval "$BUILD"
- name: Login to dockerhub
run: docker login ghcr.io -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }}
- name: Tag image
run: docker tag panda ghcr.io/commaai/panda:latest
- name: Push image
run: docker push ghcr.io/commaai/panda:latest

build:
name: build
runs-on: ubuntu-latest
timeout-minutes: 20
timeout-minutes: 10
steps:
- uses: actions/checkout@v2
- name: Build Docker image
run: eval "$BUILD"
- uses: actions/checkout@v4
- run: ./setup.sh
- name: Test python package installer
run: ${{ env.RUN }} "python3 setup.py install"
run: ${{ env.RUN }} "pip install --break-system-packages .[dev]"
- name: Build panda images and bootstub
run: ${{ env.RUN }} "scons -j4"
- name: Build panda with SPI support
run: ${{ env.RUN }} "ENABLE_SPI=1 scons -j4"
- name: Build with UBSan
run: ${{ env.RUN }} "scons -j4 --ubsan"
- name: Build jungle firmware with FINAL_PROVISIONING support
run: ${{ env.RUN }} "FINAL_PROVISIONING=1 scons -j4 board/jungle"
- name: Build panda in release mode
run: ${{ env.RUN }} "CERT=certs/debug RELEASE=1 scons -j4"

unit_tests:
name: unit tests
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v2
- name: Build Docker image
run: eval "$BUILD"
- name: Build panda
run: $RUN "scons -j4"
- name: Test communication protocols
run: $RUN "cd tests/usbprotocol && ./test.sh"

safety:
name: safety
runs-on: ubuntu-latest
test:
name: ./test.sh
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
flags: ['', '--ubsan']
timeout-minutes: 20
os: ['macos-latest', 'ubuntu-latest']
timeout-minutes: 10
steps:
- uses: actions/checkout@v2
- name: Build Docker image
run: eval "$BUILD"
- name: Run safety tests
timeout-minutes: 5
run: |
${{ env.RUN }} "scons -c -j$(nproc) && \
scons -j$(nproc) ${{ matrix.flags }} && \
tests/safety/test.sh"
- uses: actions/checkout@v4
- run: ./test.sh

misra_linter:
name: MISRA C:2012 Linter
runs-on: ubuntu-latest
timeout-minutes: 20
timeout-minutes: 10
steps:
- uses: actions/checkout@v2
- name: Build Docker image
run: eval "$BUILD"
- uses: actions/checkout@v4
- name: Cache cppcheck
id: cppcheck-cache
uses: actions/cache@v4
with:
path: tests/misra/cppcheck
key: cppcheck-${{ hashFiles('tests/misra/*') }}
- run: ./setup.sh
- name: Build FW
run: ${{ env.RUN }} "scons -j$(nproc)"
- name: Run MISRA C:2012 analysis
timeout-minutes: 2
run: ${{ env.RUN }} "cd tests/misra && ./test_misra.sh"

misra_mutation:
name: MISRA C:2012 Mutation
runs-on: ubuntu-latest
timeout-minutes: 20
timeout-minutes: 10
steps:
- uses: actions/checkout@v2
- name: Build Docker image
run: eval "$BUILD"
- uses: actions/checkout@v4
- name: Cache cppcheck
id: cppcheck-cache
uses: actions/cache@v4
with:
path: tests/misra/cppcheck
key: cppcheck-${{ hashFiles('tests/misra/*') }}
- run: ./setup.sh
- name: Build FW
run: ${{ env.RUN }} "scons -j$(nproc)"
- name: tests/misra/install.sh
run: ${{ env.RUN }} "cd tests/misra && ./install.sh"
- name: MISRA mutation tests
timeout-minutes: 5
run: ${{ env.RUN }} "cd tests/misra && pytest -n8 test_mutation.py"

mutation:
name: Mutation tests
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # need master to get diff
- name: Build Docker image
run: eval "$BUILD"
- name: Mutation tests
timeout-minutes: 5
run: ${{ env.RUN }} "GIT_REF=${{ github.event_name == 'push' && github.ref == 'refs/heads/master' && github.event.before || 'origin/master' }} cd tests/safety && ./mutation.sh"

static_analysis:
name: static analysis
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v2
- name: Build Docker image
run: eval "$BUILD"
- name: Run static analysis
timeout-minutes: 3
run: ${{ env.RUN }} "pre-commit run --all"
run: ${{ env.RUN }} "cd tests/misra && pytest test_mutation.py"
37 changes: 37 additions & 0 deletions .github/workflows/update-cppcheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Update cppcheck

on:
#push:
schedule:
- cron: "0 14 * * 1" # every Monday at 2am UTC (6am PST)
workflow_dispatch:

jobs:
update-cppcheck:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v4
- name: Get latest cppcheck version
id: version
run: |
LATEST=$(curl -fsSL https://api.github.com/repos/danmar/cppcheck/releases/latest | jq -r .tag_name)
echo "vers=$LATEST" >> "$GITHUB_OUTPUT"
- name: Update VERS in install.sh
run: |
sed -i "s/^VERS=\".*\"/VERS=\"${{ steps.version.outputs.vers }}\"/" tests/misra/install.sh
grep VERS tests/misra/install.sh
- name: Create Pull Request
uses: peter-evans/create-pull-request@9153d834b60caba6d51c9b9510b087acf9f33f83
with:
author: Vehicle Researcher <user@comma.ai>
token: ${{ secrets.ACTIONS_CREATE_PR_PAT }}
commit-message: "[bot] Update cppcheck to ${{ steps.version.outputs.vers }}"
title: "[bot] Update cppcheck to ${{ steps.version.outputs.vers }}"
body: "See all cppcheck releases: https://github.com/danmar/cppcheck/releases"
branch: "update-cppcheck"
base: "master"
delete-branch: true
labels: bot
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.venv
*.tmp
*.pyc
.*.swp
Expand All @@ -20,12 +21,14 @@ examples/output.csv
nosetests.xml
.mypy_cache/
.sconsign.dblite
uv.lock
compile_commands.json
venv/
.venv/
.python-version

# CTU info files generated by Cppcheck
*.*.ctu-info
cppcheck-addon-ctu-file-list

# safety coverage-related files
*.gcda
Expand Down
20 changes: 0 additions & 20 deletions .pre-commit-config.yaml

This file was deleted.

56 changes: 12 additions & 44 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,51 +1,19 @@
FROM ubuntu:24.04

ENV WORKDIR=/tmp/panda/
ENV PYTHONUNBUFFERED=1
ENV PYTHONPATH=/tmp/pythonpath
ENV PATH="$WORKDIR/.venv/bin:$PATH"

ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \
make \
g++ \
gcc-arm-none-eabi libnewlib-arm-none-eabi \
git \
libffi-dev \
libusb-1.0-0 \
python3 \
python3-dev \
python3-pip \
&& rm -rf /var/lib/apt/lists/* && \
apt clean && \
cd /usr/lib/gcc/arm-none-eabi/* && \
rm -rf arm/ && \
rm -rf thumb/nofp thumb/v6* thumb/v8* thumb/v7+fp thumb/v7-r+fp.sp && \
apt-get update && apt-get install -y clang-17 && \
ln -s $(which clang-17) /usr/bin/clang
WORKDIR $WORKDIR

RUN apt-get update && apt-get install -y curl && \
curl -1sLf 'https://dl.cloudsmith.io/public/mull-project/mull-stable/setup.deb.sh' | bash && \
apt-get update && apt-get install -y mull-17
# deps install
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

ENV CPPCHECK_DIR=/tmp/cppcheck
COPY tests/misra/install.sh /tmp/
RUN /tmp/install.sh && rm -rf $CPPCHECK_DIR/.git/
ENV SKIP_CPPCHECK_INSTALL=1
# second pass for the opendbc moving tag
ARG CACHEBUST=1
RUN DEBIAN_FRONTEND=noninteractive $WORKDIR/setup.sh

COPY setup.py __init__.py $PYTHONPATH/panda/
COPY python/__init__.py $PYTHONPATH/panda/python/
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="7af6f3885dc43be8ecf331df1f0914cf3338de50"
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 && \
ln -s $PWD/opendbc $PYTHONPATH/opendbc && \
scons -j8 --minimal opendbc/

# for Jenkins
COPY README.md panda.tar.* /tmp/
RUN mkdir -p /tmp/pythonpath/panda && \
tar -xvf /tmp/panda.tar.gz -C /tmp/pythonpath/panda/ || true
RUN git config --global --add safe.directory $WORKDIR/panda
COPY . $WORKDIR
Loading
Loading