Commit Graph

103 Commits

Author SHA1 Message Date
Dean Lee
72c1cf9680 boardd: Add new functions usb_read, usb_write (#1856)
* add func usb_write&usb_read

* rename cnt to err

* pass in device handle

* use defines for flag values

* consistent spaces

Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: 1da11c26b6
2020-07-23 17:27:08 +02:00
Dean Lee
c95063426a fix buffer overflow (#1871)
old-commit-hash: c788aa99dd
2020-07-23 15:52:59 +02:00
Dean Lee
3d1cda5a5e boardd: release claimed interface before closing usb (#1855)
* release claimed interface

* pass device handle by reference

Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: 2232efbcd4
2020-07-23 15:37:28 +02:00
Willem Melching
df3a172286 make sure boardd loopback test can run standalone
old-commit-hash: 0ac2f6c470
2020-07-23 15:31:32 +02:00
Adeeb Shihadeh
993eeaf694 Rebuild cython extensions when dependency version changes (#1886)
* rebuild cython extensions when python/cython/distutils version changes

* submodules and boardd

* kalman and transformations
old-commit-hash: 165e14d103
2020-07-16 13:59:32 -07:00
Adeeb Shihadeh
9156fb68c2 add UI for boardd loopback test
old-commit-hash: 3ff373ed0d
2020-07-15 11:53:42 -07:00
Adeeb Shihadeh
cdfb090c7a Wunused (#1841)
* enable Wunused, first pass

* unused stuff in snpe model

* these are used on phone

* handle sigint and sigterm in modeld

* fix phone build

* camera qcom

* QCOM build works

* delete unused camerad vars

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: eb1aa3d831
2020-07-09 09:25:32 -07:00
Adeeb Shihadeh
b38c33cc47 Boardd loopback test (#1840)
* start boardd loopback test

* let's try this in CI

* fix jenkinsfile

* remove old

* rename

* check msgs

* should be reliable now

* send more
old-commit-hash: 3ab0b49656
2020-07-08 19:42:03 -07:00
Greg Hogan
bcf7edf595 k-line 5 init fault type (#1821)
* k-line 5 baud fault type

* update name

* bump cereal

* fix name

* add missing event
old-commit-hash: c458f5a5d3
2020-07-06 09:33:16 -07:00
ZwX1616
b7643a0c40 Reduce C2 dcamera noise at night (#1798)
old-commit-hash: 1036c68251
2020-06-30 19:58:40 -07:00
Willem Melching
24adb459c3 eon needs include for errno
old-commit-hash: 16a23c98fa
2020-06-23 16:05:47 -07:00
Willem Melching
4d93e0b907 Set timeouts on boardd and ubloxd receive sockets
old-commit-hash: 28110ea880
2020-06-23 15:56:30 -07:00
Dean Lee
e5749977dd save Reader to local variable to avoid repeating validate the pointer (#1717)
old-commit-hash: fa0b47e6f2
2020-06-19 11:37:31 -07:00
Dean Lee
5fb85ede56 add function read_db_bytes (#1662)
old-commit-hash: 90d97de74d
2020-06-09 13:46:49 -07:00
Willem Melching
5c30b96932 boardd: no conflate on sendcan (#1645)
old-commit-hash: 19512315ff
2020-06-05 14:20:52 -07:00
Jason Young
ebed52527b Reduce scheduler latency for realtime processes (#1638)
* WIP: reduce boardd and other lags

* Copypasta fault

* Silence spurious startup warning

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 68531b071c
2020-06-05 17:09:41 -04:00
Adeeb
16c0bc99b2 Remove common/messaging.h (#1635)
* remove common/messaging.h

* release files
old-commit-hash: 7666d99694
2020-06-05 12:46:49 -07:00
Willem Melching
a56e2b01f8 Make pylint more strict (#1626)
* make pylint more strict

* cleanup in progress

* done cleaning up

* no opendbc
old-commit-hash: 843a64c72f
2020-06-02 16:29:32 -07:00
Adeeb Shihadeh
9823f1164c enable flake8 E303: too many blank lines
old-commit-hash: f3dcf861c7
2020-05-31 17:21:11 -07:00
Adeeb Shihadeh
68a3061c9d enable E261 in flake8: two spaces before inline comment
old-commit-hash: 27754a277c
2020-05-31 14:07:29 -07:00
Adeeb Shihadeh
be0b43f339 enable flake8 E231: missing whitespace after comma
old-commit-hash: efd5dffb1e
2020-05-31 12:49:11 -07:00
Adeeb
5e857427ba 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
old-commit-hash: d9bf9f0a40
2020-05-30 20:14:58 -07:00
Willem Melching
5d897a743c Fix indentation in board.cc
old-commit-hash: 4cec8bcc30
2020-05-30 10:31:40 -07:00
Yahya Lmallas
8e6224cfd2 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
old-commit-hash: 3ddbb7fe5b
2020-05-30 10:06:29 -07:00
Willem Melching
7f0b3180a4 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>
old-commit-hash: ab5af232b2
2020-05-21 16:04:33 -07:00
Willem Melching
8505259e41 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
old-commit-hash: 72db8d890d
2020-05-12 18:50:07 -07:00
robbederks
5a12fc32e7 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
old-commit-hash: 71bebc4fca
2020-05-08 19:39:18 -07:00
Adeeb Shihadeh
45b9284fd0 don't need c capnp any more
old-commit-hash: 27303c2d5d
2020-05-07 21:07:18 -07:00
George Hotz
16cbb5e255 Revert "Bypass alignment related copy whenever possible (#1443)"
This reverts commit 235d4f8957ee4566d6217783638fa58a586bb35a.

old-commit-hash: d5ca841b0f
2020-05-04 09:54:05 -07:00
Erich Moraga
9974fa017f Line # 9 was a duplicate to # 5 (#1451)
Duplicate line...
#include <string.h>
old-commit-hash: c30b3b9fc9
2020-05-02 08:25:17 -07:00
Dean Lee
f2932aadfd Bypass alignment related copy whenever possible (#1443)
remove blank lines

add file messagehelp.h

remove blank line

simplify

after review
old-commit-hash: b225016628
2020-05-01 19:21:00 -07:00
Willem Melching
af5b045a3a We need that to filter out loopback bus
old-commit-hash: 23363890cd
2020-04-23 12:19:46 -07:00
Willem Melching
62afc5d183 replay many update
old-commit-hash: 559e3aa8a0
2020-04-22 15:03:37 -07:00
Willem Melching
93a539e7ff Release messaging sockets and context on shutdown (#1391)
* release resources when thread is done

* add white space

* add white space

Co-authored-by: deanlee <deanlee3@gmail.com>
old-commit-hash: 02e474580e
2020-04-17 16:37:34 -07:00
Dean Lee
a4c5bffd75 fix build warning: libusb_set_debug is deprecated (#1383)
* fix build warning:libuse_set_debug is deprecated

* use enum LIBUSB_LOG_LEVEL_INFO(3)
old-commit-hash: 5967690499
2020-04-17 13:39:42 -07:00
Dean Lee
7c22a08b30 close usb handle after faile (#1352)
old-commit-hash: dd05d1df83
2020-04-13 15:10:47 -07:00
Willem Melching
2254998160 handle nak error in replay many
old-commit-hash: fc10fe69bf
2020-04-13 13:02:18 -07:00
Willem Melching
8fe9afda2a No hardcoded bitset size
old-commit-hash: 7d54453f04
2020-04-09 13:45:18 -07:00
Willem Melching
bbdce92c16 Populate health.faults from panda health packet
old-commit-hash: f718ceafd5
2020-04-09 13:43:00 -07:00
Willem Melching
dc073f0e46 Init mutex just to be safe
old-commit-hash: 64f6e0c1d1
2020-04-08 14:09:24 -07:00
Willem Melching
4c8657fc8c openpilot support for panda nak (#1324)
old-commit-hash: 7ea2524b6f
2020-04-06 16:49:37 -07:00
Willem Melching
bea4addcc2 Boardd should always send health, even with no panda (#1322)
* dont go offroad when health times out

* always send health packet

* Handle disconnect in thermal

* Handle unplug in power monitoring

* Small cleanup

* Remove copied code

* Add mutex

* Can just use infinite timeout. It will still return if not connected
old-commit-hash: b16e11cde5
2020-04-06 16:01:42 -07:00
DeanLee
6ff6ce4d79 Fix memory leak in boardd.cc (#1321)
* fix memory leak

* dd
old-commit-hash: 9bcd5faa70
2020-04-06 09:13:34 -07:00
George Hotz
f5078e87bc tici: add (somewhat) broken camerad support (#1300)
* capnparm

* building in progress

* scons build works

* that script fixes opencl

* start new camera code

* includes and more camera scripts

* control c works now

* no device control yet

* phy too

* just one camera for now

* fix capnparm

* hmm, the inits are needed

* more cameras

* link stop start

* doesn't work yet

* fix ion on qcom2

* start poll ish

* 4 pictures and done

* no jpeg

* it works to picture

* destroy sync obj

* both work for now

* defined QCOM2

* fix fd leak

* run modeld

* 10 bit mode

* real frame stride

* needs digital gain

* dnew

* no color correcting on new

* that snpe doesn't work

* qcom2 gate

* cleanups

* oops, fix aarch64 detector

* update cereal

* modeld works with SNPE

* fix driver monitoring model

Co-authored-by: Tici <robbe@comma.ai>
old-commit-hash: 8db0993663
2020-03-31 16:34:55 -07:00
Shane Smiskol
682c866a55 initialize all messages in 1 line (#1206)
old-commit-hash: 6ff881f789
2020-03-05 17:32:52 -08:00
Adeeb
65a2c62114 Abstract common events + event cleanup (#1129)
* too many if

* unused

* whitespace

* key

* sefldrive/car/*

* no more gctx

* lower

* start abstracting common events

* all cars

* start small

* all cars

* reverse gear

* wrongCarMode

* wrongGear

* espDisabled

* steerUnvailable

* make linter happy

* c isn't used

* fix esp_disabled in VW

* update ref

* more red

* more cleanup

* fix subaru

* update ref

old-commit-hash: e8cb6ea06a
2020-02-20 16:22:25 -08:00
George Hotz
0c664a8ad0 Disable Power Down option for desk devices (#1117)
* './params.py DisablePowerDown 1' to use

* fix issues

old-commit-hash: 858c992bda
2020-02-18 11:48:04 -08:00
robbederks
193ee1ac01 Added hw status to ublox test scripts and ubloxGnss packet (#1054)
* Added hw status to ublox test scripts and ubloxGnss packet

* Added extra config to boardd

* Implemented new ublox message handler in ubloxd

* Fixed debug text

* Added some explanation and cereal bump

old-commit-hash: d0c1f9a864
2020-02-05 11:12:03 -08:00
George Hotz
b846f88ade Support scons build on Mac (#1034)
* fix clock and add Darwin sconstruct

* it builds, this changes should be simplifications too

* fix boardd build

* that's the real type of EGLClientBuffer

* remove extra lines

* ui needs opencl on phone

old-commit-hash: f72f78f2b9
2020-02-01 23:36:50 -08:00
Comma Device
488a4707b0 use proper timeout on frontFrame to turn off IR leds
old-commit-hash: 58262bac9d
2020-01-30 15:52:27 -08:00