Commit Graph

337 Commits

Author SHA1 Message Date
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
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
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
Adeeb Shihadeh
2e654a0840 Lower fan setting on boot (#2119)
* Lower fan setting on boot

* fix build
2025-03-02 09:24:16 -08:00
Adeeb Shihadeh
9272d4b729 Reduce heartbeat beeper false positives (#2104) 2024-12-12 15:56:43 -08:00
Adeeb Shihadeh
742d961b07 Lower siren duration to 3s (#2080) 2024-11-14 17:05:44 -08: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
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
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
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
Adeeb Shihadeh
ee1d5ce8bc add assert_fatal function (#1976)
* add assert function

* fix

* flip

* rename

* assert fatal
2024-06-26 16:59:08 -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
418fca3583 enable misra-config checks (#1879)
* mostly done

* fix rest of misra-config

* do other two in next pr
2024-03-24 12:10:37 -07:00
Adeeb Shihadeh
a727cecdb8 remove unused deepsleep stuff (#1914) 2024-03-22 14:48:49 -07:00
Adeeb Shihadeh
091773f448 Adjust CAN bus orientation live with harness orientation (#1913)
* set orientation in one place

* no flip

* cleanup

* more explict on startup

---------

Co-authored-by: Comma Device <device@comma.ai>
2024-03-22 14:00:13 -07:00
Adeeb Shihadeh
de061e4f73 remove rest of gmlan (#1908)
* remove rest of gmlan

* fix

* update struct

* update
2024-03-21 13:56:36 -07:00
Adeeb Shihadeh
6dfd4db4ab remove rtc (#1897)
* remove rtc

* fix build

* rm taht

* revert that
2024-03-11 16:08:43 -07:00
Adeeb Shihadeh
7c613fdcb5 remove redundant board_type (#1833)
* remove redundant board_type

* fix jungle build
2024-01-23 22:08:22 -08:00
Adeeb Shihadeh
c5e79403a8 remove unused cnt 2024-01-21 16:22:17 -08:00
Aryan
a902a19ead enable misra-c2012-21.2 (#1819)
* enable misra-c2012-21.2

* Add suppressions on memset and memcpy

* revert that

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2024-01-18 14:29:01 -08:00
Adeeb Shihadeh
bc6eaf358e enable misra-c2012-14.2 (#1815)
* enable misra-c2012-14.2 (#1805)

* true

* while

---------

Co-authored-by: Ruben Medina <samrum@gmail.com>
2024-01-16 15:49:04 -08:00
Adeeb Shihadeh
6334ded34a Revert "enable misra-c2012-14.2 (#1805)"
This reverts commit a8bc525d92.
2024-01-16 15:39:30 -08:00
Ruben Medina
a8bc525d92 enable misra-c2012-14.2 (#1805) 2024-01-15 21:20:39 -08:00
Adeeb Shihadeh
666a462450 remove low level LIN support (#1744) 2023-11-23 17:18:25 -08:00
Adeeb Shihadeh
4c0d2505b7 remove k-line driver (#1743) 2023-11-23 17:09:10 -08:00
Adeeb Shihadeh
b1ca493580 safety: fix ambiguous names (#1729)
renames
2023-11-19 22:44:13 -08:00
Adeeb Shihadeh
606d7580c8 safety: cleanup init return struct (#1728)
* try 1

* do the rest

* fix misra
2023-11-19 21:05:53 -08:00
Adeeb Shihadeh
d2ea9ad293 refactor bootkick (#1690)
* bootkick refactor + reset

* simplify

* revert reset stuff

* cleanup

---------

Co-authored-by: Bruce Wayne <batman@comma.ai>
2023-11-08 22:54:55 -08:00
Adeeb Shihadeh
b6e37f25b6 Remove flash logging (#1674)
* Revert "Disable flash logging (#1667)"

This reverts commit 62db60595b.

* Revert "Faster log retrieval (#1484)"

This reverts commit 694aae9c26.

* Revert "Flash bounds checking outside of bootstub (#1459)"

This reverts commit 054344de6b.

* Revert "Logging (#1445)"

This reverts commit 0cc91a7f7b.

* cleanup

* cleanup
2023-09-30 12:49:46 -07:00
Adeeb Shihadeh
e98639b752 increase not booted log timeout 2023-09-07 16:33:36 -07:00
Igor Biletskyy
3ab4f43de0 enable red and green leds until USB/SPI init (#1647)
* init

* add green
2023-09-05 13:36:13 -07:00
Jason Wen
1d874be2b7 Safety: unify controls_allowed with boolean (#1589) 2023-08-18 13:22:04 -07:00
Adeeb Shihadeh
c66b98b2a6 finish esp/gps removal (#1559) 2023-08-06 12:29:54 -07:00
Robbe Derks
feef2e6c71 Harness tick at 8Hz (#1541)
harness tick at 8Hz

Co-authored-by: Comma Device <device@comma.ai>
2023-08-01 21:31:15 -07:00
Robbe Derks
a945053ade Force relay drive (#1539)
force drive

Co-authored-by: Comma Device <device@comma.ai>
2023-08-01 16:33:34 -07:00
Adeeb Shihadeh
6b9b448259 log device boot time (#1503)
* log device boot time

* misra

* only log real boots

* set gpio

* true

* initial

* log bootkick

* fix RPv2

---------

Co-authored-by: Comma Device <device@comma.ai>
Co-authored-by: Igor Biletksyy <bs@privacy.im>
2023-07-12 20:34:46 -07:00
Adeeb Shihadeh
1f50a84b86 update old comment (#1282) 2023-07-01 18:57:53 -07:00
Igor Biletskyy
73798d7dce Disable CAN irqs when transceivers are disabled in power save mode (#1485)
init test

MISRA 15.7
2023-06-28 12:33:17 -07:00
Robbe Derks
0cc91a7f7b Logging (#1445)
* try 1

* some fixes

* fix some misra

* first poc working

* more things

* more misra fixes

* fix misra

* add rate limiting

* fix misra

* add some unit tests through libpanda

* add more tests and fix some stuff

* fix misra again

* add startup log hitl test

* list

* don't fail on wrong timestamps

* improvements

* fix tests

* expected logs test?

* not sure why this passed

* oh, it doesn't reset

* only show last few

* guess at expected logs

* needs this

* ugh

* reduce compiler warnings

* adjust expected logs

* this is correct

* is it really 1?

* min max

* reduce spam in SPI test

* some cleanup
2023-06-13 17:00:56 +02:00
Adeeb Shihadeh
f95f4a5294 stricter simple watchdog (#1413) 2023-05-15 14:15:48 -07:00
Adeeb Shihadeh
2eef7f3fff reset heartbeat_engaged once heartbeat is lost 2023-05-08 10:15:31 -07:00
Robbe Derks
2c937656cf Continuous harness detection (#1402)
* read in mV and make threshold board-dependent

* refactor and add SBU voltages to health

* refactor relay driving

* more refactoring and readout lock

* avoid race condition

* fix misra

* continuous detection

* 1Hz is fine

* another race condition

* use harness detection to trigger bootkick

* update orientation detection test

* more in-depth harness tests

* fix ignition

* fix

* raise threshold
2023-05-08 13:30:23 +02:00
Adeeb Shihadeh
272b81e97b fan: fix stall detection (#1351)
* cleanup and fix

* dos must stall

* clean those up

* fix misra

* more test

* fix import

* cleanup

---------

Co-authored-by: Comma Device <device@comma.ai>
2023-04-20 15:44:12 -07:00
Adeeb Shihadeh
e516a5752b watchdog to log fault on heartbeat loop (#1328)
Co-authored-by: Comma Device <device@comma.ai>
2023-04-04 18:51:35 -07:00
Robbe Derks
79708f912d USB enumeration based on frame numbers (#1324)
* use frame numbers to detect host connection

* fix weird formatting

---------

Co-authored-by: Comma Device <device@comma.ai>
2023-04-03 17:13:02 +02:00
Adeeb Shihadeh
c5cd0a0232 Enable siren for multi-panda setups (#1300) 2023-03-21 18:49:58 -07:00
Robbe Derks
796d771912 Enable control over the fan on C3 while still in the bootloader (#720)
* GPIO control over the fan from ABL

* fixes

* leave this todo

---------

Co-authored-by: Comma Device <device@comma.ai>
2023-02-08 16:01:14 +01:00
Robbe Derks
744b21ef69 Bring back green led mode + fix small python lib bug (#1206)
bring back green led mode

Co-authored-by: Panda Provisioning <panda@comma.ai>
2023-01-10 15:09:51 -08:00
Adeeb Shihadeh
88b30e1a84 CAN comms test (#1181)
* CAN comms test

* remove those

* cleanup

* little more
2022-11-30 22:12:28 -08:00