Commit Graph

74 Commits

Author SHA1 Message Date
Adeeb Shihadeh
c8b84e1593 rm old boardd test file
old-commit-hash: efa9d73827
2023-09-23 16:50:29 -07:00
Adeeb Shihadeh
26c7c08982 pandad: recover from bad bootstub (#29638)
* pandad: recover from bad bootstub

* more

* adjust that

* ugh guess multipanda is still a thing

* reset

---------

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 683b3b5966
2023-08-25 17:03:00 -07:00
Dean Lee
db211ce617 cpplint: add filter whitespace/parens (#29565)
old-commit-hash: 5480d32bb5
2023-08-23 14:25:05 -07:00
Adeeb Shihadeh
16ec56398c add openpilot prefix to imports (#29498)
* add openpilot prefix to imports

* more

* more

* fix docs

* fix linter

* bump submodules

* fix patched tests

* update dynamic imports

* debug

* Revert "debug"

This reverts commit db5e13b9911cc74438bee123bc3430da6c31b24b.

* fix pm test
old-commit-hash: a9626f95b6
2023-08-20 20:49:55 -07:00
Dean Lee
c622a4cac5 common/util: move function random_int to util (#29388)
old-commit-hash: 22bc06fdaa
2023-08-14 09:37:16 -07:00
Adeeb Shihadeh
f50fedb647 Fixes for PYTHONWARNINGS=error (#29381)
old-commit-hash: db287496d8
2023-08-13 17:22:56 -07:00
Adeeb Shihadeh
a5f5b72c99 jenkins: run tests with pytest (#29143)
* jenkins: run tests with pytest

* typo

* fix
old-commit-hash: 6b83724c50
2023-07-25 17:06:43 -07:00
Adeeb Shihadeh
ceaf28b378 bump panda (#29066)
* bump panda

* update bootstub
old-commit-hash: 2ff33663a7
2023-07-20 15:29:29 -07:00
Robbe Derks
f305305754 Panda logs (#28511)
* log in pandaStates

* Revert "log in pandaStates"

This reverts commit 87ee283ac45c2eeed94d9a958927e3072ec4460f.

* log to param

* dumps datetime

* cloudlog instead

* add truncation

* fix

* try isotimestamp

* duh

* more fixes

* should be __class__

* add some time to account for log gathering

* use new fast interface

* Revert "add some time to account for log gathering"

This reverts commit 2c08ad48052dfc0546530059a0cda03b04c4939a.

* cleanup

* simple test

* fix wrong serial

---------

Co-authored-by: Comma Device <device@comma.ai>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 70bbb94dc5
2023-07-19 14:24:57 -07:00
Adeeb Shihadeh
93c586e39a pandad: check comms protocol version (#28983)
* proto version check

* bump panda

* update bootstub

* test

* bump panda

* fix that

* bump panda

* fix test case

* more fix

---------

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 2720fdf2a1
2023-07-16 21:33:24 -07:00
Adeeb Shihadeh
2bb54ba49a pandad: enable tres release -> bootstub test (#28930)
enable tres

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: a46ed955e6
2023-07-15 22:22:56 -07:00
Adeeb Shihadeh
c9125c6a25 pandad: test release -> devel bootstub reflash (#28330)
* test

* release bootstubs

* rm that

* fixup

* skip earlier

---------

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 28980cf4c6
2023-06-07 20:25:15 -07:00
Adeeb Shihadeh
6dc5e28ef9 boardd: handle nack on tx buffer full (#28241)
* boardd: handle nack on tx buffer full

* print pandaStates

* rx buffer too small

* connect timeout

---------

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: e4a37620ee
2023-05-19 23:24:52 -07:00
Adeeb Shihadeh
9ed5feca61 boardd: longer loopback test (#28239)
Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 2014b10ec3
2023-05-19 17:36:30 -07:00
Adeeb Shihadeh
4b78de735c fix loopback test safety setting (#28184)
* fix loopback safety setting

* pandad: catch and log all exceptions

---------

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 437fcc6582
2023-05-13 21:05:00 -07:00
Shane Smiskol
33a15d6e94 update boardd blocking comment
old-commit-hash: d738f66711
2023-05-09 17:27:09 -07:00
Adeeb Shihadeh
d99cb35ebd pandad: improve startup time (#28137)
* pandad: improve startup time

* add test

* reset with gpio

* adjust threshold

* fix

* no panda

* fix

* check unknown

* increase for boardd

---------

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 4fe1b638f8
2023-05-09 15:44:53 -07:00
Adeeb Shihadeh
29eb4d3a35 pandad: wait for internal panda to come up (#27705)
* pandad: wait for internal panda to come up

* test

* more checks
old-commit-hash: f832a71038
2023-04-14 14:18:13 -07:00
Adeeb Shihadeh
ed72cae737 tizi tests in jenkins (#27810)
* add

* mv there for now

* mv

* single panda

* move into parallel

* longer timeout for dfu

---------

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: ff89184823
2023-04-05 11:07:42 -07:00
Shane Smiskol
cdcf06e9e2 boardd: ability to switch between ELM safety params (#27656)
* indecisive

* rename to generic FW query

* remove code and update comment

* we need this to start off, unless we set multiplexing immediately

* draft

* draft 2

* try that

* can't do this either, boardd might read Enabled after removing, but before setting new Request param

* this should work

* use one less param

* fix params

* match behavior (set all pandas to safety param of 1, disabling multiplexing for fingerprinting

* clean up (some tests may temp break)

* fix param name and sort

* time it

* yes it does matter

* add to hyundai's bus 5 query

* remove hyundai for now

* this should work

* clean up

* clean up

* flip argument around, clean up

* fix test_startup

* some clean up

* rm line

* comment makes more sense

* required typing

* clean up common type

* comments

* Update selfdrive/car/car_helpers.py

* line

* whoops, need to set before vin!

* fix debug

* annoying

* more debugging

* bug fix (needs both keys always)

* debuGG

debuGG

* Revert "debuGG"

This reverts commit 55b2f429324c0b92d5cfb2cabf8b20db1e166248.

* Revert "more debugging"

This reverts commit 02934c3403ad5270f03093508b704c151d1ccb2a.

* Revert "annoying"

This reverts commit 8b4e5e09989f9a0217e3ec1c0ba68735929b7366.

* clean that up

* bumpback

* bumpback

* every second write param

* flip

* stuff

* move up?

* fix timing out in CI

* rm
old-commit-hash: 42449b482d
2023-03-23 00:14:31 -07:00
Adeeb Shihadeh
5d2d0c4b26 pandad unit tests (#27516)
* pandad unit tests

* only one

* in bootstub

* run in jenkins

* phone only
old-commit-hash: f7c15c1708
2023-03-07 11:05:20 -08:00
Adeeb Shihadeh
52c56ba162 boardd: update loopback test with new param
old-commit-hash: e07865fe4d
2023-02-01 20:11:40 -08:00
Robbe Derks
f2cab9a00c No more magic for the can chunks (#26861)
* remove magic and add checksum

* add comms reset

* bump submodule
old-commit-hash: 3136985b95
2023-01-13 15:01:55 -08:00
Robbe Derks
d00e7ee24b Simple CAN chunks (#25373)
* simple chunks

* more sizeofs

* fix unit tests

* bump panda

* bump panda

* don't fail for too little data

* bump panda

* bump panda

* bump panda

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: fee6f2efac
2022-12-01 09:12:16 -08:00
Adeeb Shihadeh
a6f2f2d751 boardd: cleanup defs from panda (#26628)
* more stuff

* bump pnada
old-commit-hash: c3e3047080
2022-11-29 16:05:46 -08:00
Adeeb Shihadeh
0f532dfbad remove old boardd stuff
old-commit-hash: ddb7f91c9b
2022-08-19 23:09:21 -07:00
Adeeb Shihadeh
3c48bc47b7 Move a bunch of stuff to system/ part 3 (#24829)
* move swaglog.py

* timezoned

* logmessaged

* version.py

* fix linter
old-commit-hash: 0fce5d9045
2022-06-11 23:19:27 -07:00
Adeeb Shihadeh
9a45a3b99b Move selfdrive/hardware/ to system/ (#24725)
* move hardware to system/

* fix mypy
old-commit-hash: 1139fe507b
2022-06-11 16:38:24 -07:00
Adeeb Shihadeh
f4675fc260 Merge common/ and selfdrive/common (#24556)
* Merge common/ and selfdrive/common

* fix that

* fix version

* fix unit tests
old-commit-hash: cb8885cffb
2022-05-18 14:11:57 -07:00
Adeeb Shihadeh
bd71c594a2 pylint: enforce indentation (W0311) (#24039)
* pylint: enforce indentation (W0311)

* few more
old-commit-hash: 8af20af66d
2022-03-24 23:23:29 -07:00
Ewout ter Hoeven
f206ebd054 Pyupgrade 3.6: Update syntax with Python 3.6+ features (#23305)
Updated Python code with Python 3.6+ features:
- utf-8 encoding is now the default (PEP 3120)
- Replace list comprehensions by Generator Expressions (PEP 289)
- Replace yield loop by yield from (PEP 380)
- Remove the (object) subclass when defining a class
- Replace the IOError alias by OSError (PEP 3151)
- Define sets with curly braces {} instead of set()
- Remove "r" parameter from open function, which is default

Co-Authored-By: Adeeb Shihadeh <8762862+adeebshihadeh@users.noreply.github.com>
Co-Authored-By: GregorKikelj <96022003+GregorKikelj@users.noreply.github.com>

Co-authored-by: Adeeb Shihadeh <8762862+adeebshihadeh@users.noreply.github.com>
Co-authored-by: GregorKikelj <96022003+GregorKikelj@users.noreply.github.com>
old-commit-hash: 332f568a82
2021-12-24 11:18:39 -08:00
Igor Biletskyy
f532819faf Revert "boardd: new class USBDevice (#23015)"
This reverts commit 6965aa0b903060ab38aace31c15fefdc7a0429eb.

old-commit-hash: 285addeef2
2021-12-16 17:11:45 -08:00
Dean Lee
49c35a70b5 boardd: new class USBDevice (#23015)
* USBDevice

* merge master

* rebase master

* add to fiels_common

* inline functions

* namespace

* init err

* remove nested if

* cleanup

* bump panda for branch

* change includes

* bump panda branch

* change name

* bump master panda

Co-authored-by: Igor Biletskyy <briskspirit@users.noreply.github.com>
Co-authored-by: Igor Biletskyy <bs@privacy.im>
old-commit-hash: 4061f50da3
2021-12-16 16:53:48 -08:00
Dean Lee
15bac98ad4 panda: refactor can_recv (#22977)
* refactor

* use macro

* rebase master

* fix incorrect chunk_len

* cleanup

* type fix

* lines

* while

Co-authored-by: Igor Biletksyy <bs@privacy.im>
old-commit-hash: 599c07e027
2021-12-02 16:28:38 -08:00
Igor Biletskyy
ce565323fd boardd: split usbprotocol unittest and fix paren order in data length assert (#23065)
old-commit-hash: 65ca9be82a
2021-11-29 15:34:33 -08:00
Dean Lee
a919e5721e panda: add unit tests for usb protocol (pack/unpack) (#22955)
* prepare for unit tests

* add to selfdrive_tests.yaml

* test header

* test chunk count

* rename test function

* continue

* don't check chunks count

* test recv_can

* continue

* small cleanup

* merge master

* cleanup

* rename functions

* test different packet size

* fix operator precedence problem

* refactor unpack_can_buffer

* cleanup test

* cleanup unpack_can_buffer

* add test for multiple pandas

* rename to test_panda

* restore test_boardd

* rename to test_boardd_usbprotocol

* fix typo

* bus_offset = [0,4]

* change src

* use USBPACKET_MAX_SIZE
old-commit-hash: c77354009c
2021-11-23 20:15:22 -08:00
Adeeb Shihadeh
44568de155 faster jenkins (#22973)
Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: e13630dfee
2021-11-18 23:43:09 -08:00
Dean Lee
433add3a02 boardd/can_recv_thread: improve caching for can_frame (#22944)
* better cache

* use emplace to remove copy&realloc

* rebase master
old-commit-hash: 841fb93def
2021-11-17 17:54:14 -08:00
Adeeb Shihadeh
e14ef7f9fd add multipanda to loopback tests (#22900)
old-commit-hash: e8598f7455
2021-11-13 17:39:51 -08:00
Adeeb Shihadeh
e05237f5a2 test_boardd: don't modify environment at import time
old-commit-hash: 93d87cdc6f
2021-10-25 09:47:07 -07:00
Adeeb Shihadeh
c9ebc1c442 move nose tests to unittest (#22665)
* move to unittest

* boardd loopback

* no more nose

* phone only

* fix panda decorator
old-commit-hash: b5960b9dc8
2021-10-25 09:44:04 -07:00
Robbe Derks
58c99158a1 Make pandaState and safetyMode a list (#22454)
* wip: move to pandaStates

* bump cereal

* wip: SafetyMode struct

* move to safetyMode

* fix typo

* this can be None

* fix potential empty pandaStates list

* fix thermald

* fix controlsd

* rename safetyModes to safetyConfigs

* update process_replay

* fix test_models

* bump cereal
old-commit-hash: 91987f38d4
2021-10-08 17:54:34 +02:00
Willem Melching
8aa225b3f9 move acados deps out of devpackages (#22376)
* move acados deps out of devpackages

* fix new pylint errors
old-commit-hash: a60f3c6a35
2021-09-29 23:20:33 +02:00
Adeeb Shihadeh
ec7913cbe5 delay controls start (#20761)
* delay controls start

* shouldn't need this stuff anymore

* only delay board

* bail after 2s

* fix loopback test

* fix process replay

* update refs

* bump cereal

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: f9a961f6fb
2021-04-30 13:55:17 -07:00
Adeeb Shihadeh
05eb44115e cereal cleanup part 2 (#20092)
* car stuff

* thermal

* Revert "car stuff"

This reverts commit 77fd1c65ebd01abfa8493ae12c9e6b14f7ada976.

* panda state

* camera stuff

* start deg

* most is building

* builds

* planner + controls run

* fix up paramsd

* cleanup

* process replay passes

* fix webcam build

* camerad

* no more frame

* thermald

* ui

* paramsd

* camera replay

* fix long tests

* fix camerad tests

* maxSteeringAngle

* bump cereal

* more frame

* cereal master
old-commit-hash: 312b681a46
2021-02-16 21:39:32 -08:00
Robbe Derks
5b221a0a32 Add back replay_many script for unlogging over jungles
old-commit-hash: 935b9ceb05
2021-02-01 15:54:19 +01:00
Adeeb Shihadeh
2e946df700 actually wait for boardd to start
old-commit-hash: 6e70baa306
2021-01-26 15:09:09 -08:00
Adeeb Shihadeh
dc32aa52a8 wait for pandad to start boardd
old-commit-hash: 144227d3d3
2021-01-26 13:39:15 -08:00
Adeeb Shihadeh
256d586d6c fix boardd loopback test after #19880
old-commit-hash: 59f4ea9fe5
2021-01-26 12:12:10 -08:00
Adeeb Shihadeh
0e78d18950 better can replay script
old-commit-hash: e6478c6b35
2021-01-14 17:49:17 -08:00