Commit Graph

94 Commits

Author SHA1 Message Date
Willem Melching
16fe1bb2ad Hardware abstraction class (#2080)
* hardware abstraction class

* De Morgan

* Rename pc hardware class

* Fix sound card in controlsd

* Pc get sim info

* fix hardware in test

* two more

* No more random imei on android

* no randomness on android

* Need to return something that looks like imei for registration to work

* Return proper network strength

* Unused import

* Bug fixes + gpsd is only android
old-commit-hash: c7152d54192605c833912b69cf85514ac2e1b1fc
2020-08-26 14:57:17 +02:00
robbederks
c09e7f04e7 Tici sensord (#2072)
* tici sensord: WIP

* add sensor constants

* rename files

* base class

* init sensors

* publish something

* dont leak memory

* try reading from accel

* Accel works

* add time and sensor source

* Update release files

* If we want low BW we want 125hz

* this should run gyro as well

* add filter on gyro

* also filter accel data

* Add i2c files

* cast makes macos unhappy

* Same outputs as android sensord

Co-authored-by: Tici <robbe@comma.ai>
Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: 622e42d504458ebfbb23e945beb1a60bbfd0e63b
2020-08-26 11:30:30 +02:00
Willem Melching
22e0a2474a Pandad: turn on panda power (#2073)
* pandad turn on panda power

* Add gpio.py

* needs bytes

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 6bb2630eba1bff2db745e56d639fce8b85ec6d0d
2020-08-24 16:56:29 +02:00
Willem Melching
473fb11d34 Qt ui for PC (#2023)
* qt ui boilerplate

* this kinda works

* cleanup

* render inside other widget

* cleanup

* more cleanup

* Not needed

* Handle click

* Draw at 20Hz

* create paint.hpp

* move stuff around

* update sidebar

* Draw vision

* this works again

* add clickable settings button

* Only collapse sidebar when started

* always use qt on linux

* fix width

* scrollable area

* talk to NetworkManager

* code to add a connection

* params toggles

* small cleanup

* add qt5 to dockerfile

* Qt on mac

* Add qt to release files

* fix macos build

* nore more ifdefs needed

* add icons

* make a bit nicer

* Hide scrollbar

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: e115c514521c7705112bd0cb2e4bf865b536501a
2020-08-20 17:16:44 +02:00
Willem Melching
938ce91d02 Pigeon abstraction layer (#1977)
* pigeon abstraction layer

* Fix string literals

* more generic pigeon class

* add TTYpigon

* nicer tty error handling

* close tty fd on pigeon delete

* pigeon receive return std::string

* use sizeof

* max receive size to prevent infinite loop

* remove namespace

* add unistd include for usleep

* fix is pigeon

* Handle tty error in opening

* fix printing binary strings with dump.py

* fix pigeon build on macos

* Handle errors seperately

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 502cc665e0bad89eba0b1c344c2f4f580b153ae1
2020-08-13 10:10:50 +02:00
Adeeb Shihadeh
e25063a0b3 add launch_env.sh to release files
old-commit-hash: 9bc0b350fd273bbb2deb3dcaef0312944e4f6cfd
2020-08-12 17:34:15 -07:00
martinl
6a000279ad Add preglobal Subaru Forester and Outback (#1993)
* Add preglobal Forester and Outback

* Tests and values cleanup

* Update units in carstate

* Remove ()

* Add OUTBACK_PREGLOBAL_2018 to non_tested_cars

* Add replay route for OUTBACK_PREGLOBAL_2018
old-commit-hash: c9adc4900b2e26d0582cb264da2e547a513de831
2020-08-10 12:31:40 -07:00
martinl
0aeae7d81e Subaru pre-global: add support for Subaru Legacy 2015-18 (#1805)
* Add support for Subaru Legacy 2015-18

* syntax fix

* Add Legacy 2018 FPv1

* Add Subaru Ascent from upstream

* Use GLOBAL_CAR and LEGACY_CAR lists

* Change LEGACY_2015 to LEGACY_PREGLOBAL

* Add LEGACY_CAR to carstate

* Change LEGACY_2015 to LEGACY_PREGLOBAL in test_car_models

* Add missing SafetyModel to Ascent

* Use GLOBAL_CAR and LEGACY_CAR to set safetyModel

* Change LEGACY_CAR to PREGLOBAL_CARS, remove GLOBAL_CAR

* Fix PREGLOBAL_CARS in carstate and subarucan

* Minor cleanups

* Add accelCruise button event

* Change Preglobal Driver Torque limit to match Global

* Match comments to upstream

* Use Steer_Warning and Steer_Error_1 only for Global

* Change mph units to match upstream values

* Increase Preglobal brakePressed  threshold to 2

* Add DashcamOnly to LEGACY_PREGLOBAL

* Fix typo in variable name

* Update README, add create_preglobal_steering_control

* cleanup carcontroller

* cleanup values

* missed that one

* Update STEER_STEP

* Update STEER_MAX

* Add preglobal signal frequency checks

* remove PREGLOBAL_CARS from subarucan

* Remove whitespace

* Use common frequency checks

* cleanup carstate

* cleanup subarucan

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: e37b8e5d5632a7cc48326f7ca162ef87f259e526
2020-08-06 21:55:13 -07:00
Adeeb Shihadeh
069bd4061e Driver view refactor (#1869)
* quick driver view cleanup

* send at correct freq

* let manager handle that

* don't block starting on driver view

* fix UI hacks

* ui cleanup

* move driver view functionality into dmonitoringd

* dmonitoring thresholds shouldnt be in UI

* remove driver view file from release files

* timeout on frontview

* bump cereal
old-commit-hash: a7ee2a53a8a832f3678171403471380a9a72b9cb
2020-08-01 17:26:35 -07:00
Willem Melching
562394e2ae Panda abstraction layer in boardd (#1919)
* start on panda abstraction layer

* handle bulk transfer in library

* Safety model abstraction

* Abstract hw type into library

* Handle disconnect

* RTC stuff

* Fan control

* Health

* Panda fw version

* Read serial

* Power saving

* Power mode

* Cleanup pigeon thread init

* Rename safety setter variable name

* Remove comment

* Unused global cleanup

* malloc -> new

* whitespace

* Use std::thread

* Use std::thread for safety setter

* Cleanup igntion_last global

* Heartbeat

* logd

* More global cleanup

* Put back sleep

* ir pwr

* Always broadcast health

* init struct with zeroes

* Fix eon build

* fix race condition

* fix Adeebs comments

* abstract can send and receive
old-commit-hash: 80acb328252d8ed80c18a98457c6d788073ed26e
2020-07-31 23:14:31 +02:00
Adeeb Shihadeh
011c336047 Improve on-device CI reliability (#1922)
old-commit-hash: 90fc1c602814b87c1a09fca02e3846a332bc5e03
2020-07-25 02:12:19 -07:00
Willem Melching
488bbcaaa4 remove old params learner (#1918)
old-commit-hash: e0e7c7486d653a550c596f9dca7e5b6424d4c05d
2020-07-24 18:43:17 +02:00
martinl
54e4939168 Subaru Global generated dbc and new signals (#1908)
* Change carstate signals to use feature-subaru-long dbc

* Add Conventional_Cruise signal to carstate

* Fix Conventional_Cruise signal source

* Use Cruise_Cancel signal in subarucan

* switch to subaru-global-2020 opendbc branch

* Update release file

* bump opendbc

* switch panda to subaru-global-carstate branch

* bump panda

* bump opendbc

* revert submodules for upstream PR

* switch panda and opendbc to upstream

* bump opendbc
old-commit-hash: a086f52881f4a1f0d20486e7fa089a843d5d8b34
2020-07-23 12:28:23 -07:00
Greg Hogan
f646a64cce Honda CRV BSM alert from B-CAN (#1867)
old-commit-hash: 825821f010db63c3498d3730069f3eac08ace789
2020-07-21 17:41:45 +02:00
Adeeb Shihadeh
c4f1ae4ced fix release date
old-commit-hash: eebb941b5a30055b0a909782bde412153a3e8cb0
2020-07-16 14:44:58 -07:00
Adeeb Shihadeh
246815820f bump opendbc
old-commit-hash: 9170ffcad442c70ccf8804ed88630d9b1a0260dd
2020-07-08 14:10:05 -07:00
Adeeb Shihadeh
617c6fa84c use special 'eon-build' device for release build
old-commit-hash: 65d800c4f5844b8167a0ae5421ece265dcc20863
2020-07-07 16:41:04 -07:00
Adeeb Shihadeh
44afc4ae3c Build release2 and dashcam in CI (#1834)
* start building release2 in CI

* build script

* bring over changes from test branch

* fix build release test

* remove references to test branches

* ucnomment push

* fix duplicate remove

* two commits for dashcam

* need the key
old-commit-hash: c7156616568ce2fa780db3eafc5f912ab2ead14e
2020-07-07 14:17:09 -07:00
Adeeb Shihadeh
b4978bafc9 Revert "build script", should've been on branch
This reverts commit 66c6a7a32a4301a4599b119098f45da04dddee46.

old-commit-hash: 6b942c94deed1467458b510215e51e263b6ba1ad
2020-07-06 20:16:16 -07:00
Adeeb Shihadeh
466ed6ac10 build script
old-commit-hash: 975ab4078636d3769a3e500c8151416a99465379
2020-07-06 20:15:38 -07:00
Adeeb Shihadeh
020258a485 remove Jenkinsfile from release files
old-commit-hash: 88f6fad3923a5f9adae1b30386a30671f5b276f2
2020-07-05 18:04:25 -07:00
Adeeb Shihadeh
0d79150606 Sound test (#1820)
* WIP sound test

* it does something

* refactor

* phone only

* update release files

* test sound card init

* add to CI

* check writes

* increase time

* unused

* only build cereal

* small tolerance

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: f1afb3e3ae4b95a1de0262d1408c49093c5ada6f
2020-07-05 17:56:24 -07:00
Adeeb Shihadeh
4f4c83a0c3 remove manager_helpers.py after CPU usage test refactor
old-commit-hash: b23d7950e3d38d4b436801e35c76b66657b35c95
2020-07-04 00:10:58 -07:00
Adeeb Shihadeh
80024996e2 increase jenkins timeout
old-commit-hash: 3f57b7ee7688efd38b2ba3581495b2c250409020
2020-07-03 20:34:31 -07:00
Adeeb Shihadeh
0a37fc0565 phone CI: pull over https, push over ssh
old-commit-hash: ba20e91d1194014a25122793c49456a010413779
2020-07-03 19:40:39 -07:00
Adeeb Shihadeh
de457fddc2 On-device CI framework (#1784)
* let's see if this works

* fix build_release actions job

* does jenkins like this config

* separate jenkinsfile for release build

* fix devel build

* devel build should work

* always pass that for now

* run modeld replay

* release2 build will be a separate PR

* pass env to phone shell

* force checkout

* run on real jenkins eons

* add timeout

* rsync

* more timeout

* trailing slash

* fix branch detection

* debug

* not sure why paramiko doesn't pass it through

* newline

* CI_PUSH

* still not passing it

* test branch

* should be good now
old-commit-hash: 32f03ec8a52c7c5fa56d5cce19fbbd7ecf24b7dd
2020-07-03 19:12:05 -07:00
Adeeb Shihadeh
f74865bedf Refactor CPU usage test (#1802)
* pull CPU usage test out of manager

* remove that

* add to release files

* cleanup

* executable

* this should work

* check if car started procs are running

* debug

* add min cpu usage

* remove debug prints

* adjust min cpu threshold

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 6db7fa8c033841c82d1139119aad8a20645449f4
2020-07-03 15:40:13 -07:00
Adeeb Shihadeh
414a3400bd remove duplicate key
old-commit-hash: 3c48b5a3ed2e7c1f315caf4d6b868155e41c9bea
2020-06-29 15:05:47 -07:00
Adeeb Shihadeh
673d208346 actually remove all old files
old-commit-hash: 38b5f25da25c9b525233cf6c1d0ff36e3650dc04
2020-06-25 15:39:35 -07:00
Adeeb Shihadeh
4ae4575c39 add upate_kernel.json to release files
old-commit-hash: 6cb2d83253c818cb0618bf8ed0e51a500a2af5a2
2020-06-22 11:32:48 -07:00
Adeeb Shihadeh
309bb796cd release2 cleanup (#1703)
* cleanup intermediate files

* test car interfaces
old-commit-hash: a1d4dd3adc22cfaf6a6d4e8a9f9f6c984dcb55f1
2020-06-19 13:46:24 -07:00
Adeeb Shihadeh
16b4216a40 fix 'openpilot' symlink being created in release branches
old-commit-hash: 9b6864b31a19b943baa8fa7ad25ac83463f77392
2020-06-18 14:23:11 -07:00
Adeeb Shihadeh
58c4798332 Remove logentries from pyextra (#1721)
* remove logentries from pyextra

* update release files

* gitignore
old-commit-hash: bbb6fa1172b11cb890e60c7c7c5db19d5fb220c5
2020-06-18 11:48:28 -07:00
Dean Lee
dffb9800ad Sound refactor (#1589)
* Soud refactor

* remove files from  files_common

* add timeout to set_volumn

* add param volume to init

* done

* test.cc

* fix typo

* add repeat param instead of loop

* revert submodule

* add member function currentSound

* remove function create_player from class member

* fix build error

fix repeat

* rename CHECK_RESULT to ReturnOnError

* set currentSound_ before posible err

* use std::map to initialize sound table

cleanup

cleanup

cleanup

fix bug in stop

change paramater name

* done

* remove function CreatePlayer, create player in init()

* resolve conflict

* remove sound test

* rebase

* remove whitespace

* Apply great review suggestion

* use player's SLVolumeItf interface to set volume

* use float

* leave the volume control the way it is
old-commit-hash: 8cacc14b3180e831ed4fa0782102f973efe8851f
2020-06-15 15:26:38 -07:00
Willem Melching
76a465e0ec Write orientation & transform in C++ (#1637)
* locationd at 20hz

* update ref

* bump cereal

* dont modify global state

* add scons files

* ecef2geodetic and geodetic2ecef

* Finish local coords class

* Add header file

* Add orientation.cc

* cleanup

* Add functions to header file

* Add cython wrapper

* y u no work?

* This passes the tests

* test rot2quat and quat2rot

* Teste euler2rot and rot2euler

* rot_matrix

* test ecef_euler_from_ned and ned_euler_from_ecef

* add benchmark

* Add test

* Consistent newlines

* no more radians supported in geodetic

* test localcoord single

* test localcoord single

* all tests pass

* Unused import

* Add alternate namings

* Add source for formulas

* no explicit tests needed

* remove benchmark

* Add release files

* Typo

* Remove print statement

* no access to raw transform matrix

* temporarily add tolerance

* handcode quat2euler

* update ref
old-commit-hash: c18e7da3c25c59a19efda8ec3a1b716c2571cc2f
2020-06-09 16:44:26 -07:00
Adeeb
ea0292d86e Move driver monitoring out of controls (#1642)
* move dmonitoring out of controls

* run monitoring unit tests in CI
old-commit-hash: d4858e5ff5753f8a800f3e90cb4c0f69213b87f3
2020-06-09 13:25:15 -07:00
Adeeb
daea932130 Release cleanup (#1649)
* start cleanup

* whitelist submodule release files

* don't need to ship tests

* revert changes to build script

* add those tests back

* fix typo

* whitelist dbcs

* test

* run the right test

* whitelist opendbc/can

* revert that

* add missing dotfiles

* clean up

* ford DBCs

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: c24a7e248a295641f58d39e0db25dde1b742fc16
2020-06-08 14:24:14 -07:00
Adeeb
16c0bc99b2 Remove common/messaging.h (#1635)
* remove common/messaging.h

* release files
old-commit-hash: 7666d99694615f0a4a960e0b739018c4628ffa50
2020-06-05 12:46:49 -07:00
Willem Melching
ce6dd8d4e9 Model + camerad test (#1622)
* kind of works

* move that

* hack to get camerad to reliably terminate

* not sure why SIGTERM wasn't working before

* compare bytes

* clean up some hacks

* gitignore

* fix that

* WIP

* no reboot

* comparison works

* pretty print

* fix build

* run in jenkins

* python path

* space

* raise timeout

* new eon

* skip the copy

* spinner

* spin less

* update model ref commit

* reenable that

* clean up

* fix jenkinsfile

* parallel

* wrap it in a stage

* fix linter

* better progress

* lower timeout

Co-authored-by: Comma Device <device@comma.ai>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 63c8e8439b6d19020055f922340d8e33d906363a
2020-06-04 18:57:25 -07:00
Adeeb Shihadeh
a03da046c3 clean up release files
old-commit-hash: 676d0901e5496f3c81d32e2716149544731f688e
2020-06-02 15:41:41 -07:00
Willem Melching
3ac6adc393 Turn Jenkins CPU test back on (#1617)
* run cpu test again

* Update cpu values

* Locationd can be more too

* Give some updater allowance

* Just remove updated
old-commit-hash: b042ac034e539df09a7040dd4f28b2afc2429f55
2020-06-01 18:57:04 -07:00
Adeeb Shihadeh
68a3061c9d enable E261 in flake8: two spaces before inline comment
old-commit-hash: 27754a277c36b82ef4040e536cc918ba8ad77bec
2020-05-31 14:07:29 -07:00
Willem Melching
43cec9fe9e Temporarily disable openpilot run in jenkins test until testing stuff is back up
old-commit-hash: 775acd11ba2e0a8c2f5a5655338718d796491b36
2020-05-31 13:20:56 -07:00
Adeeb
55dedc0476 pyextra isn't a submodule anymore (#1601)
old-commit-hash: cc2137bdedb8c65d6d9d32a1234250225dc2d3dc
2020-05-30 10:04:56 -07:00
Jafar Al-Gharaibeh
a476d51333 Bounty: Mazda (#988)
* Mazda Port

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>

* Update checksum to account for steer angle signal used in some cars

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>

* Add test drive/segment ID to pass CI tests

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>

* Process gear and brake signals, add new fingerprints

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>

* Refactor some car interface code

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>

* Drop redundant call, use Ecu, move warning to carstate, fix cruise speed

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>

* Drop unused variables, cleanup handsoff tracking

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>

* Update to steerError and steeringRate

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>

* Refactor parse gear, update lkas signals from the new dbc

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>

* Better tracking of engage and warning events

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>

* remove commented lines, update speed_kph to match panda

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>

* Steer Error

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>

* Set lkas enable speed to 52 kph

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>

* Drop block signal use, fix LGTM alerts

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>

* When gas is pressed OP will disengage, sync local state with it

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>

* Use car's speed signal instead of wheel speed

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>

* Tidy up disengage events

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>

* Rebase/Refactor with upstream

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>

* Sync stock ACC state with OP

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>

* mazda dbc file renamed

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>

* Improve acc stock and go by removing the 3 seconds limit

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>

* Dashcam

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>

* PR Feedback

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>

* Send ACC cancel only if we are sure cruise is enabled

Otherwise we run the risk of disabling main cruise

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>

* updated route

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>

* no process replay for now

* add to release files

* Revert "updated route"

This reverts commit 233db4f1bc2d8eefaa86488be4f6f88360d20793.

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 34b9b5e849fcd192bbd8c3060ce725ef61d725ab
2020-05-28 22:15:19 -07:00
Willem Melching
2ac27def5a Running pre-commit in CI (#1590)
* Running pre-commit in CI

* fix dockerfile syntax

* dont run on submodule repo folders

* Fix some import errors in ci

* more stuff

* That should be the last one
old-commit-hash: ba2ac1207a554d277e01af5b9514de4500d4f66a
2020-05-28 15:40:48 -07:00
George Hotz
206b6abe7d thneed saves 45% of a core (#1512)
* thneed runs the model

* thneed is doing the hooking

* set kernel args

* thneeding the bufferS

* print the images well

* thneeds with better buffers

* includes

* disasm adreno

* parse packets

* disasm works

* disasm better

* more thneeding

* much thneeding

* much more thneeding

* thneed works i think

* thneed is patient

* thneed works

* 7.7%

* gpuobj sync

* yay, it mallocs now

* cleaning it up, Thneed

* sync objs and set power

* thneed needs inputs and outputs

* thneed in modeld

* special modeld runs

* can't thneed the DSP

* test is weird

* thneed modeld uses 6.4% CPU

* add thneed to release

* move to debug

* delete some junk from the pr

* always track the timestamp

* timestamp hacks in thneed

* create a new command queue

* fix timestamp

* pretty much back to what we had, you can't use SNPE with thneed

* improve thneed test

* disable save log

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 302d06ee709cb65dba39e836917f5693f0819efb
2020-05-15 13:53:01 -07:00
Willem Melching
f3d87abf82 release nissan (#1515)
old-commit-hash: 3f97660a1a03f88a2ab9f9e4ce20d61934d3dfb9
2020-05-15 11:39:58 -07:00
Willem Melching
8f71de0dbe Rednose (#1503)
* add rednose

* update rednose

* This compiles

* Add rednose to release

* cleanup

* Extract generated dir as argument

* Add constants.py to release

* Add rednose to dockerfile

* Fix that
old-commit-hash: 28bf5d1dd8d08cd8998d2ee9d813b7e573858cf9
2020-05-14 15:36:56 -07:00
Adeeb
48340cc8cb Alerts + Events refactor (#1466)
old-commit-hash: d976233f696040cd5f9a5081c7b21742b7aaef66
2020-05-14 15:21:21 -07:00