Jason Young
2c419de8b0
safety tests: better CAN address range scanning ( #827 )
...
* better CAN address range scanning
* minor cleanup
2022-01-26 11:46:25 -08:00
Adeeb Shihadeh
730155cbcd
GM: use new DBC ( #836 )
...
* bump openpilot commit
* Rename GM PT dbc to generated
Co-authored-by: Jason Shuler <jshuler@gmail.com >
2022-01-24 21:13:54 -08:00
Jason Young
1735bec7d5
Fix safety test coverage and permissions ( #828 )
2022-01-17 22:13:32 -08:00
Jason Young
a96615d253
Chrysler: remove standstill exception for gas disengage ( #826 )
...
* Chrysler: Normalize gas pedal handling
* revert CI test change
2022-01-13 16:04:40 -08:00
Adeeb Shihadeh
f5857bc8fd
Toyota: add AEB message TX checks ( #820 )
...
* Toyota: add AEB message TX checks
* misra
2022-01-05 16:50:22 -08:00
Jason Shuler
83cf88557c
GM Switch to AcceleratorPedal2 ( #813 )
2022-01-03 15:54:37 -08:00
Adeeb Shihadeh
224736b22a
no more wraparound
2022-01-02 14:49:40 -08:00
Igor Biletskyy
8d0d148681
Move shared definitions into separate file ( #808 )
...
* refactor definitions includes
* fix include
* revert dlc_to_len
* ...
* change name
2021-12-16 14:38:22 -08:00
Igor Biletskyy
305d4e6d2a
Red Panda: add separate CAN FD test to CI ( #807 )
...
* initial simple test
* linter
* ...
2021-12-11 14:36:00 -08:00
Igor Biletskyy
493866d15b
Cleanup Wi-Fi leftovers ( #804 )
...
* cleanup python lib
* remove wifi leftovers from firmware
* few spots in firmware
* forgot
* remove usb to wifi test
* linter
* more cleanup in flasher.h
* more found
* check in tests too
* linter
2021-12-06 14:39:28 -08:00
Adeeb Shihadeh
652367d2e8
Honda: add support for new Bosch LKAS_HUD msgs ( #793 )
2021-12-05 13:10:47 -08:00
Adeeb Shihadeh
eaa8f0e526
libpandasafety: add function to check all addr checks are valid
2021-12-01 14:45:10 -08:00
Igor Biletskyy
ca67da626f
Fix MISRA violations 10.1 and 10.4 ( #796 )
...
* misra 10.1
* misra 10.4
* misra 10.4 in usb_protocol.h
* don't cast
2021-12-01 14:13:38 -08:00
Adeeb Shihadeh
6bea710359
libpandasafety: add safety_tick
2021-12-01 13:21:46 -08:00
Adeeb Shihadeh
c9992a80c0
bosch_harness -> bosch
2021-11-21 14:51:47 -08:00
Adeeb Shihadeh
801fd4997d
Honda: cleanup remnants of Bosch giraffe safety ( #792 )
2021-11-21 14:49:44 -08:00
Adeeb Shihadeh
7e5f568358
libpandasafety: make HW_TYPE optional
2021-11-19 14:21:04 -08:00
Adeeb Shihadeh
5d2d4ce1e7
Honda: remove bosch giraffe support ( #791 )
2021-11-18 23:35:14 -08:00
Adeeb Shihadeh
e9365d44d3
libpandasafety: expose acc_main_on
2021-11-18 22:24:40 -08:00
Robbe Derks
ddb3698f9b
Tesla longitudinal safety ( #737 )
...
* tesla safety cleanup + long WIP
* more long safety
* longitudinal safety tests
* fix misra
* add safety for main bus DAS_control
* acc_state is not enabled
* fix tests
* we don't want this
* fix Tesla common test
2021-11-18 13:50:10 +01:00
Adeeb Shihadeh
fec966d6fd
Honda: handle ACC state consistent with ISO 15622:2018 ( #789 )
2021-11-17 17:27:24 -08:00
Jason Young
b73fc69509
VW MQB: Prep for longitudinal safety ( #788 )
2021-11-17 12:00:39 -08:00
Igor Biletskyy
ae26b75d7b
CAN_FIFOMailBox to CANPacket struct + USB dynamic packet size ( #739 )
...
* Squashed commits, no cleanup
* Few fixes
* No init = garbage
* Only receive with new canpacket
* Add send with canpacket
* Revert "Add send with canpacket"
This reverts commit 7d06686ddd6d447c714b5289d31af24403d36931.
* Packet must be aligned to word, or bad performance
* Cleaner
* Fix tests
* Tests...
* MISRA 10.4
* More MISRA
* libpandasafety_py
* cffi
* even more tests...
* typo
* ...
* ...
* ...
* Slight cleanup
* MISRA 6.1
* MISRA 17.7
* Bug in bxcan + even style
* MISRA 10.1
* Revert "MISRA 10.1"
This reverts commit 404ae7fcc39556f80f528de9015702e69f4ea0a5.
* ...
* MISRA 10.1 and 10.4 suppress until next PR
* MISRA 20.1
* ...
* test_honda
* ...
* ...
* test_toyota
* test_volkswagen_mqb
* test_volkswagen_pq
* Sketchy thing...
* Revert "Sketchy thing..."
This reverts commit 3b2e5715bdc1954f7b7b3b7469ba3d0eaa06bdf9.
* remove comment
* bxcan extended address bug
* Concept, experimental dynamic usb packet size
* increase each buffer to 10240 bytes
* raise python bulk read/write limits
* ...
* Move packet size to start
* Experimental send, stream-like
* New receive test, stream-like
* cleanup
* cleanup + rebase fixes
* MISRA
* Extra receive method, stream-like, commented out
* type change
* Revert back to buffer for send, stream commented
* forgot ZLP
* lower buffer, add rx failsafe
* ... remove ZLP
* return ZLP back
* Add tx checks to panda fw
* TX stream with counter
* fix counter overflow
* 13 free slots should be enough
* limit tx usb packet
* ...
* Revert max_bulk_msg doubling
* python lib improve speed
* Stream with counter for RX, dirty, needs cleanup
* Increase chunk length to 4096 bytes
* cleanup fdcan.h
* cleanup __init__.py
* MISRA 12.1
* MISRA 10.8
* remove non-streaming usb functions
* more main.c cleanup
* MISRA 15.6
* MISRA 15.5
* MISRA 18.4 and suppress objectIndex
* handling usb pakcets > 63bytes, naming and cleanup
* Cleanup old from tests and update CANPacket_t struct
* Switch to 4 bit DLC instead of 6 bit length
* ops)
* ...
* pylint
* receive python buffer increase
* USB increase receive packet len
* tweak buffers
* No need for so high limits
* MISRA 20.1 workaround
* performance tweaks
* cleanup, dlc to data_len_code naming
* main.c naming
* comments and cleanup for main.c usb
* clean py lib
* pylint
* do not discard good rx messages on stream fail
* cleanups
* naming
* remove bitstruct lib and lower tx limit
* bitstruct lefovers
* fix bug in VW test
* remove adjusting data size and assert on wrong len
* ...
* test new memcpy before merging
* Revert "test new memcpy before merging"
This reverts commit 399465a264835061adabdd785718c4b6fc18c267.
* macros for to/fromuint8_t array
* MISRA hates me!
* tests.c include macros instead
* move CANPacket to can_definitions.h
* vw_pq python test fix
* new memcpy test, REMOVE
* check without alignment
* revert macros for uint8 arrays
* Revert "revert macros for uint8 arrays"
This reverts commit 581a9db735a42d0d68200bd270d87a8fd34e43fe.
* check assert
* Revert "check assert"
This reverts commit 9e970d029a50597a1718b2bb0260196c050fd77f.
* one more variation
* Revert "one more variation"
This reverts commit f6c0528b7ac7e125750dc0d9445c7ce97f6954b5.
* what about read performance
* Revert "what about read performance"
This reverts commit d2610f90958a816fe7f1822157a84f85e97d9249.
* check struct alignment to word
* check for aligned memcpy again
* cleanup
* add CANPacket structure diagram
* update CANPacket and add USB packet struct
* bugfix + refactoring of EP1
* move dlc_to_len to header
* missed include
* typo...
* MISRA
* fk
* lower MAX_CAN_MSGS_PER_BULK_TRANSFER
* bump CAN_PACKET_VERSION to 2
* bump python lib CAN_PACKET_VERSION to 2
* rename parse_can_buffer to unpack_can_buffer
* CANPacket_t const fields
* Revert "CANPacket_t const fields"
This reverts commit cf91c035b7706a14e317550c5f0501ae3fce7c70.
* test.c relative path
* cleanup
* move macros to safety_declarations
* Refactor pack/unpack funcs and add unittest
* usb_protocol.h
* oops
* Update .github/workflows/test.yaml
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com >
* remove print from unittest
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com >
2021-11-12 16:36:34 -08:00
Adeeb Shihadeh
73bbf58567
Nissan Leaf: tests + new brake signal ( #777 )
...
* Update safety_nissan.h
Updated brake CAN address to 0x25e and brake pressed to byte logic
* Update safety_nissan.h
missed a change
* Update safety_nissan.h
* Update safety_nissan.h
* Update safety_nissan.h
Corrected Line 79 to pull from the "CRUISE THROTTLE" message at address 0x239, byte 4, bit 6, which gets us to the "USER_BRAKE_PRESSED" bit for comparison if the brake pedal is being pressed.
* Update safety_nissan.h
Removed duplicate 0x239 message in "AddrCheckStruct"
* Update safety_nissan.h
Just adding back 0x1cc to see if that fixes things?
* leaf safety tests
* clenaup
* bump openpilot
* Update tests/safety/test_nissan.py
Co-authored-by: Kirk Miller <kirk.miller92@gmail.com >
2021-11-12 11:59:49 -08:00
Igor Biletskyy
2f54aec67b
Improve tests ( #775 )
...
* test order
* remove 750 kbps speed tests
2021-11-11 21:32:51 -08:00
Igor Biletskyy
b4b14593a0
Check panda library and firmware for compatibility ( #770 )
...
* check panda lib and firmware compatibility
* skip comp check for pedal
* ...
* guard affected funcs and print to stderr
* ...
* ...
* ..
* decorators
* test workaround
* linter
* ...
* ...
* ...
* change request address
* split
* remove compatible variable
* ...
* remove compatibility_check
* get packets versions on connect
* fix linter
* use RuntimeError
Co-authored-by: Willem Melching <willem.melching@gmail.com >
2021-11-11 14:30:52 +01:00
Igor Biletskyy
4d57e48fd3
Add message integrity test ( #766 )
...
* msg integrity test
* check that test works, corrupt address
* Revert "check that test works, corrupt address"
2021-11-05 13:12:49 -07:00
Jason Young
e9a4a2b688
VW PQ: Refactor tests to use CAN packer ( #764 )
...
* Lenkhilfe_3, Motor_2
* more Motor_2
* HCA_1
* GRA_Neu
* propitiate linter
* actually propitiate linter
* bump Docker openpilot ref
2021-11-02 23:04:19 -07:00
Adeeb Shihadeh
84e47df99d
Mazda: add safety replay test route ( #761 )
...
* Mazda: add safety replay test route
* revert that
* comment
* bump openpilot
2021-10-31 22:05:14 -07:00
Adeeb Shihadeh
bf77a0b20c
Mazda: only allow cancel while controls not allowed ( #757 )
2021-10-30 12:38:26 -07:00
Adeeb Shihadeh
da4efd21c4
Mazda: allow sending HUD alerts ( #754 )
2021-10-29 23:39:38 -07:00
Adeeb Shihadeh
1fc38fc165
update pre-commit hooks ( #755 )
...
* update pre-commit hooks
* Update requirements.txt
* Update .pre-commit-config.yaml
* Update rigol.py
2021-10-29 16:41:12 -07:00
Adeeb Shihadeh
0d4e98f605
Mazda: only check ACC state for controls allowed ( #753 )
2021-10-29 12:12:53 -07:00
Adeeb Shihadeh
a01ef1f7c9
safety: check relay malfunction in common TX hook ( #752 )
...
* don't check relay malfunction in car safety tx hooks
* check in safety
* fix tests
2021-10-29 11:16:27 -07:00
Adeeb Shihadeh
def8558e3d
fix safety replay
2021-10-25 16:08:49 -07:00
Adeeb Shihadeh
ba749ddf25
libpandasfaety: don't build at import time
2021-10-25 16:05:20 -07:00
Igor Biletskyy
f1edfdd6f8
fix test_bulk_write ( #745 )
...
* fix bulk test
* 2sec is not enough for 20k messages per bus
* ...
2021-10-21 18:44:03 -07:00
Igor Biletskyy
7e5a4e928a
Fix bug in safety tests ( #740 )
...
* Fix bug in safety tests
* Temporary skip error
* glitch
* Robbe's suggestion
Co-authored-by: Robbe Derks <robbe.derks@gmail.com >
Co-authored-by: Robbe Derks <robbe.derks@gmail.com >
2021-10-19 11:23:01 -07:00
Igor Biletskyy
cf804d65d2
fix MISRA test bug and coverage ( #743 )
2021-10-18 22:04:14 -07:00
Greg Hogan
80260c6bcc
expose TX messages blocked by safety hook ( #742 )
...
* expose tx messages blocked by safety hook
* update unit tests
* preserve bus of original message
* update tests
2021-10-18 12:26:24 -07:00
Greg Hogan
c5adfa4ece
Fix bulk transfer dropping messages sometimes ( #729 )
...
* fix max messages per bulk transfer
* retry on partial send
* need 2x the packet size for some reason
* improve bulk write test
2021-10-15 18:14:55 -07:00
Robbe Derks
1808dca51f
message_drop_test: send only what hasn't been sent yet
2021-10-01 16:08:56 +02:00
Robbe Derks
c67fd935d7
fix pylint for real
2021-10-01 14:47:37 +02:00
Robbe Derks
0bdd5699f7
drop test: send in blocks
2021-10-01 14:39:39 +02:00
Robbe Derks
8e17c107b2
fix pylint
2021-10-01 13:57:44 +02:00
Robbe Derks
1d0e876e37
message drop test
2021-10-01 13:51:11 +02:00
Robbe Derks
4bfa9c16f6
add jungle support to bulk test
2021-10-01 12:39:05 +02:00
martinl
5ab46ab70a
Subaru Global: use better brake pressed signal ( #651 )
...
* Change Subaru Global brake_pressed signal to Brake_Status Brake
* Change safety test to use Brake_Status Brake
* Use GET_BYTE for brake_pressed
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com >
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com >
2021-09-28 21:26:04 -07:00
Alfonso Hernandez
9062d93f50
VW PQ: use Bremse_3 for ego speed ( #730 )
...
* Change VW PQ speed RX from Bremse_3 to Bremse_1
* Removed MSG_BREMSE_3 definitions since message is not used anymore
2021-09-27 09:39:59 -07:00
Willem Melching
dd22fafc3c
Hyundai longitudinal ( #711 )
...
* Hyundai longitudinal
* return right addr checks
* add flag to pythong
* fix define
* check for stock ecu
* add rx check for buttons
* Block FCA11 actuation
* misra
* review 1
* comment about scaling
* clean up buttons
* use define for flag
* more extensive button checking
* check for AEB in scc12
* unsigned
* add knockout tests
* more unsigned
* cleaner
2021-09-13 20:41:10 -07:00