Commit Graph

66 Commits

Author SHA1 Message Date
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
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
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
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
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
Maxime Desroches
ac9c1b3b3f misra8.7 (#2033)
* 8_7

* fix test
2024-09-20 15:51:27 -07:00
Maxime Desroches
ed831773ea misra21.15 (#2030)
* cast

* remove suppression

* make it more explicit
2024-09-19 10:35:11 -07:00
Adeeb Shihadeh
a727cecdb8 remove unused deepsleep stuff (#1914) 2024-03-22 14:48:49 -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
Aryan
b4442a7c93 enable misra-c2012-10.3 (#1852)
* enable misra-c2012-10.3

* fix that

* cleanup

* little more

* one more

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2024-02-18 11:56:44 -08:00
Robbe Derks
3cd0023bc1 cuatro power readout (#1869)
* refactor voltage / current reading

* fix bug and add readout to cuatro

* fix misra?

* just suppress then

---------

Co-authored-by: Comma Device <device@comma.ai>
2024-02-15 13:49:06 -08:00
Aryan
54459e694e update cppcheck (#1859)
* update cppcheck

* Update tests/misra/install.sh

* delete cppcheck cache

* remove misra 5.8 erroors

* fixed uninitialized data error

* suppress misra-c2012-2.3 and misra-c2012-2.4

* reinstate cache to fix mutation test

* rerun for mutation test

* increase timeout for mutation test

* styling

* comments + variable name changes

* Update tests/misra/install.sh

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

* Update install.sh

* more variable name changes

* condition on defining CANPacket_t

* just cherry pick

* fix build

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2024-02-10 14:50:36 -08:00
Ruben Medina
3bd980eb39 enable misra-c2012-17.3 (#1806) 2024-02-03 23:20:30 -08:00
Adeeb Shihadeh
93a06f1257 remove HW GMLAN support (#1848) 2024-02-03 23:18:33 -08:00
Ruben Medina
40671436ee enable misra-constParameterPointer (#1826) 2024-01-20 21:50:42 -08:00
Ruben Medina
8347fa2621 enable misra-c2012-10.5 (#1825) 2024-01-20 17:05:12 -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
Shane Smiskol
bb75afc84e safety: add safety param for gas interceptor (#1735)
* some refactoring still needing to be done here

* 50hz

* set rx checks

* tx msgs

* test

* fix

* forgot to check this since it's static now

* enable_gas_interceptor

* more

* remove int funcs since are common

* generic!

* not generic

* need to set counter now

* set_enable_gas_interceptor not needed

* already reset in safety init

* fix test

* remove gas_interceptor_detected (partly)

* oof need for hjonda too

* edit structs

* more honda (still broken)

* fix typo

* shift these down

* can also make this extensible

* stash

* defining classes is much simpler, maybe in future we will have some sort of wrapper after some more thought

* remove create_interceptor_test now

* add lta interceptor

* clean up print

* clean up

* once

* type hint

* rm

* no interceptor with stock long + good test

* add interceptor counter to honda

* need alt interceptor + set rx checks for honda

* we were never testing button enable with nidec + interceptor!

honda almost all passing

* these fixes make sense

* clean up

* better

* clean up test cov

* clean up

* not needed

* fix tx msgs

* clean up

* cppcheck

* fix

* unnecessary
2023-12-14 15:22:17 -08:00
Adeeb Shihadeh
6eb89cefdf board: remove set_phone_power (#1747) 2023-11-25 13:17:08 -08:00
Adeeb Shihadeh
4c0d2505b7 remove k-line driver (#1743) 2023-11-23 17:09:10 -08:00
Adeeb Shihadeh
f1cd12651c safety: remove LIN hook (#1741)
* safety: remove LIN hook

* rm more
2023-11-23 16:30:20 -08:00
Adeeb Shihadeh
a1d699b87d SOM boot recovery (#1712)
* reset

* simpler

* only once per panda boot

* cleanup

* also check serial
2023-11-09 18:01:46 -08:00
Adeeb Shihadeh
aaa1172fa2 HITL bootkick tests (#1685)
* HITL bootkick tests

* both bootkick cases

* more

* som use gpio

* cleanup

* pretty reliable now
2023-10-06 13:38:35 -07: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
c66b98b2a6 finish esp/gps removal (#1559) 2023-08-06 12:29:54 -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
7f1944cf43 debug endpoint for custom clock source period (#1538)
* debug endpoint for custom clock source period

* cleanup

---------

Co-authored-by: Comma Device <device@comma.ai>
2023-08-01 16:17:42 -07:00
Robbe Derks
694aae9c26 Faster log retrieval (#1484)
improve get_logs
2023-06-30 17:26:39 +02:00
Igor Biletskyy
5889e3784f H7: fix FDCAN_IR register check (#1480)
* init

* typo

* misra

* leftover
2023-06-21 18:56:10 -07:00
Igor Biletskyy
9d56e80390 Change can_health request method (#1472)
* init

* fix typo

* remove tx lost as fake and add rx lsot
2023-06-20 12:29:20 -07:00
Igor Biletskyy
0f4e8f79f5 add IRQ rate helper function (#1471)
init
2023-06-20 11:47:43 -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
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
Robbe Derks
fea1feb598 ADC cleanup (#1401)
* cleanup function names

* cleanup voltage reading

* define constant

* fix misra

* remove comments
2023-05-04 13:22:01 +02:00
Adeeb Shihadeh
3c75a8bc00 add fan stall count to health (#1355)
* add fan stall count to health

* fix misra

---------

Co-authored-by: Comma Device <device@comma.ai>
2023-04-20 13:30:56 -07:00
Adeeb Shihadeh
6f852b44a9 SPI: log checksum errors in health (#1334)
* SPI: log checksum errors in health

* actually send it

* check in hitl teardown

* check that

* fix misra
2023-04-05 22:05:14 -07:00
Igor Biletskyy
75792fb255 Fix different ADC scales (#1288)
* different ADC scales

* add HITL

* we had it, remove
2023-03-14 14:49:39 -07:00
Robbe Derks
d6af117c62 Microsecond timer fix (#1236)
* add microsecond timer readout

* add CI test

* fix
2023-02-14 12:16:15 +01:00
Adeeb Shihadeh
b8693da342 add comms handler to get MCU UID (#1212)
* cleanup first

* get uid

* add to bootstub and test

* fix pedal

* match that

Co-authored-by: Comma Device <device@comma.ai>
2023-01-15 20:13:26 -08:00
Robbe Derks
11d90f9e78 No more magic for the can chunks (#1191)
* no more magic

* bump version

* no need for this

* comment cleanup

* add comms_can_reset tests

* we can't ensure this for compatibility reasons

* add CANPacket_t checksum
2023-01-13 10:59:58 -08: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
Robbe Derks
1d732d4747 F4: Cleanup clock src, second try (#1193)
* F4: cleanup clock source

* little more

* void

* restore the timer setup

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Co-authored-by: Comma Device <device@comma.ai>
2022-12-14 15:30:04 +01:00
Adeeb Shihadeh
88b30e1a84 CAN comms test (#1181)
* CAN comms test

* remove those

* cleanup

* little more
2022-11-30 22:12:28 -08:00
Adeeb Shihadeh
e6f62a62aa rename puts to avoid conflict with stdio.h (#1174)
* rename puts to avoid conflict with stdio.h

* better name
2022-11-29 22:55:10 -08:00
Adeeb Shihadeh
80dac4cd94 cleanup CAN definitions (#1170) 2022-11-29 15:56:43 -08:00
Adeeb Shihadeh
c075050d5d Revert "F4: cleanup clock source (#1160)"
This reverts commit f0f67ccf85.
2022-11-21 20:31:01 -08:00