Commit Graph

1607 Commits

Author SHA1 Message Date
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
Robbe Derks
3dc2138623 Tie CAN0 and CAN2 enable lines together (#2257)
* OR can0/2 enable lines

* wrong panda

* not allowed
2025-08-19 18:02:44 +02:00
Robbe Derks
3bb456fd9a ADC VDDA calibration (#2247)
* working adc calibration

* bit of cleanup

* cleanup more

* fix misra

---------

Co-authored-by: Comma Device <device@comma.ai>
2025-07-31 17:50:26 +02: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
Robbe Derks
9a410b1ee5 Differential sound (#2220)
* drive negative pin with constant value

* flag

* Revert "flag"

This reverts commit e32fee7b277558bcf16f28c2d84b1b0c89ae0fb7.

* handle both

* good ol' misra

* complete

* complete

* default

---------

Co-authored-by: Comma Device <device@comma.ai>
Co-authored-by: Maxime Desroches <desroches.maxime@gmail.com>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2025-07-29 17:57:33 -07:00
Adeeb Shihadeh
b23c7aa38b opendbc updates (#2245)
* opendbc updates

* get latest opendbc in docker

* .
2025-07-29 14:16:20 -07:00
Adeeb Shihadeh
9c0be978d5 remove some old comments 2025-07-27 15:06:30 -07:00
Adeeb Shihadeh
bc90c22e3b fix pwm.h indentation 2025-07-20 13:45:31 -07:00
Adeeb Shihadeh
805d2437e8 move bootstub define 2025-07-20 11:37:37 -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
b10c4bb015 Deprecate jungle v1 (#2228)
jungle: deprecate v1 board
2025-07-19 10:19:40 -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
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
Comma Device
56f9dbfaa6 Revert "sound-new-rev"
This reverts commit 6c98179b06.
2025-05-27 11:31:47 +00:00
Comma Device
6c98179b06 sound-new-rev 2025-05-27 11:31:00 +00:00
Robbe Derks
c0cc78db2c enable amp on that pin too (#2219)
Co-authored-by: Comma Device <device@comma.ai>
2025-05-27 13:24:32 +02:00
Maxime Desroches
d75699e6ab initialize DAC with silent value (#2215)
silence
2025-05-20 16:36:10 -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
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
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
Adeeb Shihadeh
f93c5a7629 disable that for now 2025-03-22 15:06:04 -07: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
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
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
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