405 Commits

Author SHA1 Message Date
Daniel Koepping
7ffc916578 move can ignition to opendbc (#2396)
* move can ignition to opendbc

temp: point to opendbc PR

* rm

* pyproject

* run ci

* fix

* move
2026-05-13 11:58:17 -07:00
Shane Smiskol
b19b66a6f0 Disable body ignition check temporarily (#2390)
Fix keeping teslas awake
2026-04-22 14:59:58 -07:00
stef
ac89f0c92d make body can hook exception v2 specific (#2387) 2026-04-10 10:26:50 -07:00
Jason Huang
7c0c1d956b Body v2: Hoverboard Motors (#2308)
* body

* hoverboard motors

* pass test

* body ignition exception and remove used comms

Co-authored-by: rexblade21 <zkhuang4968@gmail.com>

* send extra empty message to distinguish fingerprint

* can.h body v2 put safety hook = 1

* change v2 extra id to 0x396

* fix mirsa style error

* move ignition exception to seperate bus 2 if statement

* silence heartbeat siren on body

* turn ignition off on switch repress

* 0x250 interception in panda fw

* send extra body data, same as v1 body

* cleanup data passing for more predictable inputs and lower rpm deadband

* remove extra downscaling

* change v2 fingerprint from 0x002 to 0x222

* clean up, bus 0 ignition exception and trq mode

* keep in SPD mode for now

* remove comment

* clean

* apply suggestions

---------

Co-authored-by: stefpi <19478336+stefpi@users.noreply.github.com>
2026-04-08 09:17:01 -07:00
Robbe Derks
c10b82f8ff Stagger dcam FSIN (#2307) 2026-03-09 19:14:38 -07:00
Adeeb Shihadeh
b1191df619 cleanup unused defines in drivers.h (#2336) 2026-02-15 17:02:00 -08:00
Adeeb Shihadeh
ad377ced81 single header for all drivers (#2335)
* drivers.h, claude's try

* include from root

* fix mac

* organize a lil more
2026-02-15 16:33:58 -08:00
Jason Young
f373c69bbb garbage collect always-true condition check (#2305)
garbage collect dead code
2025-12-10 13:00:20 -08:00
Igor Biletski
e724032378 Cuatro siren (#2294)
* Fix siren

* fix MISRA

* remove MISRA suppression

* disable amp

* fix rebase mistake

* fix fault

* diff audio

* misra

---------

Co-authored-by: Comma Device <device@comma.ai>
2025-11-03 15:28:35 -08:00
Shane Smiskol
f278f31f8f Update LED_PWM_POWER definition (#2283)
Changed LED_PWM_POWER value from 5 to 2.
2025-09-28 23:51:00 -07:00
Adeeb Shihadeh
5ee618e2f1 spi: let err count overflow (#2279) 2025-09-23 18:03:05 -07:00
Adeeb Shihadeh
1289337ceb Reset CANFD auto-detection on CAN init (#2271)
* Reset CANFD auto-detection on CAN init

* 4u

* simpler, 4th is fake
2025-09-15 09:07:25 -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
probablyanasian
a0a30f3fad Change PWM to 25kHz (#2277) 2025-09-11 20:07:21 -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
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
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
Adeeb Shihadeh
e13f3031c0 SPI: add NACK test endpoint (#2249)
Co-authored-by: Comma Device <device@comma.ai>
2025-07-30 20:32:46 -07:00
Adeeb Shihadeh
1d9aa1beba SPI: spi_error_count is a better name (#2248)
SPI: rename spi_checksum_error_count -> spi_error_count
2025-07-30 18:20:18 -07:00
Robbe Derks
20dcba723d Generic ADC implementation (#2246)
* refactor panda side

* fix misra?

* use common ADC driver in jungle

* fix misra fr now

* fix oversampling

* default channel macro

* one more

* this makes more sense

---------

Co-authored-by: Comma Device <device@comma.ai>
2025-07-30 17:18:30 +02:00
Adeeb Shihadeh
b23c7aa38b opendbc updates (#2245)
* opendbc updates

* get latest opendbc in docker

* .
2025-07-29 14:16:20 -07:00
Adeeb Shihadeh
bc90c22e3b fix pwm.h indentation 2025-07-20 13:45:31 -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
Maxime Desroches
e462c34d3d endpoint to set TIM1 period and channel pulse length (#2222)
works
2025-06-03 18:37:28 -07:00
Robbe Derks
4f227f88c8 PWM-ing LED (#2221)
* PWMing LED

* consistency

* fix in bootstub

---------

Co-authored-by: Comma Device <device@comma.ai>
2025-05-28 15:40:46 +02:00
Robbe Derks
7eb5dba3dc Fix register errors (#2197)
* fix some errors

* forgot this

* turns out this didn't work and makes it too quiet when it does

* this also dynamically changes

* this is the interrupt timer itself
2025-05-13 13:01:50 +02:00
Shane Smiskol
b4773f96b3 ignition: suffix counters (#2194)
suffix counters
2025-04-25 13:44:30 -07:00
Aubrey Wahl
0af9744ede Add guards around platform-specific code (#2189)
* guard platform specific code

* more simple

* less dumb guard

* stragglers

* blankspace

* blankspace2

* crc.h

* keep condition

* good call

* consistency

* another one

---------

Co-authored-by: Robbe Derks <robbe.derks@gmail.com>
2025-04-17 15:24:59 +02:00
aubsw
de677241ed Delete unused watchdog, lldac, uart_rx_ring (#2188)
* delete unused code!

* watchdog init delete

* delete watchdog.h
2025-04-15 11:14:08 +02:00
Shane Smiskol
d319ea2bba CAN ignition: fix unscoped prev counter (#2191)
scoped prev_counter
2025-04-14 21:06:01 -07:00
Robbe Derks
0dc95a89dd Cuatro: changes for new board rev (#2176)
changes for new board rev

Co-authored-by: Comma Device <device@comma.ai>
2025-04-10 15:55:54 -07:00
Robbe Derks
b14c47eb79 Cleanup common and useless debug logs (#2183)
* cleanup common logs

* cleanup puth2
2025-04-09 16:09:19 +02:00
Robbe Derks
a2d8ad9486 Log divergent registers once (#2182)
log divergent reg
2025-04-09 15:21:46 +02: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
Robbe Derks
97e91d6fee Fan controller fixes (#2177)
Fix overflow and clamp integral
2025-03-27 12:29:41 +01: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 09e19c3e0c.

---------

Co-authored-by: Comma Device <device@comma.ai>
2025-03-12 17:26:07 +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
Adeeb Shihadeh
2e654a0840 Lower fan setting on boot (#2119)
* Lower fan setting on boot

* fix build
2025-03-02 09:24: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
Lukas
084a40a46f Rivian: add CAN ignition (#2157)
Rivian CAN ignition
2025-02-21 18:11:15 -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
Shane Smiskol
3ff97305c5 fdcan: rate limit CAN core reset (#2137)
* rate limit can core resets

* overflow protection

* U
2025-01-30 13:21:18 -08:00
Adeeb Shihadeh
0016c33e7e cuatro: remove beeper (#2100) 2024-12-09 17:33:36 -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
Adeeb Shihadeh
0b364ece1e tres: fix I2C hang on fake siren init (#2069)
* fix i2c hang

* misra fix

---------

Co-authored-by: Comma Device <device@comma.ai>
2024-10-30 16:53:17 -07:00