Commit Graph

271 Commits (master)

Author SHA1 Message Date
Adeeb Shihadeh 6a2678aae7
add wifi to setup (#2604)
* add wifi to setup

* wifi looks better

* move widgets

* this looks ok

* small fixups

* fix relase tests
2020-11-30 22:35:17 -08:00
Adeeb Shihadeh db0d4cdd86 fix release build 2020-11-26 16:15:59 -08:00
Adeeb Shihadeh 15456ad4a4 bump cereal again 2020-11-25 17:25:06 -08:00
Adeeb Shihadeh ce8a040cc2 fix double awk 2020-11-24 13:30:11 -08:00
Adeeb Shihadeh 51919ff2ff fix release version tag 2020-11-24 13:13:09 -08:00
Willem Melching 6c49c6a9f1
put hash in version (#2607) 2020-11-23 21:32:16 +01:00
HaraldSchafer 08846b5c0e
Torch model (#2452)
* refactor draw model

* rebase master

* correct valid_len

* rename function

* rename variables

* white space

* rebase to master

* e16c13ac-927d-455e-ae0a-81b482a2c787

* start rewriting

* save proress

* compiles!

* oops

* many fixes

* seems to work

* fix desires

* finally cleaned

* wrong std for ll

* dont pulse none

* compiles!

* ready to test

* WIP does not compile

* compiles

* various fixes

* does something!

* full 3d

* not needed

* draw up to 100m

* fix segfault

* wrong sign

* fix flicker

* add road edges

* finish v2 packet

* Added pytorch supercombo

* fix rebase

* no more keras

* Hacky solution to the NCHW/NHWC incompatibility between SNPE and our frame data

* dont break dmonitoringd, final model 229e3ce1-7259-412b-85e6-cc646d70f1d8/430

* fix hack

* Revert "fix hack"

This reverts commit 5550fc01a7881d065a5eddbbb42dac55ef7ec36c.

* Removed axis permutation hack

* Folded padding layers into conv layers

* Removed the last pad layer from the dlc

* Revert "Removed the last pad layer from the dlc"

This reverts commit b85f24b9e1d04abf64e85901a7ff49e00d82020a.

* Revert "Folded padding layers into conv layers"

This reverts commit b8d1773e4e76dea481acebbfad6a6235fbb58463.

* vision model: 5034ac8b-5703-4a49-948b-11c064d10880/780  temporal model: 229e3ce1-7259-412b-85e6-cc646d70f1d8/430  with permute + pool opt

* fix ui drawing with clips

* ./compile_torch.py 5034ac8b-5703-4a49-948b-11c064d10880/780 dfcd2375-81d8-49df-95bf-1d2d6ad86010/450 with variable history length

* std::clamp

* not sure how this compiled before

* 2895ace6-a296-47ac-86e6-17ea800a74e5/550

* db090195-8810-42de-ab38-bb835d775d87/601

* 5m is very little

* onnx runner

* add onnxruntime to pipfile

* run in real time without using the whole CPU

* bump cereal;

* add stds

* set road edge opacity based on stddev

* don't access the model packet in paint

* convert mat.h to a c++ header file (#2499)

* update tests

* safety first

Co-authored-by: deanlee <deanlee3@gmail.com>
Co-authored-by: mitchell <mitchell@comma.ai>
Co-authored-by: Comma Device <device@comma.ai>
Co-authored-by: George Hotz <george@comma.ai>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2020-11-11 20:31:46 -08:00
grekiki 9529764549
Scons builder for cython extensions (#2485)
* complie boardd without python

* not good, but don't want to lose the file, because it works

* clean a bit

* update dbc

* should build on CI

* not good, but don't want to lose the file, because it works

* clean a bit

* should build on CI

* remove unneeded path

* reorder paths

* reduce diff

* and now it works?!

* ... should work in CI

* add kj, 30% chance to fix macos

* pydebug

* new way to find path

* fix :)

* tested

* sanity check

* repl. MacOS flags

* hope it works

* need more logs

* need more logs2

* test if it works

* should work on CI

* correct python file

* should not work

* cleanup

* real cleanup

* more removals

* 50% of file

* transformations

* fixed a hardcoded variable

* more logs

* simpl.

* kalman

* all donw if it passes tests

* cleanup

* reduce code by 20 lines if this works

* fix bugs

* cleanup

* SharedLibrary

* cleanup

* ...

* remove unused

* CI fix maybe?

* add more valid path

* more logs

* ...:

* fix webcam CI

* remove WError flag

* deprecated is not an error

* more Wno things

* reduce diff, add Wno to env

* don't import nonexistent stuff

* SharedLibrary v2

* less custom env

* renaming, remove SharedLibs

* pack libs in envCython

* experiment

* better docker caching

* whitespace

* more docker caching

* improvement

* improvements

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2020-11-11 21:14:51 +01:00
Willem Melching f2c8a6122d Revert "convert mat.h to a c++ header file (#2499)"
This reverts commit 519c043a63.
2020-11-09 01:41:36 -08:00
Dean Lee 519c043a63
convert mat.h to a c++ header file (#2499) 2020-11-09 01:19:09 -08:00
Adeeb Shihadeh 6c86afee16
Qt spinner (#2494)
* move android spinner

* qt spinner

* rotation

* nothing by default

* spin spin

* fix rotate

* style

* spinner for all

* -2

* unused
2020-11-06 18:44:04 -08:00
Adeeb Shihadeh 68ba1649b9
Qt text window (#2489)
* qt text window

* auto size

* real text

* this is cleaner

* fix android build

* exit on pc

* tici fixes
2020-11-06 12:05:24 -08:00
Adeeb Shihadeh 4d0745504b
Car Port: Lexus NX300 (#2481)
* Adding 2018 Lexus NX 300

* adding test model

* Update README.md

adding lexus nx 300 to readme

* update route

* add nx dbc to release files

* fix readme

* add to release notes

Co-authored-by: matt12eagles <matt12eagles@gmail.com>
2020-11-03 15:43:52 -08:00
Adeeb Shihadeh 06400af09f
Qt offroad (#2451) 2020-10-30 17:03:51 -07:00
Chris Souers dc8b5538e8
Add 2020 Acura RDX (#1557)
Update CAN Fingerprint

Update files_common

Update test_car_models.py
2020-10-18 19:03:04 -07:00
Adeeb Shihadeh f9a5f71bf5
NEOS 15 (#2084)
* doze

* need a new apk

* new build

* neos 15 part 1

* new build to re-enable display control for ft8716

* production image
2020-10-18 17:03:28 -07:00
ZwX1616 6b020241c9
Clean up and test camerad refactor (#2310)
* refactor

add function get_camerabuf_by_type

remove cl_free

use camera_id

move front stuff into frontview_thread

bigger refactor

more

typo

rename camerabuf *c to *b

cleanup header files

remove wideview_thread

camera_qcom.c to c++

fix SConscript

camera_process_buf

space

sendrgb same with before

do autoexposure in processing_thread

correct sendrgb

add camera_common.cc

move yuv_transform to CameraBuf

* use C to keep consitent

* rebase master

* rebase master

* continue refactor

* refactor all camera related data&function out of main

 done

* cleanup

* -use buf.rgb_width&height

* remoe ,

* rebase master

* remove unused std::vector

* add func common_camera_process_front

* fix max

* fix sendrgb

* less crap being logged

* fix indents

* add back thumbnails

* thumbnail fixed on tici

* junk junk junk

* unify api

* fix ptr ref

* lol!

* cleanup

* more simplified

* typos

* remove terminate

* use standard polling

* ops_thread refactor, too much code!

* fix build

* ok

* assert

* listen

* incl more

* wq!

* fix more build

* macos

* fix exp targets

* front is different

* const

* bye

* remath

* remove irrelevant

* do ops in a thread

* fix init

* return null

* QCOM2 ops

* qcom2 build

* missing comma

Co-authored-by: deanlee <deanlee3@gmail.com>
Co-authored-by: Comma Device <device@comma.ai>
2020-10-16 21:58:05 -07:00
Willem Melching 2e182e5c57
Params refactor, simplified (#2300)
* always c++

* Create C++ params class

* get works

* tests hang now

* passes tests

* cleanup string formatting

* handle interrupt in blocking read

* fix memory leak

* remove unused constructor

* Use delete_db_value directly

* Rename put -> write_db_value

* filename cleanup

* no semicolons in cython

* Update common/SConscript

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

* add std::string version of delete_db_value

* This is handled

* cleanup encoding

* Add clear method to clear all

* add persistent params

* fix android build

* Should be called clear_all

* only import params when needed

* set params path on manager import

* recusrively create directories

* Fix function order

* cleanup mkdirp

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Co-authored-by: Comma Device <device@comma.ai>
2020-10-13 16:23:23 +02:00
ZwX1616 80515576d5
Upgrade to SNPE 1.41.0 (#2285)
* snpe 1.41.0

* cleanup

* unignored

* where is my symphony

* add snpe/dsp to release files

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2020-10-08 17:18:01 -07:00
grekiki cf46de13d2
Uploader speedup (#2214)
* use caching for getxattr

* fix some git issues

* Scheduled network checks

* attempt optimization

* Delete speed_test.py

* Style fixes

* Fix styling

* fix spaces

* fix spaces

* fix naming

* Update uploader.py

* Update mark_all_uploaded.py

* Add file to release

* Update selfdrive/loggerd/tools/mark_all_uploaded.py

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2020-09-22 11:37:24 +02:00
Adeeb Shihadeh b341fdc644
Realtime shield (#2194)
* cpu 3 shield

* set priority before affinity

* add to release files

* only run on android
2020-09-17 15:49:14 -07:00
Willem Melching c90cb1b529
Tici hardware abstraction layer (#2183)
* rename android hardware

* add tici class

* elif

* read correct serial number

* Update release files

* Get IMEI

* Refactor AT command

* move get_cmdline into base class

* Remove unused import

* Small cleanup
2020-09-17 13:36:42 +02:00
Adeeb Shihadeh dd6a2b8dc2 Revert "don't ship QT UI in release", needed by release CI test for now
This reverts commit bcd79669b0.
2020-09-11 13:10:02 -07:00
Adeeb Shihadeh bcd79669b0 don't ship QT UI in release 2020-09-11 12:11:47 -07:00
Adeeb Shihadeh e0004d0981
Reduce paramsd and calibrationd CPU usage (#2119)
* reduce paramsd cpu

* reduce calibrationd cpu usage

* calibration_helpers was mostly unused

* more calibration cleanup

* update refs

* fix thresholds in CPU test
2020-09-10 12:16:29 -07:00
Adeeb Shihadeh acd1bde496
QT UI: sounds (#2078)
* move android into own dir

* fix name

* maybe this works? qt ui doesn't work on mac

* fix that

* pc sound works

* fix pc build

* lowercase

* that needs to be real_arch

* split into classes

* fix typo in lib

* Fix cycle alerts

* Add qt multimedia libs to install scripts

* Add ui/android folder

* Fix android build

* Raise exception if sound init fails

* add missing return

Co-authored-by: Willem Melching <willem.melching@gmail.com>
Co-authored-by: Comma Device <device@comma.ai>
2020-09-09 19:04:28 +02:00
Willem Melching 5782efe3ae
Systemd logcatd (#2085)
* Systemd logcatd infrastructure

* This should work

* Cleanup

* Split

* More compact and cleanup

* Add to ubuntu setup package list

* Run logcatd on all non pc platforms
2020-08-26 17:09:23 +02:00
Willem Melching c7152d5419
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
2020-08-26 14:57:17 +02:00
robbederks 622e42d504
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>
2020-08-26 11:30:30 +02:00
Willem Melching 6bb2630eba
Pandad: turn on panda power (#2073)
* pandad turn on panda power

* Add gpio.py

* needs bytes

Co-authored-by: Comma Device <device@comma.ai>
2020-08-24 16:56:29 +02:00
Willem Melching e115c51452
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>
2020-08-20 17:16:44 +02:00
Willem Melching 502cc665e0
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>
2020-08-13 10:10:50 +02:00
Adeeb Shihadeh 9bc0b350fd add launch_env.sh to release files 2020-08-12 17:34:15 -07:00
martinl c9adc4900b
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
2020-08-10 12:31:40 -07:00
martinl e37b8e5d56
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>
2020-08-06 21:55:13 -07:00
Adeeb Shihadeh a7ee2a53a8
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
2020-08-01 17:26:35 -07:00
Willem Melching 80acb32825
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
2020-07-31 23:14:31 +02:00
Adeeb Shihadeh 90fc1c6028
Improve on-device CI reliability (#1922) 2020-07-25 02:12:19 -07:00
Willem Melching e0e7c7486d
remove old params learner (#1918) 2020-07-24 18:43:17 +02:00
martinl a086f52881
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
2020-07-23 12:28:23 -07:00
Greg Hogan 825821f010
Honda CRV BSM alert from B-CAN (#1867) 2020-07-21 17:41:45 +02:00
Adeeb Shihadeh eebb941b5a fix release date 2020-07-16 14:44:58 -07:00
Adeeb Shihadeh 9170ffcad4 bump opendbc 2020-07-08 14:10:05 -07:00
Adeeb Shihadeh 65d800c4f5 use special 'eon-build' device for release build 2020-07-07 16:41:04 -07:00
Adeeb Shihadeh c715661656
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
2020-07-07 14:17:09 -07:00
Adeeb Shihadeh 6b942c94de Revert "build script", should've been on branch
This reverts commit 975ab40786.
2020-07-06 20:16:16 -07:00
Adeeb Shihadeh 975ab40786 build script 2020-07-06 20:15:38 -07:00
Adeeb Shihadeh 88f6fad392 remove Jenkinsfile from release files 2020-07-05 18:04:25 -07:00
Adeeb Shihadeh f1afb3e3ae
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>
2020-07-05 17:56:24 -07:00
Adeeb Shihadeh b23d7950e3 remove manager_helpers.py after CPU usage test refactor 2020-07-04 00:10:58 -07:00
Adeeb Shihadeh 3f57b7ee76 increase jenkins timeout 2020-07-03 20:34:31 -07:00
Adeeb Shihadeh ba20e91d11 phone CI: pull over https, push over ssh 2020-07-03 19:40:39 -07:00
Adeeb Shihadeh 32f03ec8a5
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
2020-07-03 19:12:05 -07:00
Adeeb Shihadeh 6db7fa8c03
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>
2020-07-03 15:40:13 -07:00
Adeeb Shihadeh 3c48b5a3ed remove duplicate key 2020-06-29 15:05:47 -07:00
Adeeb Shihadeh 38b5f25da2 actually remove all old files 2020-06-25 15:39:35 -07:00
Adeeb Shihadeh 6cb2d83253 add upate_kernel.json to release files 2020-06-22 11:32:48 -07:00
Adeeb Shihadeh a1d4dd3adc
release2 cleanup (#1703)
* cleanup intermediate files

* test car interfaces
2020-06-19 13:46:24 -07:00
Adeeb Shihadeh 9b6864b31a fix 'openpilot' symlink being created in release branches 2020-06-18 14:23:11 -07:00
Adeeb Shihadeh bbb6fa1172
Remove logentries from pyextra (#1721)
* remove logentries from pyextra

* update release files

* gitignore
2020-06-18 11:48:28 -07:00
Dean Lee 8cacc14b31
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
2020-06-15 15:26:38 -07:00
Willem Melching c18e7da3c2
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
2020-06-09 16:44:26 -07:00
Adeeb d4858e5ff5
Move driver monitoring out of controls (#1642)
* move dmonitoring out of controls

* run monitoring unit tests in CI
2020-06-09 13:25:15 -07:00
Adeeb c24a7e248a
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>
2020-06-08 14:24:14 -07:00
Adeeb 7666d99694
Remove common/messaging.h (#1635)
* remove common/messaging.h

* release files
2020-06-05 12:46:49 -07:00
Willem Melching 63c8e8439b
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>
2020-06-04 18:57:25 -07:00
Adeeb Shihadeh 676d0901e5 clean up release files 2020-06-02 15:41:41 -07:00
Willem Melching b042ac034e
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
2020-06-01 18:57:04 -07:00
Adeeb Shihadeh 27754a277c enable E261 in flake8: two spaces before inline comment 2020-05-31 14:07:29 -07:00
Willem Melching 775acd11ba Temporarily disable openpilot run in jenkins test until testing stuff is back up 2020-05-31 13:20:56 -07:00
Adeeb cc2137bded
pyextra isn't a submodule anymore (#1601) 2020-05-30 10:04:56 -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 233db4f1bc.

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2020-05-28 22:15:19 -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
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 3f97660a1a
release nissan (#1515) 2020-05-15 11:39:58 -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
Willem Melching add784a7df
remove eigen from phonelibs (#1505) 2020-05-13 16:41:52 -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
Adeeb Shihadeh 10ae22a192 delete unused lines 2020-05-10 11:25:42 -07:00
Adeeb 008700a6b3
LGTM fixes (#1480) 2020-05-09 16:40:43 -07:00
George Hotz bb9ca1ebd6 copy the codecov and lgtm config files 2020-05-08 18:07:28 -07:00
Adeeb 46f3665279
Move swaglog to cpp + remove another lib (#1470) 2020-05-08 14:46:10 -07:00
Adeeb Shihadeh 1503e24d3c fix release after camera_qcom.cc rename 2020-05-07 21:32:22 -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
ZwX1616 968e2585cc
bad AF state logging (#1365) 2020-05-02 21:40:43 -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
Willem Melching 70ae01e3cd remove yet another reverse geocoder 2020-04-24 14:07:36 -07:00
ZwX1616 133b1a20b4
RHD support for driver monitoring (#1299) 2020-04-15 16:48:44 -07:00
Willem Melching 202a4c2011
Add binary to display text (#1301)
* add binary to display text

* fake text needs status too

* Rename to TextWindow

Co-authored-by: Comma Device <device@comma.ai>
2020-03-31 20:14:26 -07:00
George Hotz 6e5a2d404b
Preparing for the efficientnet (#1255)
* snpe version 1.35.0.698

* fix files common for new snpe

* efficient net with normal names

* compiling with 1.32 works

* actual snpe files

* fix monitoring, delete unneeded

* point the symlinks to the right places

* err, modeld needs the CPU

* benchmark for 50 its

* put back old model for now

Co-authored-by: Comma Device <device@comma.ai>
Co-authored-by: Harald Schafer <harald.the.engineer@gmail.com>
Co-authored-by: George Hotz <geohot@gmail.com>
2020-03-30 14:20:51 -07:00
Harald Schafer 34f2c0da75 longitudinal e2e mpc 2020-03-26 17:43:11 -07:00
Greg Hogan f21d0f325e
uploader: do not delete files after uploading (#1253)
* cffi xattr function wrapper

* xattr wrapper error handling

* xattr tests

* use xattr for tracking files uploaded

* uploader xattr exception handling

* update uploader tests

* remove unused import

* update release build

* xattrs.py -> xattr.py
2020-03-19 18:09:26 -07:00
Willem Melching ee7234485b
remove internal rawgps (#1252) 2020-03-18 11:40:22 -07:00
robbederks 992be20d63
Offroad power monitoring (#1067)
* Untested implementation of offroad power monitoring

* Fixed some syntax errors

* Cast to int

* Fixed pylint

* Wrapped in class

* Put pulsed calc in own thread

* Longer timeout before starting pulse measurement

* Fudge factor + flake8

* Made integration thread-safe and catch charge disable exceptions

* Catch all calculation errors

* Fixed networkstrength removal
2020-03-10 22:18:48 -07:00
George Hotz 2f2b85581c
Add sentinels to logs and qlogs (#1205)
* sentinel WIP

* logger is now a cc, not a c

* simpler code doesn't touch loggerd.cc

* oops, double lock. and logreader is nicer
2020-03-05 14:29:34 -08:00
Willem Melching 3d2696c60b
Track CPU usage in CI (#1168)
* run openpilot for 60 seconds and report cpu

* Not passive

* Set training version

* Write cpuset

* Add community toggle

* Formatting

* Refactor

* Reorder processes

* Add max cpu

* Try this

* Try this to exit

* Does this work?

* This should work

* now it should work again
2020-03-02 10:40:47 -08:00
Willem Melching c9ecab2139
Kalman filter to identify vehicle parameters (#1123)
* full vehicle model simulator

* Add vehicle model

* Model compiles

* Close enough

* Simulation works

* Add fast angle offset

* Tune fast angle offset learner

* Create live service for paramsd

* Better clamping

* Fix rotation matrix

* Cleanup before merge

* move debug script to debug/internal

* revert plannerd change

* switch vehicle model to corolla

* fix valid flag

* Bigger stiffness range

* Lower process noise on steer ratio

* Tuning

* Decimation

* No maha tests
2020-02-26 16:19:02 -08:00
Willem Melching ff91c6f9d4
Run locationd online (#1089)
* add locationd to manager

* add to release files and make linter happy

* Don't ship all models

* Also add locationd.py

* Remove unused import

* Fix import in kalman helpers
2020-02-17 18:07:23 -08:00
Willem Melching 47fd50ca60
Kalman filter compilation cleanup (#1080)
* start cleanup

* create generated dir if not exist

* tests pass!

* everything works again

* also convert live_kf to new structure

* Remove sympy helpers from file list

* Add laika to docker container

* Only build models that are present
2020-02-12 09:40:28 -08:00
Willem Melching 960b42c523
Re enable athenad test (#1058)
* Renable athena test

* debug

* Revert "debug"

This reverts commit 30f68055f8.

* Specify correct pythonpath for tests

Co-authored-by: Andy <andyh2@me.com>
2020-02-11 19:26:34 -08:00
Comma Device 26453ad38b working release2 script 2020-02-11 21:25:21 +00:00
Willem Melching c4ed49f082 make sure release script removes old dotfiles 2020-02-11 10:13:21 -08:00
Willem Melching 4f05efb6bc Create /data/pythonpath in release script 2020-02-10 14:49:44 -08:00
Willem Melching 0f2b1ea5f5 Proper set -e in devel script + fix repo url 2020-02-10 14:47:36 -08:00
Willem Melching 6737ea2860 Harcoding folder name is fine 2020-02-10 14:46:01 -08:00
Willem Melching b645b1f278 Update release scripts 2020-02-10 14:38:47 -08:00
Adeeb 0ad5715255
use services.h in loggerd (#1056)
* loggerd: use services.h

* don't need yaml-cpp anymore

* forgot that
2020-02-06 10:56:01 -08:00
Willem Melching a98000849e Removed old signed firmware during release build 2020-02-03 15:01:36 -08:00
Willem Melching e32e754a74 Cleanup files_common for phone release 2020-02-03 14:41:43 -08:00
Willem Melching 0fb9971728 Only add the file list to the release 2020-02-03 14:11:23 -08:00
Willem Melching 2fe75cb7d0 Noqa on release build script 2020-02-03 13:37:57 -08:00
Willem Melching 0e1fc45bc3 Update release files 2020-02-03 12:52:20 -08:00
Willem Melching 77cb0b1464 Add pipfile to release files so CI can run 2020-02-03 12:16:38 -08:00
ZwX1616 6322a275d6
dmonitoringd (#1016) 2020-01-30 19:12:44 -08:00
Willem Melching 4d5957432e Add dockerfile to release files 2020-01-30 13:36:15 -08:00
Willem Melching a2fe62ce77 Fix source brnach in master-ci push 2020-01-30 13:31:14 -08:00
Willem Melching ada141e5e3 Fix target branch on master release build 2020-01-30 13:21:04 -08:00
Willem Melching 0319861700
Jenkins pipeline to create master-ci (#1019)
* Added Jenkinsfile

* Added Jenkinsfile

* Added Jenkinsfile

* change order

* sudo

* whoami?

* Added Jenkinsfile

* install git

* Untested build scripts

* Add lockable resource

* Fix syntax

* Only one stage

* fix target dir

* Use deploy key

* noqa on test_openpilot

* Fix version.h path

* Cleanup release files

* Add linter scripts to release

* Update jenkinsfile

* Fix path

* this should work

* Use python3 docker container

* Run in correct directory

* Setup /data/pythonpath

Co-authored-by: commaci-public <60409688+commaci-public@users.noreply.github.com>
2020-01-30 13:06:45 -08:00
Willem Melching 09a1691caf add default EON private key 2020-01-23 14:42:06 -08:00
Willem Melching 7f813d23ce cleanup and make linting part of ci work 2020-01-17 13:03:44 -08:00