Commit Graph

1063 Commits

Author SHA1 Message Date
Jason Huang
515ac45fc0 Add comma body firmware (#2291)
* motors

* can

* cleanup unused stuff

* initial clean

* more clean

* remove integral and derivative clamps, revert pwm driver to original

* remove integral and derivative clamps, revert pwm driver to original

* remove integral and derivative clamps, revert pwm driver to original

* dont need this for now

* clean

* fix can rx and can version error

* ignore body for misra mutation test

* fix bus recovery, remove body rx hook
2025-10-24 17:14:39 -07:00
Maxime Desroches
f6a06e34f2 ci: re-enable all HITL tests (#2280)
fan
2025-09-24 19:34:53 -07:00
probablyanasian
a2064b86f3 Change fan to use pure pwm (#2267)
* set cuatro fan settings

* set cuatro to use pure pwm

* use pwm on all boards

* remove fan max rpm configs, use pure pwm

* add comment about cooldown

* change max rpm in python side

* remove reference to max_fan_pwm in fan.h

* fully refactor fan configs into "has_fan"

* increase limits on fan test to 15% either way

* only tres for now

* doesn't matter

* not relevant anymore

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2025-09-13 11:09:51 -07:00
Adeeb Shihadeh
708ac34755 fix build with different root 2025-09-12 19:51:59 -07:00
Adeeb Shihadeh
7973ba4492 CAN driver cleanup (#2276)
* it's all the same thing

* not live

* less macro

* lil more

* bool

* lil more
2025-09-10 20:00:41 -07:00
Adeeb Shihadeh
e13c3eb36d remove spi dfu spam test 2025-09-04 11:15:38 -07:00
Adeeb Shihadeh
937626d288 SPI: ensure slave is in a consistent state after failed transfer (#2268)
* SPI: ensure slave is in a consistent state after failed transfer

* respect timeout

* swap

* clean that up

* remove whitelist

* warning

* limit attempts

---------

Co-authored-by: Comma Device <device@comma.ai>
2025-09-04 11:13:14 -07:00
Adeeb Shihadeh
5c1ff7bfa3 optimize CAN send over SPI (#2266)
* profiling

* lil faster

* chunking happens later

* little better

* prealloc is no bueno?

* cleanup

* fix usb tests

---------

Co-authored-by: Comma Device <device@comma.ai>
2025-09-02 19:26:52 -07:00
Adeeb Shihadeh
e5a39a2cef misc cleanup (#2261)
* cleanup

* fix jungle

* one more
2025-08-26 15:01:22 -07:00
Maxime Desroches
0ff8dc219b ci: stop power_monitor (#2260)
* ci: kick power_monitor

* kill
2025-08-26 13:29:44 -07:00
Adeeb Shihadeh
1ce986f75c bye bye f4 (#2259)
* bye bye f4

* lil more

* fix mac build

* update health idx
2025-08-26 12:37:36 -07:00
Maxime Desroches
e14b8691bf ci: swap bootkick device (#2250)
fix?
2025-07-30 21:40:43 -07:00
Adeeb Shihadeh
a0b52ed254 a few more spi error counts 2025-07-30 18:27:56 -07:00
Adeeb Shihadeh
7c97ab5f35 cleanup build (#2234)
* cleanup bootstub build

* cleanup rest of build

* less files

* all in same obj

* oops

* lil more
2025-07-20 11:29:58 -07:00
Adeeb Shihadeh
ca603115cb Include from project root (#2232)
* fix include paths

* cleanup
2025-07-19 21:58:58 -07:00
Adeeb Shihadeh
5ac6305a95 quick garbage collection pass (#2231)
* remove DPANDA

* -22

* lil more

* canfd

* lil more

* update cppcheck

* uart cleanup

* always harness

* sbu sense

* lil more

* enable spi

* rm ENABLE_SPI
2025-07-19 21:05:12 -07:00
Adeeb Shihadeh
edd4146635 simplify HITL tests (#2229)
* lil fixups

* revert that for now

* no n0

* also 1.8V

* global
2025-07-19 16:13:51 -07:00
Adeeb Shihadeh
76bd9e93d7 make jenkins green again (#2230)
* just make it green

* fix resetter

* fix perms

* better caching

* just copy

* simplify more

* fix that up

* nope
2025-07-19 15:49:41 -07:00
Adeeb Shihadeh
3d27233530 Deprecate white and black pandas (#2227)
* deprecate white and black pandas

* static
2025-07-19 09:55:12 -07:00
Adeeb Shihadeh
1020d35558 Deprecate uno + grey (#2223)
* Deprecate uno + grey

* lil more
2025-06-06 11:36:21 -07:00
Maxime Desroches
b4bb4e8519 cuatro: test in CI (#2218)
hitl
2025-05-27 13:04:48 -07:00
Adeeb Shihadeh
4fc243b998 CI: speed up MISRA mutation job (#2213)
* CI: speed up MISRA mutation job

* install first
2025-05-20 10:18:47 -07:00
Adeeb Shihadeh
cb11a40852 test.sh: the master test script (#2210)
* init test.sh

* good riddance

* docs

* curl

* source

* or

* skip that one

* passes

* clean up

* no pythonpath

* rm that
2025-05-19 21:19:41 -07:00
Adeeb Shihadeh
92c26f71e6 remove dead mull stuff (#2208)
* remove dead mull stuff

* rm clang

* fix
2025-05-19 19:40:50 -07:00
Adeeb Shihadeh
d7e5f8560f Move setup to pyproject (#2207)
* migrate packaging to pyproject

* fix

* mv

* lil more
2025-05-19 19:24:49 -07:00
Adeeb Shihadeh
2f47af4b2e reorg (#2206)
* reorg

* one less config file

* lil more

* lil more
2025-05-19 19:02:59 -07:00
Adeeb Shihadeh
8bd83750c2 setup opendbc dependency properly (#2202)
* rm that

* bump

* lil more

* update

* fix libpanda

* update

* fix misra

* python3?

* update ref

* fix mutation
2025-05-17 19:15:19 -07:00
Shane Smiskol
db50523a45 Fix safety flag rename (#2198)
fix
2025-05-14 14:23:03 -07:00
Trey Moen
6adac802b5 fix(macos): macOS 15 and greater (#2196)
* fix macos

* Revert "fix macos"

This reverts commit f52d30c97c43c1d66e5447b194d6e2f599c81187.

* use gcc on < macOS 15

* link to issue
2025-05-13 10:27:00 -07:00
Shane Smiskol
25591f1b3a Move safety replay to opendbc (#2167)
move to opendbc
2025-02-26 23:31:41 -08:00
Shane Smiskol
d8fb6f3ca4 safety replay: use lr.first() 2025-02-26 23:27:10 -08:00
Shane Smiskol
e08311bb4d Safety replay: support Rivian 2025-02-24 02:51:14 -08:00
Kacper Rączy
7f4af6e2c8 safety_replay: opendbc libsafety + msg sorting (#2162)
* Fix safety_replay

* Sort
2025-02-23 20:39:36 +01:00
Shane Smiskol
66bd9e8f25 Change safety model imports (#2158)
* fix test_pandad

* fix all the imports
2025-02-21 17:36:23 -08:00
Shane Smiskol
9804e2607e Move car safety modes to opendbc (#2143)
* move safety tests

* move libsafety

* move safety

* remove safety test job

* fix compilation

* update ref

* rm safety mutation test

* fix misra test

* no safety here

* fix build for both local and docker

* already tested

* fix misra mutation

* move Safety Model readme section to opendbc

* and panda

* fix

* in

* not here

* not here
2025-02-19 17:19:18 -08:00
Lukas
ebdc376ade Safety for Tesla Model 3 / Model Y (#2036)
* wip model3

* master

* tesla model 3 / y

* prevent tesla to reverse

* remove can 1 from safety

* use DI_vehicleSpeed

* - add APS_eacMonitor to TX
- use DI_state as a standstill signal

* block eacMonitor

* fix tesla safety tests

* fix tesla safety tests

* add generic_rx_check for eacMonitor

* fix tests

* consistent ordering of common user brake test setup

* Tesla: Panda safety update (#2075)

* - match "vehicle_moving" with opendbc
- allow to cancel

* remove comment

* update _vehicle_moving_msg

* remove redundant condition

* whoops

* update ref

* spacing!

* long behind ALLOW_DEBUG

* consistent styling

* ?

* misra and clean up

* divide instead

* double (())

* more stylistic

* this is more clear

* always check aeb

* this test catches it

* it should test angle steering in both modes?

* we weren't testing long at all, and ALSO PYTEST SILENTLY SKIPS CLASSES WITH MISSING ABSTRACT METHODS WTF

* finalize safety tests

* update opendbc to master

* ltl

* revert this

* rm conftest

* loop this

---------

Co-authored-by: Greg Hogan <gregjhogan@gmail.com>
Co-authored-by: Shane Smiskol <shane@smiskol.com>
2025-02-18 12:42:38 -08:00
Shane Smiskol
2a4d3a9923 Remove hw type from safety tests (#2151) 2025-02-12 21:43:07 -08:00
Shane Smiskol
b2b28f9326 split libpanda library (#2149)
* duplicate libpanda

* rename

rename

* update libpanda to remove safety helpers

* libpanda -> libsafety

* remove some stuff in libsafety

* rm some stuff from safety.c

* libc

* fix

* dont include safety helpers
2025-02-12 21:24:26 -08:00
Shane Smiskol
d3508ff042 Move safety constants to opendbc (#2145)
* move to opendbc

* all passing

* do the rest

* fix

* and another

* order

* and update ref to master
2025-02-11 20:14:44 -08:00
Shane Smiskol
72a99e9e9d Rename to SafetyFlags (#2144)
* safety flags

* update ref

* fix ltl
2025-02-11 19:56:29 -08:00
Eric Brown
e7940cc3e9 Remove car specific flags (#2116)
* Subaru: combine panda flags

* Remove car-specific panda flags

* Rename usages in tests

* update opendbc ref

* ?

?

* fix ltl

* order

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2025-02-10 19:10:29 -08:00
Shane Smiskol
12905886ba Ford: long safety is default for CAN (#2128)
* ford long safety

* same with ford_longitudinal

* Update tests/safety/test_ford.py
2025-01-22 20:18:26 -08:00
Jason Wen
9066088edf Dockerfile: opendbc: small fixes and use the latest ref (#2124)
* Dockerfile: opendbc: use the latest ref

* use new generated dbc

* fix mypy
2025-01-19 18:00:25 -08:00
Adeeb Shihadeh
a8f21d9273 update cppcheck to 2.16 (#2120) 2025-01-12 15:58:23 -08:00
DevTekVE
bedee405d6 test: Allow running test_misra.sh easy on macos (#2096)
Allow running test_misra.sh easy on macos
2024-12-09 17:34:04 -08:00
Willem Melching
4a11d52e07 Control over FD flag of CAN messages (#2085)
* Control over FD flag of CAN messages

* misra
2024-11-21 11:04:09 -08:00
Radek
aab03bc4b6 Make can_print.py work on a all busses (#2070)
* Enable CAN3 printer (#1991) again

(cherry picked from commit 2b94e4fef7)

* print messages with same address but on different bus
2024-11-06 17:09:42 +01:00
Shane Smiskol
3066f93d8a Ford: higher curvature rate limits at low speed (#2065)
* use closer to EPS limits

* raise to upper bound of spread from injection plot

* we've seen ~0.009 at 7 m/s, so allow that

* fix test

* rounding errors cause the 2 to round to the same value

* adjust for latest opendbc change

* we should actually match what safety is doing! fix lack of test coverage near first brake point

fix

* and fix test
2024-10-25 23:27:33 -07:00
Shane Smiskol
2bd2f2a702 Ford: check longitudinal actuation bits (#2067)
ford long: check brake actuation bits
2024-10-25 14:11:53 -07:00
Jason Young
abdc41856b Toyota: 2021+ RAV4 Prime (#2042)
* from @pd0wm commaai/panda#1841

* diff reduction: won't need the flag rename

* run tests with new DBC and new gas/brake messages

* toyota_secoc_car to global

* consolidate alt_brake_101

* consolidate alt_pcm_cruise_176

* consolidate alt_gas_pedal_116

* don't allow transmit/forward for 0x131 unless SecOC

* cleanup and todo

* diff reduction

* reorder by usage frequency

* test for no LTA actuation

* bump opendbc commit ref in Dockerfile

* gate SecOC variant on ALLOW_DEBUG

* tweak gating for MISRA

* mutation test hates lta_angle surviving various changes

* common rx checks styling

* don't allow short version of 0x2E5 for SecOC mode

* whitespace diff reduction

* secoc_car -> secoc

* fix comment typo

* retry CI

* missed a couple secoc_car -> secoc

* one big secoc/not-secoc block

* genuinely useful MISRA warning

* test both STEERING_LTA and STEERING_LTA_2

* comment labeling for STEERING_LTA_2 signals

* Update board/safety/safety_toyota.h

Co-authored-by: Shane Smiskol <shane@smiskol.com>

* STEERING_LTA and STEERING_LTA_2 consistency

* update gas/brake/cruise signal annotations

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2024-10-04 11:22:18 -07:00