Commit Graph

3052 Commits

Author SHA1 Message Date
infiniteCable2
5873d2eb76 Merge branch 'master-new' of https://github.com/sunnypilot/panda into master-new 2025-04-08 21:06:32 +02:00
Jason Wen
4fab184d5f Sync: commaai/panda:master into sunnypilot/panda:master-new 2025-04-07 21:03:12 -04:00
DevTekVE
23d434a77c Merge branch 'comma-master-20240407' into sync-20250407 2025-04-07 22:00:29 +02:00
infiniteCable2
51df7bab85 Update __init__.py 2025-04-06 15:10:56 +02:00
infiniteCable2
86a33ebe30 upstream 2025-04-06 15:09:48 +02:00
infiniteCable2
1d1daaf7b6 Merge branch 'master-new' of https://github.com/sunnypilot/panda into master-new 2025-04-06 15:07:38 +02:00
Jason Wen
503f5dd6c3 Sync: commaai/panda:master into sunnypilot/panda:master-new 2025-04-03 21:48:48 -04:00
Robbe Derks
8a583aaa8c Fan controller: fix instability on high rpm fans (#2179)
* integrator error relative to max rpm

* need to cast
2025-04-02 12:15:35 +02:00
Jason Wen
d09eebc6cb Merge branch 'upstream/panda/master' into sync-20250331 2025-03-31 21:32:13 -04:00
Robbe Derks
97e91d6fee Fan controller fixes (#2177)
Fix overflow and clamp integral
2025-03-27 12:29:41 +01:00
Adeeb Shihadeh
f93c5a7629 disable that for now 2025-03-22 15:06:04 -07:00
Jason Wen
ccb9581b1c Car safety: custom safety params (#75)
* init

* use latest opendbc pr ref
2025-03-15 17:19:30 -04:00
Robbe Derks
998ac9d5d8 Init cleanup: global LED driver (#2170)
* wip

* fix init

* fix libpanda

* cleanup

---------

Co-authored-by: Comma Device <device@comma.ai>
2025-03-14 18:01:45 +01:00
Robbe Derks
e3e5787650 Refactor and cleanup board init (part 1) (#2094)
* refactor out red chiplet

* global can mode set

* global led disable

* this is already done globally

* global harness init

* global spi gpio init

* init OBD_SBUx_RELAY pins in harness init

* this is already done in harness init

* global set_can_mode

* fix SWD on F4

* no more has_obd

* global enable_transceivers

* Revert "global set_can_mode"

This reverts commit 09e19c3e0c29aa69dbd5c3bb361e38f53c28f757.

---------

Co-authored-by: Comma Device <device@comma.ai>
2025-03-12 17:26:07 +01:00
DevTekVE
5479e1572a Sync: commaai/panda:master into sunnypilot/panda:master-new
Sync: `commaai/panda:master` into `sunnypilot/panda:master-new`
2025-03-09 21:12:43 +01:00
DevTekVE
5389b01bdb Merge branch 'master-upstream-1d5b89956b32bbda2940724ce70c5166e44668c5' into sync-20250309
# Conflicts:
#	tests/safety_replay/replay_drive.py
2025-03-09 14:36:40 +01:00
Jason Wen
0bacdb1268 Sync: commaai/panda:master into sunnypilot/panda:master-new 2025-03-06 23:34:54 -05:00
DevTekVE
537a32c0fe Bump opendbc ref 2025-03-06 23:03:28 -05:00
DevTekVE
570cfc83b6 MADS: Cleanup migrated safety codes 2025-03-06 23:01:10 -05:00
Robbe Derks
1d5b89956b More sound fixes (#2169)
* always pick the next playback buf and wait until we've finished playing this one

* misra fix

---------

Co-authored-by: Comma Device <device@comma.ai>
2025-03-06 17:25:27 +01:00
Shane Smiskol
3bf1f8e871 Rivian: properly parse ignition signal
3 isn't defined, but you never know (2 is shutting down)
2025-03-04 15:32:29 -08:00
Shane Smiskol
728b13b9e7 ignition: add Rivian comment 2025-03-04 15:28:28 -08:00
Jason Young
154b66782d Update udev rules in README (#2159) 2025-03-02 09:24:43 -08:00
Adeeb Shihadeh
2e654a0840 Lower fan setting on boot (#2119)
* Lower fan setting on boot

* fix build
2025-03-02 09:24:16 -08:00
commaci-public
d8d3ab6c3e pre-commit: autoupdate hooks (#2071)
Update pre-commit hook versions

Co-authored-by: adeebshihadeh <adeebshihadeh@users.noreply.github.com>
2025-03-01 10:32:32 -08:00
DevTekVE
d688a4b0dd Merge branch 'master-ref-sync-20250228' into sync-20250228
# Conflicts:
#	.github/workflows/test.yaml
#	Dockerfile
#	board/safety.h
#	board/safety/safety_chrysler.h
#	board/safety/safety_ford.h
#	board/safety/safety_gm.h
#	board/safety/safety_honda.h
#	board/safety/safety_hyundai.h
#	board/safety/safety_hyundai_canfd.h
#	board/safety/safety_hyundai_common.h
#	board/safety/safety_mazda.h
#	board/safety/safety_nissan.h
#	board/safety/safety_subaru.h
#	board/safety/safety_subaru_preglobal.h
#	board/safety/safety_toyota.h
#	tests/libpanda/safety_helpers.h
#	tests/libpanda/safety_helpers.py
#	tests/safety/common.py
#	tests/safety/hyundai_common.py
#	tests/safety/mutation.sh
#	tests/safety/test_chrysler.py
#	tests/safety/test_ford.py
#	tests/safety/test_honda.py
#	tests/safety/test_hyundai.py
#	tests/safety/test_hyundai_canfd.py
#	tests/safety/test_nissan.py
#	tests/safety/test_subaru.py
#	tests/safety/test_toyota.py
#	tests/safety_replay/replay_drive.py
2025-02-28 17:56:53 +01:00
Dean Lee
2c802449fd add set_alternative_experience method to Panda class (#2168) 2025-02-27 11:13:43 -08: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
Willem Melching
a744fa7780 Move isotp.py, ccp.py and xcp.py to opendbc (#2166)
* Move ccp.py and xcp.py to opendbc

* move isotp

* more cleanup
2025-02-26 10:41:16 -08:00
Shane Smiskol
0924df1e8e Rivian: fix ignition signal overlap (#2165)
Fix Rivian ignition overlap
2025-02-24 15:03:15 -08:00
Shane Smiskol
9a68935fb1 Fix Rivian ignition (#2163)
* fix rivian ignition

* rm

* fix

* wtf copilot
2025-02-24 12:44:30 -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
Lukas
084a40a46f Rivian: add CAN ignition (#2157)
Rivian CAN ignition
2025-02-21 18:11:15 -08: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
8bd4e2d2dc bump opendbc ref to master 2025-02-19 17:19:54 -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
b82c327de7 Tesla: update ignition signal for Model 3/Y (#2153)
update ignition signal
2025-02-16 21:57:08 -08:00
Jason Wen
44a9806bfb Sync: commaai/panda:master into sunnypilot/panda:master-new 2025-02-16 22:04:15 -05:00
Jason Wen
2d4a76f227 Merge branch 'upstream/panda/master' into sync-20250215
# Conflicts:
#	Dockerfile
#	python/__init__.py
#	tests/safety/test_nissan.py
2025-02-15 21:19:06 -05: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
deeb4840dc Fix opendbc hitl test (#2147)
needs opendbc
2025-02-11 23:23:05 -08:00
Shane Smiskol
978ee19005 Missing Safety references (#2146)
* forgot these

* fix that
2025-02-11 21:03:10 -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
c73bc7bfe8 new opendbc debug api (#2141) 2025-02-10 11:22:56 -08:00