Commit Graph

1539 Commits

Author SHA1 Message Date
Adeeb Shihadeh 5761ab58ea what was that doing there? 2024-11-22 19:33:04 -08:00
Adeeb Shihadeh 2fbf0c5ff8 fix indendation 2024-11-21 11:07:57 -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 422e3e0c0f
H7 sound: fix noise with empty stream (#2083)
fix noise

Co-authored-by: Comma Device <device@comma.ai>
2024-11-18 14:50:17 -08:00
Robbe Derks acc15afaa0
Fix sound playback artifacts (#2082)
this stays in sync

Co-authored-by: Comma Device <device@comma.ai>
2024-11-15 15:35:30 +01:00
Adeeb Shihadeh 742d961b07
Lower siren duration to 3s (#2080) 2024-11-14 17:05:44 -08:00
Adeeb Shihadeh 39c966fb27
sound: little cleaner idle handling (#2078)
Co-authored-by: Comma Device <device@comma.ai>
2024-11-14 10:04:59 +01:00
Robbe Derks dec9223f97
cuatro sound (#1861)
* fake siren works

* this receives something

* microphone in SAI1 POC

* this receives audio again

* double buffer DMA?

* RX DMA works

* wip

* needs cleanup, but this plays

* cleanup of playback

* print mic

* deal with stereo in

* the DMA from SAI1 -> SAI4 doesn't work yet

* this puts mic data in a buf

* this gets sound to the 845

* wip: still garbage from the mic

* inefficient, but it does record the mic

* sine isn't used

* comment out mic for now

* fix misra

* remove mic

* more cleanup

* add amp enable/disable

* no more debug

* newline

---------

Co-authored-by: Comma Device <device@comma.ai>
2024-11-13 16:09:13 +01: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
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
Robbe Derks 352e7ff138
cuatro beeper (#2068)
beeper works

Co-authored-by: Comma Device <device@comma.ai>
2024-10-30 16:18:01 +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
Maxime Desroches 9aec4294cc
ci: test building in release mode (#2062)
* build

* space

* better
2024-10-18 14:10:54 -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
Radek fab8d0bb4a
CAN print improvement (#2052)
* Jungle spam can.

* Print all busses by default.  Prettier print.

* can_health printer

* colors on can error
2024-10-02 12:53:32 -07:00
Maxime Desroches b6644f7a35
revert libpanda with clang (#2044)
* revert

* adapt this
2024-09-26 12:35:45 -07:00
Maxime Desroches fb67bda00e
compile libpanda with clang (#2041)
* clang

* report

* safety.h

* fix lines

* cleaner

* better

* remove this

* revert this

* fix

* tici build

* revert

* revert

* fix
2024-09-25 20:14:12 -07:00
Radek 38cab7d501
Add multiple pandas selector (#2015)
* multiple Panda cli helper

* Don't flash all pandas by default. Use --all arg to flash all.
2024-09-24 16:37:23 -07:00
Maxime Desroches 2037a2ead7
Fix openpilot build (#2039)
* static

* test

* revert
2024-09-24 11:59:17 -07:00
Maxime Desroches 209f7ab09f
misra8.4: safety.h + safety_declarations.h (#2022)
* safety

* static!

* ALLOW_DEBUG

* fix

* fix 12.3

* remove comment

* no debug

* move stuff to debug

* only usage

* cleanup

* canfd hyundai

* no include for now

* indent

* comment for ford suppression

* also gm

* remove suppression

* only safety headers

* cleanup
2024-09-20 19:25:37 -07:00
Maxime Desroches ac9c1b3b3f
misra8.7 (#2033)
* 8_7

* fix test
2024-09-20 15:51:27 -07:00
Maxime Desroches 144846e4ce
misra2.5: safety modes + stm32* (#2032)
partial
2024-09-20 15:14:44 -07:00
Maxime Desroches 022d1c69a1
misra8.4: board/drivers (#2025)
* drivers

* cleanup bootkick

* bxcan cleanup

* fan cleanup

* harness cleanup

* interrupts cleanup

* registers cleanup

* simple_watchdog cleanup

* spi cleanup

* h7 drivers

* no include for now

* conflict

* reduce scope

* cleanup
2024-09-20 14:30:45 -07:00
Maxime Desroches 32eecd7211
misra8.4: board/*.h (#2026)
* main

* can_comms

* main_declarations->main_definitions

* rename this also

* can_definitions

* faults

* power_saving

* provision

* gitversion

* not included

* no include for now
2024-09-19 21:15:08 -07:00
Maxime Desroches df5db3fdb5
misra8.7: board/stm32* (#2031)
partial
2024-09-19 19:20:13 -07:00
Maxime Desroches a2d0b87d4e
misra8.4: board/stm32* (#2027)
* f4

* h7

* no include for now
2024-09-19 15:20:57 -07:00
Maxime Desroches ed831773ea
misra21.15 (#2030)
* cast

* remove suppression

* make it more explicit
2024-09-19 10:35:11 -07:00
Maxime Desroches ae8ef1f71a
misra8.4: safety modes (#2029)
safety mode
2024-09-19 10:30:57 -07:00
Maxime Desroches ceb088ac4e
misra12.2 (#2028)
* 12.2

* remove supression

* new stm
2024-09-18 11:33:12 -07:00
Maxime Desroches 93aedd987b
misra8.4: board/boards (#2021)
* boards

* revert

* includes
2024-09-16 14:07:21 -07:00
Robbe Derks bd6cec3b29
cuatro LED (#2005)
* Revert "cuatro: disable LED for now"

This reverts commit 866bd9c3bc.

* re-enable and make sure to use open-drain

* use gpio function

---------

Co-authored-by: Comma Device <device@comma.ai>
2024-08-30 15:35:50 +02:00
Shane Smiskol 8587ae3fc0
drivers: log can core reset when switching multiplexing (#1972)
fdcan: log lost tx messages when resetting can core for multiplexing
2024-08-26 17:56:46 -07:00
Andrei Radulescu 0a0912234e
update bash scripts to #!/usr/bin/env bash (#1987)
* update bash shebang for better compatibility including macOS

* can't have anything after #bash
2024-08-26 17:25:15 -07:00
Adeeb Shihadeh 866bd9c3bc cuatro: disable LED for now 2024-08-23 20:41:53 -07:00
Comma Device 30d0434380 cuatro: disable SOM reset 2024-08-23 04:57:34 +00:00
Adeeb Shihadeh e53c8025a0
tres: fix SOM reset line blinking (#2003)
Co-authored-by: Comma Device <device@comma.ai>
2024-08-22 21:55:02 -07:00
Robbe Derks 080e53f04d
Cuatro fan (#1999)
* cuatro fan debugging

* fix

* faster fan, faster interrupts

* fix comment

---------

Co-authored-by: Comma Device <device@comma.ai>
2024-08-18 17:43:27 -07:00
Robbe Derks 0234e756e3
STM32H7: add missing interrupt handlers (#1997)
add missing interrupts

Co-authored-by: Comma Device <device@comma.ai>
2024-08-15 21:33:07 -07:00
Robbe Derks b70ba5ecde
Detect H723 in firmware (#1988)
* determine H723 based on package type

* wrong way round

* misra...

* enable SYSCFG clock before reading

* whitelist certain package types
2024-08-02 11:26:16 -07:00
Shane Smiskol 8c3bb0151e
deprecate busTime (#1989)
* deprecate busTime

* fix test_comms.py

* update opendbc

* way more than i thought

* and here

* oops
2024-07-30 21:20:48 -07:00
Adeeb Shihadeh 5ee262f3cb
H7 CR3 notes (#1985) 2024-07-17 11:19:24 -07:00
Adeeb Shihadeh b4e3d5cdd2 Revert "H7: detect board type with second ID pin group (#1975)"
This reverts commit 376408bb4f.
2024-07-14 15:56:18 -07:00
Adeeb Shihadeh 376408bb4f
H7: detect board type with second ID pin group (#1975)
* H7: detect board type based on package

* detect smps

* misra fix

* jungle?

* pkg isn't reliable, need syscfg enabled

---------

Co-authored-by: Comma Device <device@comma.ai>
2024-06-26 18:20:51 -07:00
Adeeb Shihadeh ee1d5ce8bc
add assert_fatal function (#1976)
* add assert function

* fix

* flip

* rename

* assert fatal
2024-06-26 16:59:08 -07:00
Adeeb Shihadeh faa1802669 even more spammy 2024-06-04 21:08:31 -07:00
Shane Smiskol 77ecf515e5
clear stuck CAN messages before switching multiplexing (#1967)
* clear stuck CAN messages before switching multiplexing

* todo
2024-06-04 18:11:21 -07:00
Adeeb Shihadeh e2c9a81c4f jungle: more robust CAN generation mode 2024-06-04 15:37:28 -07:00
Adeeb Shihadeh fec68d0409
jungle: add debug mode with generated CAN traffic (#1966) 2024-06-03 22:25:17 -07:00
dzid26 d401ba169c
Enable misra-c2012-1.2 (#1962)
* misra-c2012-1.2 - allow __typeof__ compiler extension

* explicit c11
2024-05-30 22:13:47 -07:00