Commit Graph

2257 Commits

Author SHA1 Message Date
Adeeb Shihadeh
f2f596b342 more robust HITL test prep (#1449) 2023-06-08 11:17:35 -07:00
Adeeb Shihadeh
1a9a94c519 python: add helper to wait until panda comes up (#1447)
Co-authored-by: Comma Device <device@comma.ai>
2023-06-07 19:43:43 -07:00
Adeeb Shihadeh
bf2c007103 H7: fix CAN RX delay (#1446) 2023-06-06 18:48:19 -07:00
Adeeb Shihadeh
a4ed5bb943 adjust timeouts (#1444) 2023-06-04 21:17:44 -07:00
vanillagorillaa
aa03163a92 Nissan: use generated DBCs (#1438)
* update nissan dbcs

* update opendbc ref

* Update Dockerfile

* Update Dockerfile

* fix

* try again

* need that too

* cp

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2023-06-04 16:06:46 -07:00
Adeeb Shihadeh
a29ee424bc python: remove duplicate enter_bootloader (#1442) 2023-06-04 14:54:40 -07:00
Adeeb Shihadeh
92ed48ae5c HITL tests: add timeouts (#1352)
* set timeout

* closest

* more timeout

* fan test is slow

* retry

* break

* bump
2023-06-04 01:00:17 -07:00
Adeeb Shihadeh
17ca4171df H7 SPI: disable IRQs only when necessary (#1437)
less irq disable

Co-authored-by: Comma Device <device@comma.ai>
2023-06-03 15:53:16 -07:00
Adeeb Shihadeh
e1e9bd048d benchmarking script 2023-06-03 15:22:47 -07:00
Robbe Derks
5847d7dbc0 Tesla safety: fix wrong message rate (#1277)
* half the freq, double the rate

* fix test

* fix names
2023-06-01 23:10:36 +02:00
Bruce Wayne
00c2689487 dfu: fix small writes 2023-05-24 16:23:37 -07:00
Adeeb Shihadeh
2da9b8d173 python: wait on any DFU panda (#1435) 2023-05-23 20:50:09 -07:00
Adeeb Shihadeh
2a5058d858 export FW_PATH 2023-05-22 00:01:54 -07:00
Adeeb Shihadeh
4dd2735e38 cleanup fw filename conventions (#1434)
* cleanup fn

* import os

* fix path
2023-05-21 21:19:19 -07:00
Adeeb Shihadeh
a8f851870d ci: bump up safety test timeout 2023-05-21 20:31:01 -07:00
Adeeb Shihadeh
ab18f5aa99 update release cert path 2023-05-21 20:30:13 -07:00
Adeeb Shihadeh
4d7abcc2e6 PandaDFU: don't reset in program_bootstub (#1433) 2023-05-21 20:05:21 -07:00
Adeeb Shihadeh
c898ec7ce8 refresh can tx slots available after write (#1432)
Co-authored-by: Comma Device <device@comma.ai>
2023-05-20 22:00:13 -07:00
Adeeb Shihadeh
52f96bac68 spi: nack on can tx endpoint if buffer is full (#1426)
* spi: nack on can tx endpoint if buffer is full

* handle in python lib

* fix timeout

* fix timeout

* fix linter

* cleanup

* fix

---------

Co-authored-by: Comma Device <device@comma.ai>
2023-05-19 22:43:34 -07:00
Adeeb Shihadeh
f5c28f811d tres: run fan tests (#1422) 2023-05-18 15:46:06 -07:00
Shane Smiskol
2a53833753 Ford safety: prevent disable AEB (#1428)
* Ford AEB safety

* whoops

* working tests

* debugging

* clean up

* stock aeb test

* split up test

* rm

* cmt

* rm

* just test stateless sigs for simple branch

* clean up

* rm

* just test this bit

* it's signed now

* cmt

* cmt

* clean up

* ohh
2023-05-18 14:14:26 -07:00
Igor Biletskyy
622106d7d4 Revert "H7: fix lockup on disconnected bus" (#1430)
Revert "H7: fix lockup on disconnected bus (#1410)"

This reverts commit 03435947bb.
2023-05-18 13:54:30 -07:00
Shane Smiskol
831a296e39 Ford: test inactive gas (#1429)
test inactive gas
2023-05-18 13:43:04 -07:00
Shane Smiskol
803211a35a tests: remove temporary comment 2023-05-18 00:23:02 -07:00
Shane Smiskol
14bd994f83 Ford: add longitudinal safety (#1359)
* add ACCDATA msg

* ford long safety

* long flag

* split stock and op long tests

* use accel limits for brake

* add comment

* fix acceleration limits

fix acceleration limits

* fix gas limits

* temp bug

* fix min gas, allow -0.5 (engine braking?)

* fix test

* fix tests

* yay it caught this

* pylint

* base name

* typing

* Revert "typing"

This reverts commit 7fb5e304cb8eb6c9afff9fbe4266bc0a67f49c68.

* temp fix

* rm line

* this is handled by PandaSafetyTest

* revert

* move

---------

Co-authored-by: Cameron Clough <cameronjclough@gmail.com>
2023-05-18 00:21:29 -07:00
Adeeb Shihadeh
2ed514807e H7: restart SPI peripheral between transfers (#1424)
* H7: restart SPI peripheral between transfers

* fix misra

---------

Co-authored-by: Comma Device <device@comma.ai>
2023-05-17 20:59:37 -07:00
Adeeb Shihadeh
be2ca72f81 Revert "CI: automatically update on-device dependencies (#1420)"
This reverts commit 463795d497.
2023-05-17 18:03:45 -07:00
Adeeb Shihadeh
463795d497 CI: automatically update on-device dependencies (#1420)
* CI: automatically update on-device dependencies

* unset that

* bump
2023-05-17 17:21:26 -07:00
Adeeb Shihadeh
a93bc954c5 SPI HITL tests + cleanup (#1417)
* start comms hitl tests

* pull that out

* revert that

* more test

* fix warnings

* fix linter

* another simple case

---------

Co-authored-by: Comma Device <device@comma.ai>
2023-05-17 17:13:12 -07:00
Shane Smiskol
3c9d277276 safety: always allow inactive gas command (#1418)
* always allow inactive gas

* rewrite this

* revert

* no functional change but test it correctly

* also here
2023-05-17 15:52:50 -07:00
Justin Newberry
0a738b7ee8 Subaru: rename legacy to preglobal (#1415)
* rename

* missing some variables

* fix find/replace error
2023-05-15 17:22:40 -07:00
Adeeb Shihadeh
f95f4a5294 stricter simple watchdog (#1413) 2023-05-15 14:15:48 -07:00
Shane Smiskol
675b1e847f iso-tp: revert CAN frame length check (#1411)
revert
2023-05-12 22:14:23 -07:00
Igor Biletskyy
03435947bb H7: fix lockup on disconnected bus (#1410)
* fix h7 lockup

* love MISRA!

* EW and EP isn't actual errors
2023-05-12 19:20:42 -07:00
Kacper Rączy
822a7367c1 macOS: use homebrew gcc using version suffix. update setup instructions (#1409)
* Add version suffix to gcc on Darwin

* Update macos setup intructions

* Delete unused SConscript at tests/

* Move gcc stuff to tests/libpanda/SConscript
2023-05-12 11:06:08 -07:00
Adeeb Shihadeh
3d4b7b1afc remove unused sconscript 2023-05-11 13:02:20 -07:00
Robbe Derks
1e131f2b17 RX/TX lost reversal for bxcan (#1408)
this should be reversed
2023-05-11 17:21:34 +02:00
Adeeb Shihadeh
da7c577486 spi dfu: fast timeout for header (#1407) 2023-05-08 16:43:25 -07:00
Adeeb Shihadeh
98a15f2a90 harness: fix register divergent on GEN1 (#1405)
* harness: fix register divergent on GEN1

* has harness

* revert that

---------

Co-authored-by: Bruce Wayne <batman@comma.ai>
2023-05-08 15:02:18 -07:00
Adeeb Shihadeh
2dfb9815ed HITL tests: disable partial tests on branches (#1406)
Co-authored-by: Bruce Wayne <batman@comma.ai>
2023-05-08 14:18:43 -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
Shane Smiskol
35609dfdce safety utils: add ROUND helper (#1397)
* add round macro

* Update board/utils.h

* function

* one line

* misra

* use here too
2023-05-06 21:25:25 -07:00
Adeeb Shihadeh
e7f2e72c3d setup independent watchdog (#1404)
* setup independent watchdog

* builds

* same file

* configurable timeout

* disable for now

* no feed

* rm

---------

Co-authored-by: Comma Device <device@comma.ai>
2023-05-05 16:46:38 -07: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
Shane Smiskol
cedb5fd1a6 Ford: remove safety mode from debug flag (#1400)
remove from debug
2023-05-04 06:08:10 +00:00
Shane Smiskol
94cd9a0788 Ford: curvature rate limits (#1258)
* ford curvature rate limits draft

* make common angle tests work with curvature

* comment

* no need for this

* extra line

* fix test

* generic curvature test class

* more reasonable limits

* adjust limits

* draft

* works

* works

* clean up

* add vehicle speed

* works

* clean up

* clean up

* more clean up

* more clean up

* lower

* double

* add updated bp

* remove

* can clean that up

* draft

* this works!

* think that's the correct placement

* try this

* closer

* use min

* add/sub one to not falsely trip

* remove old angle error safety

* i'm not sure if clamp is more readable

* fix that

* fix

* stash

* fix these tests

* ternary

* floats are a pain

* draft, works kinda

* even better

* round that

* need tolerance

* this should work (adding tol=1 wouldn't let us have multiple rate limits)

* test works

* clamp breaks if low is higher than high :(((

down from 150 blocked msgs to 7!

* no blocked msgs!!!

* test a whole bunch

* stash

* stash

* clean up test

* clean up test to be more like torque (+ speeds)

* clean up

* cmt

* test up

* up and down are good

* rename and remove

* this is tested

* uncomment

* this is tested by ensuring we move towards error at a minimum rate

* not used any more

* revert common

* clean up test_ford a bit more

* some clean up (combine variables where it makes sense)

* yeah can't use clamp since min isn't always < max, min(max(.. handles this

* clean up

* revert that

* comments

* cmt

* another

* that's old

* misra!

* Update board/safety/safety_ford.h

* Update board/safety/safety_ford.h

* add todo, fix test case

* more clear, matches panda

* add comment

* Update tests/safety/test_ford.py

* more fine speed increments

* rm comment

* better names

* this is expected behavior (tested by common checks)

* CURVATURE_ERROR_LIMIT_SPEED

* better name?

* pretty clean!

* same for up

* only used in one place now

* these are now clear

* common term

* make vehicle_speed a sample_t

* need to use values[0]

* speed is a float

* Revert "speed is a float"

This reverts commit 01af02f1d35026d983cc2ba6d9ba364c87c800ee.

* Revert "need to use values[0]"

This reverts commit 8f6d68345a92f7285d07ca071285e903ed7871bb.

* Revert "make vehicle_speed a sample_t"

This reverts commit ecd8dc86b6b97cc8bff7da697353a8d90c358b12.

* safety fixes for new speed sample

* test fixes for new speed sample

* fix misra and make intermediate variable

* this isn't needed
2023-05-04 04:59:35 +00:00
Shane Smiskol
b44df8151a safety tests: use rx/tx helpers (#1399)
use rx/tx helpers
2023-05-04 04:09:09 +00:00
Shane Smiskol
3a64b6ccb5 safety: make vehicle_speed a sample (#1391)
* convert vehicle_speed into sample_t, change no behavior

* draft

* round

* test

* clean up

* round

* round all

* use min

* remove round macro from this PR

* reset speed measurement

* debug

* bbd

* rm

* revert

* test above and below

* need this now

* misra pt 1

* misra pt 2

* misra pt 3

* i don't understand this one, not different from other cases

* fix test

* test

* revert that

* draft

* test the sample_t works properly for safety modes that use it (angle only)

* can combine these tests

* test decimals

* global

* misra

comment

* suggestions

* fix

* use new helper
2023-05-04 03:37:56 +00:00
Shane Smiskol
5a9603600e safety tests: reset safety helper (#1398)
* reset safety

* use it

* clean it up

* two lines

* fix python linting
2023-05-04 02:51:08 +00:00