Commit Graph

834 Commits

Author SHA1 Message Date
George Hotz 4e7fe3a9ec save valid_len 2020-06-03 14:18:42 -07:00
Jafar Al-Gharaibeh 73db079199
Fix rounding of minSteerSpeed in events (#1620)
I thought I was missing a rounding in Mazda code, but it turned
out to be a missing rounding after the recent event refactoring

Python3 interpreter:
>>> print(" %d  %d" % (1.6,1.4))
 1  1
>>> print(" %d  %d" % (round(1.6),round(1.4)))
 2  1
>>> print(" %d  %d" % (int(round(1.6)),round(1.4)))
 2  1
>>> print(" %d  %d" % (int(round(1.6)),int(round(1.4))))
 2  1

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>
2020-06-03 14:01:32 -07:00
Willem Melching 2400417084
vehicle model types (#1631) 2020-06-03 13:47:47 -07:00
Adeeb ab83e48ec4
Add pre-commit hooks (#1629) 2020-06-03 12:54:49 -07:00
Willem Melching 0f20ac728f Bounds checks on liveParameters for testing on desk 2020-06-03 11:31:12 -07:00
Willem Melching e3ffdf3647 Paramsd can now be killed normally 2020-06-03 11:11:06 -07:00
Willem Melching 6e0bb25ab4 run deleter when offroad 2020-06-02 17:39:58 -07:00
Willem Melching 66455b075d
locationd profiling (#1625) 2020-06-02 17:32:55 -07:00
Adeeb 165bcf1f31
Fix speed too low (#1627)
* fix speed too low

* bump ref

Co-authored-by: Willem Melching <willem.melching@gmail.com>
2020-06-02 17:31:59 -07:00
Willem Melching 843a64c72f
Make pylint more strict (#1626)
* make pylint more strict

* cleanup in progress

* done cleaning up

* no opendbc
2020-06-02 16:29:32 -07:00
Willem Melching 884b327374 ui.cc: read_db_value is not null terminated 2020-06-01 16:41:04 -07:00
Willem Melching 205cb04ee9 speedTooHigh should not be an immediate disable 2020-06-01 15:53:41 -07:00
Willem Melching 0a5bb88ca2 fix flake8 error in honda carstate 2020-06-01 15:28:47 -07:00
cowanhmoore afaa2b917c
HRV fix gas pedal signal (#1582)
Seperate CAR.HRV from CAR.FIT
HRV used GAS_PEDAL, not GAS_PEDAL_2 for FIT
2020-06-01 15:26:47 -07:00
Willem Melching fa7d8f6e1b remove unused line in nissan carstate 2020-06-01 14:39:06 -07:00
Andre Volmensky 843b2940c5
Nissan mph bit (#1609)
* Added MPH bit for Rogue/XTrail

* Init seatbeltUnlatched as True
2020-06-01 14:38:20 -07:00
Dean Lee c9dbaf821c
Template version of read_param (#1593) 2020-06-01 14:30:53 -07:00
Willem Melching d00cdf1e0c longitudinal test should broadcast liveLocationKalman 2020-06-01 14:24:48 -07:00
Dean Lee cdb48cc180
dmonitoring : use memory cache to avoid malloc/free on every frame (#1599)
* use memory cache

* use template function to return buffer

* inline function

* const size_t

* use std::vector instead of kj::array
2020-06-01 14:00:43 -07:00
Willem Melching fab8425f2f Make driverview not pin two cores at 100% 2020-06-01 13:58:54 -07:00
Willem Melching a108e7f211 paramsd output at 20 Hz instead of 100 Hz 2020-06-01 13:47:17 -07:00
Willem Melching f575a9ec12
Fix low speed engage on stop and go Hondas (#1613)
* fix low speed engage on stop and go Hondas

* update ref commit
2020-06-01 10:14:11 -07:00
Jafar Al-Gharaibeh 41fbce5906
Mazda: Slower rate for ACC cancel msg to avoid cruise disable (#1615)
* Slower rate for ACC cancel msg to avoid cruise disable

 Sending ACC cancel message at 10hz may end up disabling
main cruise state. That is because stoc ACC use the same
signal for both functions. If cruise is already enabled
the signal canceles it, otherwise cruise is disabled.
10hz seems to be still fast in some cases not allowing
the state to sync up between OP and the Stock state.
5hz avoids that issue. Also, the resume message was also
updated to 5hz as that seems to work better as well.

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

* Round up 27.96 to 28mph

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>
2020-06-01 02:04:47 -07:00
Adeeb Shihadeh 6466ec982a enable flake8 E502: backslash is redundant between brackets 2020-05-31 17:41:18 -07:00
Adeeb Shihadeh ebed2d1dcc enable flake8 E251: unexpected spaces around keyword / parameter equals 2020-05-31 17:34:47 -07:00
Adeeb Shihadeh f3dcf861c7 enable flake8 E303: too many blank lines 2020-05-31 17:21:11 -07:00
Adeeb Shihadeh 27754a277c enable E261 in flake8: two spaces before inline comment 2020-05-31 14:07:29 -07:00
Willem Melching 02c130731c Add alternate Accord tuning 2020-05-31 13:37:55 -07:00
Willem Melching a0adc44821 Enable new params learner for improved vehicle model estimation 2020-05-31 13:36:27 -07:00
Willem Melching 106cddb49a White panda no longer supported 2020-05-31 13:33:56 -07:00
Willem Melching ea74edf71b Bump version to 0.8.0 2020-05-31 13:31:44 -07:00
Adeeb Shihadeh efd5dffb1e enable flake8 E231: missing whitespace after comma 2020-05-31 12:49:11 -07:00
Adeeb 6051061ff8
Flake8 E22X (#1607)
* e221

* e225

* bump opendbc
2020-05-31 00:48:47 -07:00
Andre Volmensky 9fc826cb5c
Added Rogue 2019/Leaf 2019 fingerprints (#1605)
* Added Rogue 2019/Leaf 2019 fingerprints

* Added Rogue as new car. Updated readme

* Added route to test_car_models.py. Fixed if statements to check against rogue/x-trail

* Fixed paste error

* Merged Leaf fingerprints

* Assume Rogue is MPH until we work out the mph/kph bit
2020-05-30 20:25:32 -07:00
Adeeb d9bf9f0a40
Enable more flake8 checks (#1602)
* enable some more flake8 checks

* some more quick ones

* bump opendbc

* e401

* e711 e712

* e115 e116

* e222

* e301

* remove that

* e129

* e701 e702

* e125 e131

* e227

* e306

* e262

* W503

* e713

* e704

* e731

* bump opendbc

* fix some e722
2020-05-30 20:14:58 -07:00
Willem Melching 4fcf47812b add some sanity checks on returned params 2020-05-30 17:15:41 -07:00
Willem Melching b5a2cec913 Improved tune for VW Golf Mk7. #1603
commit 012049274fd5573bdc5d2d0f198817646dfd5a1b
Author: Willem Melching <willem.melching@gmail.com>
Date:   Sat May 30 10:40:49 2020 -0700

    update ref

commit d50cc2d81fd73dcfccfe1a8e2726879941ec5327
Author: Jason Young <jyoung8607@gmail.com>
Date:   Sat May 30 10:32:25 2020 -0400

    Discard no-longer-used import

commit c092e6f5092535a3b4bb5cabb6f5ecf83ef754c7
Author: Jason Young <jyoung8607@gmail.com>
Date:   Sat May 30 10:21:57 2020 -0400

    Improved tune from community
2020-05-30 17:04:38 -07:00
Adeeb Shihadeh 18afb979fe remove file that shouldn't have been committed 2020-05-30 14:40:00 -07:00
Willem Melching d920290544 add RAV4H_TSS2 EPS firmware version 2020-05-30 13:38:42 -07:00
Willem Melching 4cec8bcc30 Fix indentation in board.cc 2020-05-30 10:31:40 -07:00
Kishan Karunaratne 9256530a1d
[GM] Show FCW from OP on dashboard UI / LED (#1596) 2020-05-30 10:17:04 -07:00
Dean Lee af36aa28ab
driving.cc: Pass ModelDataRaw by reference (#1600)
* pass ModelDataRaw by reference

* pass NVGpaint by refer
2020-05-30 10:08:44 -07:00
Erich Moraga 94b2d4d522
CAR.SIENNA Engine, ESP, and DSU f/w was missing (#1597)
DongleID 307249a92f279059... verified working via TeamViewer, as FPv2 switched to `fingerprintsource = fw`
2020-05-30 10:07:23 -07:00
Yahya Lmallas 3ddbb7fe5b
Call to gmtime is potentially dangerous (#1598)
* Call to gmtime is potentially dangerous

* Revert "Call to gmtime is potentially dangerous"

This reverts commit cc531e4e1969f7a615230d8462f0be3258ba3378.

* Call to gmtime is potentially dangerous

* oops

* not a pointer

* Little identation fix
2020-05-30 10:06:29 -07:00
martinl 7b54dad0b8
Add Subaru blindspot monitoring signals (#1374)
* Add blindspot signals to carstate

* Change blindspot signals to boolean
2020-05-29 23:32:51 -07:00
VirtuallyChris 3d7cd9ec78 Add Camry Hybrid 2018 Engine FW 2020-05-29 17:26:05 -07:00
Adeeb Shihadeh 2d898bc0ed update refs 2020-05-29 12:41:20 -07:00
Adeeb Shihadeh 916448af25 break canError into two separate events 2020-05-29 12:00:41 -07:00
Jafar Al-Gharaibeh 34b9b5e849
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>
2020-05-28 22:15:19 -07:00
Adeeb Shihadeh 7961d5ffd7 Fix below steer speed alert text not updating 2020-05-28 20:39:13 -07:00
Willem Melching ba2ac1207a
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
2020-05-28 15:40:48 -07:00
Dean Lee 108a13ead8
UI: better read_model (#1586)
* update model struct inplace

* refer params

* pass path by refer
2020-05-28 15:10:49 -07:00
Willem Melching 3d08dcc3b2
Run mypy commit hook (#1591)
* run mypy commit hook

* fix mypy errors
2020-05-28 15:05:04 -07:00
Willem Melching bee15f8abe make pre-commit pass without xx present 2020-05-28 13:20:28 -07:00
Willem Melching 44851ae934 bump opendbc 2020-05-28 11:53:17 -07:00
Erich Moraga 2bcab668d4
Added CAR.COROLLA_TSS2 EPS f/w x018965B12520 (#1587)
As seen in Discord, for DongleID/route 35794509ea3b423e|2020-05-28--14-51-06 (Euro Toyota Corolla Hatchback Hybrid)...
https://discord.com/channels/469524606043160576/524327905937850394/715579226186579985
2020-05-28 09:07:07 -07:00
Willem Melching 29aaa44740
flake8 in pre-commit(#1583) 2020-05-27 20:33:05 -07:00
Willem Melching bd06434243
pre-commit pylint (#1580)
* "The commit-hook project sounds interesting though. I would definitely merge something that runs flake8 and pylint on the modified files!"
-  pd0wm, https://github.com/commaai/openpilot/pull/1575#issuecomment-634974344

* add pylint to pre-commit and make everything pass

* Remove uncommented stuff

Co-authored-by: J <user@4800.lan>
2020-05-27 20:00:14 -07:00
Harald Schafer 5a841c2856 Revert "better values"
This reverts commit 109ba298b1.
2020-05-27 17:11:27 -07:00
Willem Melching 8ea8f405db add gpsOK flag to liveLocationKalman 2020-05-27 15:14:13 -07:00
HaraldSchafer 67017d69fe
Minor fixes (#1571)
* was 5 seconds not .2!

* threshold for moving car highers, this can give FPw
2020-05-27 14:35:01 -07:00
Harald Schafer 109ba298b1 better values 2020-05-27 12:16:05 -07:00
HaraldSchafer 7c8d6cbdef
pure init (#1569) 2020-05-26 20:49:14 -07:00
Adeeb c78602e8cc
Remove incomplete Hyundai Ioniq port (#1570) 2020-05-26 20:48:41 -07:00
Adeeb Shihadeh a1ffcdd253 update refs after radarState fields populated 2020-05-26 18:12:12 -07:00
Adeeb Shihadeh 2ecc7d9f6f Fix blank mdMonoTime and controlsStateMonoTime in radard 2020-05-26 17:53:55 -07:00
Thaixican dd16990952
Add 2020 Lexus RX Hybrid support (#1547)
* Add 2020 Lexus RX Hybrid support

* Add 2020 Lexus RX Hybrid to IGNORED_FINGERPRINTS and route to test_car_models per @pd0wm
2020-05-26 13:49:18 -07:00
Willem Melching 4de2c57bd1 Fix #1566, athena status flicker in sidebar 2020-05-26 13:41:02 -07:00
Willem Melching 50f3f1d335
-Werror (#1567)
* werror

* -Wno-inconsistent-missing-override

* Silence ffmpeg deprecation warnings

* add some more pragmas to ignore warnings

Co-authored-by: Comma Device <device@comma.ai>
2020-05-26 13:27:01 -07:00
Dean Lee b3ab7ae392
change light_sensor to atomic variable (#1560) 2020-05-26 09:59:49 -07:00
Dean Lee d5858955ee
reduce the scope of mutex (#1561) 2020-05-26 09:57:14 -07:00
Tunder (Chris in RL) a63814866b
add missing 2020 stinger value (#1565)
1371: 8 (not always present on startup, causes intermittent dashcam mode)
2020-05-26 09:43:05 -07:00
George Hotz b8571710e0
remove the clCreateProgramWithSource interceptor (#1559)
* remove the clCreateProgramWithSource interceptor

* that's old code, thneed is better

* label them thneed_, we shouldn't need to touch CL for anything not SNPE related
2020-05-24 03:33:36 -07:00
Adeeb Shihadeh 86057f785b fix interface init for mock car 2020-05-23 15:39:28 -07:00
Adeeb Shihadeh b251eff764 remove that script 2020-05-22 14:50:08 -07:00
Adeeb Shihadeh ea1b192565 bump panda after hyundai checksum 2020-05-22 14:42:22 -07:00
Willem Melching bfe7cbfe5f
Split TSS2 RAV4 tuning based on fw version (#1558) 2020-05-22 14:00:20 -07:00
Willem Melching a623ad2ab3 That corolla eps version was probably merged by mistake 2020-05-22 13:46:54 -07:00
VirtuallyChris 676fd8ecbc
Add Engine FW (#1556) 2020-05-22 10:37:19 -07:00
Tunder (Chris in RL) ee371919c1
add missing 2020 pacifica value (#1551) 2020-05-22 10:37:05 -07:00
Harald Schafer 00e05bc7d8 needed for stability 2020-05-21 17:47:05 -07:00
Willem Melching fcf879d783
Add permanent CAN error alert (#1549)
* Add permanent CAN error alert

* canValid needs some time to initialize

* update ref
2020-05-21 16:08:05 -07:00
Willem Melching ab5af232b2
Use C++ version of SubMaster and PubMaster (#1548)
* add PubMaster & SubMaster

remove 'delete msg'

remove headers

* use constructor to initial all submster

* modify drain sockets

* fix typo in ssconscript.remove lines

no checkValid in loggerd

last modify

handle_message:event->&event

fix type

remove heads

event to auto

* new interface

* api changed

* Revert "use constructor to initial all submster"

This reverts commit 73be7ea46250a325ce41d3a0445e34395a2ae692.

* change to new api

* revert loggerd

* dd

* use new PubSub api

* update to new interface

don't modify loggerd

reset panda

reset opendbc

remove empty lines

* switch to new pubMaster

* update to the new inteface

change

remove error code

. to ->

merge paramsd.cc

update panda

fix typo

simplify

fix typo

* Fix build

* always conflate

Co-authored-by: deanlee <deanlee3@gmail.com>
2020-05-21 16:04:33 -07:00
Willem Melching e6f24f2390 Revert "Add permanent CAN error alert"
This reverts commit 0abf99dbe0.
2020-05-21 15:30:16 -07:00
Willem Melching 0abf99dbe0 Add permanent CAN error alert 2020-05-21 14:53:40 -07:00
Willem Melching 41da10ff38 Sounds available isdir -> isfile 2020-05-21 14:46:18 -07:00
Willem Melching 517826c1e1 Add percent sign to calibration screen 2020-05-21 14:43:07 -07:00
Adeeb Shihadeh 260e6aff53 fix possible FileNotFoundError 2020-05-21 09:59:39 -07:00
HaraldSchafer 7ffaff029f
Calib in settings (#1543)
* test test

* yo dawg

* yo dawg 2

* yo dawg 3

* calib in ui

* no pitch and yaw

* no more drive rating

* stricter

* param is no longer a vp

* less wall of test

* less is more

* better language

* cleaner
2020-05-20 19:21:03 -07:00
Willem Melching ef2ea14ecc add sonata 2019 to test_car_modelsg 2020-05-20 17:20:17 -07:00
Alice Knag fde1a5e9af
add support for Sonata 2019 (#1538)
* add sonata interface

update values.py

update values.py

* change sonata_1 to sonata_2019

* add sonata 2019 and forte 2019 to README

prettier fucked me up pretty hard at first
sdfsd

* update README.md

* mock test
2020-05-20 17:12:00 -07:00
Willem Melching 8f3e932f96 Locationd fixes 2020-05-20 14:18:28 -07:00
Willem Melching 68ef23f97b Fixup comments 2020-05-20 14:10:55 -07:00
openpilot laptop b8cc31f888 Add single fw requests for hyundai ECUs not supporting multi requests 2020-05-20 14:07:04 -07:00
Willem Melching 1162041ea6
Only send FW query requests for the right brand (#1546)
* only send requests for the right brand

* this works on sonata

Co-authored-by: openpilot laptop <laptop@comma.ai>
2020-05-20 13:02:24 -07:00
Willem Melching 9f0eac9089 Fix #1545, sensor alert on startup 2020-05-20 11:25:55 -07:00
TK211X b62ce27483
Add 2016 Optima Print (#1510)
* Add 2016 Optima Print

* Update values.py
2020-05-20 10:57:21 -07:00
Willem Melching f69f200178 Rename enum 2020-05-19 18:13:11 -07:00
Willem Melching 44484102db Paramsd handle liveLocation not valid and add alerts 2020-05-19 17:00:30 -07:00
Willem Melching d099e09fb7
Handle posenet and sensor alerts in locationd (#1541)
* handle posenet and senor alerts in locationd

* defaults now set in capnp file

* Cleanup c++ version of params learner

* update ref commit
2020-05-19 16:45:20 -07:00
Willem Melching 96605d0951 This one also needs to be fixed 2020-05-19 16:19:00 -07:00
Adeeb Shihadeh 8788ab36e4 remove those debug prints 2020-05-19 13:54:24 -07:00
Willem Melching bb8bbdd9ee
Hyundai fw query (#1540)
* hyundai fw query

* Change query

* this works

* That is not engine

* hyundai fw query

* Change query

* this works

* That is not engine

* Skip FW query in test_car_models

* Those routes don't fingerprint properly after speedup

* only send toyota queries to subaddresses

Co-authored-by: openpilot laptop <laptop@comma.ai>
2020-05-19 13:43:44 -07:00
VirtuallyChris 92f07b92ab
Add missing Civic Hatch FW (#1539) 2020-05-18 16:22:04 -07:00
George Hotz 6c0ad1e675
add thneed self test (#1535)
* add thneed self test

* don't do the memset in thneed, shouldn't matter though

Co-authored-by: Comma Device <device@comma.ai>
2020-05-18 11:34:29 -07:00
Hylke Jellema 52fe671c53
More RAV4H_TSS2 FW (#1523) 2020-05-18 10:41:19 -07:00
eFini e14dfa3bec
use buttonEvent.type instead of string (#1533) 2020-05-18 10:15:30 -07:00
Comma Device 495e0c4648 wtf, how was that commented out and the tests still passed 2020-05-18 17:10:39 +00:00
eFini 4b13a58a93
use constant max speed limit (#1521) 2020-05-18 00:02:55 -07:00
Erich Moraga 6daa255c44
Add fwdCamera f/w for CAR.COROLLAH_TSS2 (#1526)
* Add fwdCamera f/w for CAR.COROLLAH_TSS2

@jamcar23#7629  DongleID/route 095142f13f39faf9|2020-05-16--15-54-21

* Forgot x008646G26011A0 to x008646G2601400
2020-05-18 00:02:37 -07:00
Erich Moraga b9a4e8c882
Added fwdCamera f/w for RX350 ICE (#1531)
* Update values.py

@mikoko#7438 / @mikokolee
DongleID/route f2df066cef1b3647|2020-05-17--16-43-43

* Added missing commas
2020-05-18 00:01:05 -07:00
George Hotz 78a352a8ca
This isn't bigmodel, but there's a lot of good stuff here (#1532)
* bigmodel

* more debug print

* debugging bigmodel

* remove the tanh, debugging

* print images/buffers

* disassemble the command queues

* decompiler

* dump the shaders

* full disasm

* support patching kernel and fixing convolution_horizontal_reduced_reads_1x1

* microbenchmark

* 42 GFLOPS, 1 GB/s

* gemm benchmark

* 75 GFLOPS vs 42 GFLOPS

* 115 GFLOPS

* oops, never mind

* gemm image is slow

* this is pretty hopeless

* gemm image gets 62 GFLOPS

* this is addictive and still a waste of time

* cleanup cleanup

* that hook was dumb

* tabbing

* more tabbing

Co-authored-by: Comma Device <device@comma.ai>
2020-05-17 23:13:17 -07:00
HaraldSchafer 81686547cc
Locationd cleanup (#1517)
* way cleaner take 2

* cleanup

* be more relaxed

* just let it be

* don't drive backwards or upside down

* do this more

* vNED sometyimes invalid

* use reasonble stds

* stability in nonlinear zone

* previous metrics were without publishing
2020-05-17 20:59:53 -07:00
Andre Volmensky 135385c5fb
Bugfix: Reset saturated_count if angle no longer saturated (#1522) 2020-05-16 01:14:10 -07:00
Chris Souers 7abcf71f92
These lines are an unlabeled duplicate of the 4 below it. (#1519) 2020-05-15 18:30:19 -07:00
Willem Melching c18891b936 Alert callback functions were returning tuples 2020-05-15 18:29:22 -07:00
Chris Souers b9b8e61e93
Add ECM ID for 2018 Civic Hatchback (#1518) 2020-05-15 16:36:07 -07:00
Willem Melching 896bd1b5c7 use base class in car_kf 2020-05-15 15:48:48 -07:00
Harald Schafer 273e81715a xRevert "way cleaner"
This reverts commit a4ffd8c226.
2020-05-15 14:29:34 -07:00
Harald Schafer a4ffd8c226 way cleaner 2020-05-15 14:24:11 -07:00
Willem Melching 2cc218e144 lane kf was not built 2020-05-15 14:22:36 -07:00
Willem Melching ed5284f9b3 turn locationd back on 2020-05-15 13:53:45 -07:00
George Hotz 302d06ee70 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>
2020-05-15 13:53:01 -07:00
Willem Melching c85b174584
White panda is deprecated (#1516)
* Start white panda deprecation

* Unify alert text

* Add noentry

* Change to no longer supported

* panda is lowercase

* Capitalize

* rerun ci
2020-05-15 13:00:00 -07:00
Willem Melching 631d0d94d3 Fix two event names 2020-05-15 12:24:12 -07:00
Willem Melching e66c246f34 add simple script to print controlsd alive and valid 2020-05-14 20:16:24 -07:00
Paweł Goliński 8b0ab73fef
Use Conversions in calibrationd (#1511) 2020-05-14 17:56:45 -07:00
Bruce Wayne f8a0eb0f7a make linter happy 2020-05-14 17:38:52 -07:00
Harald Schafer 013e49bf90 too complex 2020-05-14 16:30:00 -07:00
Willem Melching 28bf5d1dd8
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
2020-05-14 15:36:56 -07:00
Adeeb d976233f69
Alerts + Events refactor (#1466) 2020-05-14 15:21:21 -07:00
Jason Young d8d490ef6d
Make timeout setting code reachable (#1509) 2020-05-14 13:03:47 -07:00
Willem Melching 49dd37b81b
Add code to steer using TSS2 LTA message (#1507)
* try again with toyota LTA

* Fix dbc and send at 50Hz

* Add commented code

* Remove unused import

* Remove that
2020-05-13 19:09:51 -07:00
Willem Melching ef33007813 Clip v_cruise to V_CRUISE_MAX 2020-05-13 18:05:24 -07:00
Willem Melching e7ec02e201 speed too high louder alert 2020-05-13 18:02:09 -07:00
Willem Melching add784a7df
remove eigen from phonelibs (#1505) 2020-05-13 16:41:52 -07:00
Willem Melching 69aacd9d17 bump version to 0.7.6 2020-05-13 16:13:38 -07:00
xps-genesis 2c39133c09
Split G80 from Hyundai Genesis (#1502)
Previous commit moved G80 from G90 grouping to Hyundai Genesis grouping.
Bug found as minSteerSpeed is 0 for G80 but 60 for Hyundai Genesis.
Taking @pd0wm recommendation and  ungrouping G80 to its own.
2020-05-13 15:31:30 -07:00
Chris McCammon b0aa834eaf
Remove Brazil Corolla (#1504) 2020-05-13 15:11:10 -07:00
Chris McCammon c1d892ec9b
Add more Lexus ES 2019 FW (#1500)
* Add more Lexus ES 2019 FW

* Found the other FW
2020-05-13 14:33:51 -07:00
xps-genesis 38cdc5777f
CAR.GENESIS_G80 has incorrect parameters (#1499)
Hyundai Genesis 2015-2016 is similar to Genesis G80. The Genesis G90 is the larger vehicle. These are grouped wrongly.
2020-05-13 13:14:52 -07:00
Chris McCammon af70256bc1
Add Brazil 2020 Corolla FW (#1492) 2020-05-13 08:24:05 -07:00
Willem Melching 516fa29738 Fix controlsd typo in refactor 2020-05-12 18:58:18 -07:00
Willem Melching 72db8d890d
Library cleanup (#1491)
* library cleanup

* remove fastcv

* Fix build step

* bump cereal

* bump cereal

* Install capnp

* bump

* no docker cache

* Update installation instructions

* Needs sudo

* Can we sudo?

* Cache was not the problem

* remove static libraries from boardd install script

* Update setup script

* Remove import

* No capnp install in lgtm

* Fix dockerfile
2020-05-12 18:50:07 -07:00
Willem Melching 2ae2c40b29
Fix steering wheel icon showing (#1497)
* this should fix steering wheel icon showing

* fix syntax
2020-05-12 18:17:04 -07:00
Adeeb 08832ff29d
Controlsd refactor (#1487)
* it's a class

* more refactor

* remove that

* car interface should create that

* that too

* not a dict

* don't create permanent events every iteration

* break up long lines

* fix honda

* small optimization

* less long lines

* dict is faster

* latcontrol less args

* longcontrol less args

* update profiling script

* few optimizations

* create events together

* clean up

* more clean up

* remove comment

* clean up

* simplify state transition

* more clean up

* update comments
2020-05-12 15:06:48 -07:00
Chris McCammon 6fb7199f33
Missing engine FW for Sienna (#1486) 2020-05-11 23:08:47 -07:00
Dean Lee 3349b5b3be
use test_bit to determining if a device is a touchscreen (#1389) 2020-05-11 15:30:22 -07:00
Chris Souers e37aaffaad
Add 2020 Honda CRV support (#1464) 2020-05-11 13:52:00 -07:00
Erich Moraga d18eb721ff
DSU firmware for CAR.RAV4H (#1474)
* DSU firmware for CAR.RAV4H

@csullivan#3202 944e3f96fd78a72f``944e3f96fd78a72f|2020-04-25--12-03-43

* Additional CAR.RAV4H DSU firmware

Pulled 881514202200 from @zerofinalblue#3567's 2017 RAV4 hybrid FPv2 output. 
79a302dcf774b7a4|2020-05-08--12-38-57
2020-05-11 13:49:36 -07:00
Harald Schafer ee10697d86 safer 2020-05-10 22:00:41 -07:00
Willem Melching 27ffa29f6c
Fix counter in HKG clu11 message (#1484)
* fix counter in clu11 message

* update ref
2020-05-10 20:13:35 -07:00
Willem Melching 5182da3100 fix update ref script 2020-05-10 18:55:53 -07:00
Adeeb Shihadeh 10ae22a192 delete unused lines 2020-05-10 11:25:42 -07:00
Jason Young 09d465013c
Fix hardcoded path in sensor test script (#1481)
* Fix hardcoded path to sensor test script

* Rename the other place too
2020-05-09 22:17:24 -07:00
Adeeb Shihadeh 48dec51f0e fix circular import reported by LGTM 2020-05-09 16:47:36 -07:00
Adeeb 008700a6b3
LGTM fixes (#1480) 2020-05-09 16:40:43 -07:00
Willem Melching f7c8707bf8
Don't show "no gps" when ubloxd is not running (#1479)
* dont show no gps when ubloxd is not running

* Just s

* Dropped that

* Connected is too long
2020-05-08 21:04:55 -07:00
George Hotz 7c71a14a89 remove locationd from car started processes for now 2020-05-08 20:30:57 -07:00
robbederks 71bebc4fca
Ambient light calibration parameters on persist partition (#1429)
* WIP: light sensor persistent params

* fix params writing

* Persistent params argument in C params lib. Fixed symlink flow

* Removed debug prints

* fix boardd

* fix ui

* remove debug print
2020-05-08 19:39:18 -07:00
William aef01f4bdf
Shebang Fix (#1477)
* Shebang Fix

Per George's "I'd merge a PR replacing the 4 python3.7 with python3" on Discord. George updated Python to 3.8.2 for webcam tools, which broke manager from launching. Instead of chasing the exact version, it seems more reasonable to fall back to 3.

* More Python3.7's
2020-05-08 18:08:11 -07:00
HaraldSchafer 65fcc7c45f
Better poly (#1437)
- better polyfitting
- no mpc cost change during lane change
- model trained with better ll gt, sim noise and guaranteed memories
2020-05-08 17:14:43 -07:00
Adeeb 46f3665279
Move swaglog to cpp + remove another lib (#1470) 2020-05-08 14:46:10 -07:00
Adeeb Shihadeh 27303c2d5d don't need c capnp any more 2020-05-07 21:07:18 -07:00
Dean Lee b6d6f52032
camerad: move c-capnp to c++ (#1472)
* convert c-capnp to c++

change paramater type

* remove c-capnp header from commonmodel.c

* unsigned short -> uint16_t

* MSM_CAMERA_I2C_ADDR_TYPE_MAX->4
2020-05-07 20:14:30 -07:00
Patrick Violette 28128cbbeb
[Honda FW Versions] Add values for combinationMeter and programmedFuelInjection. (#1463)
Honda Civic Hatchback, 2019 shows these in the carParams.
2020-05-06 13:33:07 -07:00
Dean Lee ee725534bb
UI: move c-capnp to c++ (#1455)
* ui:move c-capnp to c++

* move Subsockets into vector

* rename reader to msg

include cereal/gen/cpp/log.capnp

* fix some errors

restore some changes

restore previous

* cleanup codes

cleanup codes

* remove unused variable alert_size

* handle capnproto's enum in a robust way

add break to default

* switch -> std:map

* use static std::map instead of switch

do cleanup

* fix wrong variable name

* use FlatArrayMessageReader instead of custom MessageReader

remove messagehelp.h

Revert "use FlatArrayMessageReader instead of custom MessageReader"

This reverts commit 57d8b6b1e2b4bad908246f35eb068535b1627167.

use FlatArrayMessageReader instead of custom MessageReader

add header file

remove capnp_c lib,add kj lib

include serialize.h

fix

remove duplicate includes
2020-05-06 08:38:26 -07:00
Adeeb Shihadeh 9670f8fb9f these don't need json 2020-05-04 23:37:07 -07:00
George Hotz d5ca841b0f Revert "Bypass alignment related copy whenever possible (#1443)"
This reverts commit b225016628.
2020-05-04 09:54:05 -07:00
Adeeb Shihadeh ad2c54e991 fake less of PubMaster and SubMaster when profiling 2020-05-03 17:41:26 -07:00
Dean Lee 75abfe28d5
fix wrong order of cleanup calls (#1461) 2020-05-03 08:28:10 -07:00
ZwX1616 968e2585cc
bad AF state logging (#1365) 2020-05-02 21:40:43 -07:00
George Hotz e568d3cadc
More LGTM fixups (#1457)
* exclude lib dirs, fix 3 cpp errors

* fix more alerts, exclude mkvparse

Co-authored-by: George Hotz <geohot@gmail.com>
2020-05-02 20:00:41 -07:00
Erich Moraga cb5076b4b2
ESP f/w F152642521 for CAR.RAV4H_TSS2 (#1448)
DongleID 08ae2ec6875e165c
2020-05-02 12:11:11 -07:00
George Hotz 1295cfe06c
Using lgtm.com and fixing found alerts (#1452)
* lgtm in readme, and mac nui fixes

* call super inits in radars

* unused imports, dup lines

* more radars, more unused imports

* pass CP into RadarInterfaceBase

* more fixups

* unused imports

* delete unused lines

* ugh, new unused import

Co-authored-by: George Hotz <geohot@gmail.com>
2020-05-02 12:07:34 -07:00
Dean Lee 846a58507f
simplify drawing text and rect (#1446)
* add ui_draw_text

remove draw textbox

make draw_text static

add blank line

* add ui_draw_text

remove draw textbox

make draw_text static

add blank line

add ui_draw_rect

draw rounded rect

fx typo

* remove used variables

* reduce lines

fix typo

* resolve confilit
2020-05-02 11:27:03 -07:00
Erich Moraga c30b3b9fc9
Line # 9 was a duplicate to # 5 (#1451)
Duplicate line...
#include <string.h>
2020-05-02 08:25:17 -07:00
Dean Lee b225016628
Bypass alignment related copy whenever possible (#1443)
remove blank lines

add file messagehelp.h

remove blank line

simplify

after review
2020-05-01 19:21:00 -07:00
Dean Lee 4857f45d6a
simplify drawing circle images (#1445)
* simplify drawing circle images

add static

set default color to 0 0 0 0

remove lines

* fix img_weel_y

* use color macro
2020-05-01 19:16:17 -07:00
Adeeb 337529d5cb
Add steerWarning and steerError to carState (#1444)
* Add steerWarning and steerError to carState

* fix gm and hyundai

* update refs
2020-05-01 13:13:12 -07:00
Willem Melching 5d69e97281 Less hardcoded values in profiling script 2020-05-01 11:38:30 -07:00
Willem Melching 4301c5efb5 small cleanup of profiling script 2020-05-01 10:49:02 -07:00
Willem Melching b3e7d94303 run both deterministic and statistical profiler 2020-04-30 17:39:37 -07:00
Willem Melching 04bc4a0e45 use proper cachegrind extension 2020-04-30 17:07:46 -07:00
Willem Melching 079c9e714b Write profiling result after running 2020-04-30 16:19:12 -07:00
Adeeb 6ff08f8dee
Chrsyler: calculate checksum in CAN packer (#1438) 2020-04-30 15:43:59 -07:00
Willem Melching 4d03b8536f Run controlsd without sockets 2020-04-30 15:15:19 -07:00
Willem Melching 71589fc92e Logreader can take car of downloading the files 2020-04-30 15:09:19 -07:00
Willem Melching e1a2fbea51 Move minSteerSpeed to base interface 2020-04-30 14:13:33 -07:00
Shane Smiskol e7ae7b9850
remove redundant ret.steerControlType line, fix indentation in toyota/carcontroller.py (#1442) 2020-04-30 14:11:31 -07:00
Dean Lee 3fe3afeede
better ui_draw() (#1432)
* better ui_draw()

* fix missed border

reduce code

remove white line
2020-04-30 12:11:35 -07:00
Willem Melching 5777701b42 Cleanup redundant min steer speed in hyundai 2020-04-30 10:36:34 -07:00
Willem Melching 9ad6cbbe6d Revert "fix memory leak in encoder_close (#1366)"
This reverts commit 3b3eebb137.
2020-04-29 16:14:51 -07:00
Chris Souers 000deb1842
Rename Honda Bosch RDM signal names 2020-04-29 13:51:44 -07:00
TK211X db3864b6ca
Update Elantra Values (#1430)
* Update Elantra Values one last time

I got the params learner values from EON. These are the values it settled on after driving over a week.

* Include Stiffness Params Value.

* Update interface.py
2020-04-29 13:32:25 -07:00
Willem Melching 8db89a6b04 Return avg angle offset 2020-04-28 17:47:04 -07:00
Willem Melching 9159a8d701 Retune stiffness 2020-04-28 15:30:11 -07:00
Chris Souers 0f530be2b4
Static 0xe5 on Honda Bosch (#1420)
* Recreate a static 0xe5 and send to radar

* remove unneeded declaration

* Update ref_commit
2020-04-28 14:12:46 -07:00
Dean Lee b2be607974
replace duplicate codes with variable (#1431)
* eplace duplicate codes with variable

* remove space
2020-04-28 13:44:57 -07:00
Willem Melching e1685b9019 Remove fault addr from tombstone title 2020-04-28 11:32:42 -07:00