Commit Graph

110 Commits

Author SHA1 Message Date
Dean Lee 4d6584a315 boardd: remove global variables spoofing_started&fake_send (#19966) 2021-01-31 00:02:03 +01:00
Dean Lee edc2b3f67c fix panda: remove uninitialized err and check after (#19974) 2021-01-30 23:59:49 +01:00
Dean Lee dd3a260676 boardd: refactor usb_connect, delete panda on failure (#19956) 2021-01-29 13:10:56 +01:00
Dean Lee c723bbd6be Panda: add check for connected in usb_read (#19957) 2021-01-29 13:00:49 +01:00
Dean Lee 0b75a85adc Panda: use 'std::atomic<bool> connected' to ensure thread-safety (#19954) 2021-01-28 11:35:13 -08:00
Dean Lee c4215d8476 Panda: refactor get_firmware_version, return std::optional<std::vector> (#19896)
Co-authored-by: Willem Melching <willem.melching@gmail.com>
2021-01-28 16:25:05 +01:00
Dean Lee 96cc633d91 panda: refactor get_serial, return std::optional<std::string> (#19895) 2021-01-28 16:21:18 +01:00
Adeeb Shihadeh 8c31ab3cee remove legacy reset line support (#19770) 2021-01-27 14:19:49 +01:00
Adeeb Shihadeh 6e70baa306 actually wait for boardd to start 2021-01-26 15:09:09 -08:00
Dean Lee 511bad6a9f fix indentation (#19925) 2021-01-26 14:43:37 -08:00
Adeeb Shihadeh 144227d3d3 wait for pandad to start boardd 2021-01-26 13:39:15 -08:00
Adeeb Shihadeh 59f4ea9fe5 fix boardd loopback test after #19880 2021-01-26 12:12:10 -08:00
Dean Lee 4ac08ce05e TTYPigeon::send : delete unnecessary temporary variables (#19898)
Co-authored-by: Willem Melching <willem.melching@gmail.com>
2021-01-26 17:33:53 +01:00
Dean Lee 0f8b5db8ce boardd: use setUbloxRaw to avoid memory alloc&copy in pigeon_publish_raw (#19884)
* use setUbloxRaw to avoid memory copy

* const std::string &dat
2021-01-26 17:21:02 +01:00
Dean Lee d17a5195e7 can_list_to_can_capnp_cpp: write message directly to the output string (#19912) 2021-01-26 17:18:02 +01:00
Dean Lee 5c58a2618e Panda: add can_send buffer caching (#19910) 2021-01-26 17:10:53 +01:00
Dean Lee b0c0de5b66 Fix panda: dangling pointer problem in can_receive (#19892)
* refactor can_receive

* still send empty msg
2021-01-26 16:04:38 +01:00
Dean Lee 5594b8f3cb Panda: replace pthread_mutex with std::mutex (#19909) 2021-01-26 14:57:55 +01:00
Dean Lee b1660cf585 pigeon: use const reference for std::string parameter (#19886) 2021-01-25 20:48:24 -08:00
Dean Lee 83003bdeac boardd: use std::atomic for ignition to ensure thread-safety (#19882) 2021-01-22 15:26:27 -08:00
Dean Lee 2df9736bb2 boardd: declare MessageBuilder close to usage (#19883) 2021-01-22 15:25:54 -08:00
Adeeb Shihadeh e6478c6b35 better can replay script 2021-01-14 17:49:17 -08:00
Dean Lee 595830135b merge utilpp.h into util.h (#19710) 2021-01-10 14:57:32 -08:00
Willem Melching 0cdb9e8658 Fix battery voltage reading (#19699)
* tici: correct battery voltage

* read current

* use current too
2021-01-08 17:21:58 +01:00
Dean Lee 86fe2d1697 common exit handler (#19661)
* common signal handle

* fix typo

* rename to ExitHandler

* remove include signal.h

* remove include csignal

* rename variable exit to v

* rebase master
2021-01-05 20:19:53 -08:00
Adeeb Shihadeh 87950eb312 setup clang tidy (#19533)
* setup clang tidy

* config

* some cleanup

* little more

* remove that

* fix qcom build
2021-01-05 12:50:23 -08:00
Dean Lee c1cf0882bd Replace usleep with util::sleep_for (#19643)
* replace usleep with sleep_for

* sleep microseconds

* sleep nanoseconds

* Trigger Build
2021-01-04 18:03:11 +01:00
Adeeb Shihadeh ffa7e0cbdb manager tests + make all processes exit cleanly (#19595)
* manager tests

* logcatd exits cleanly

* sigint

* boardd

* multiple dbus connections hangs for some reason

* clocksd proclogd

* network type from thermal

* fix tests

* fix android logcatd

* fix mac

* fix mac proclogd

* move on device athena tests

* build first

* build first

Co-authored-by: Comma Device <device@comma.ai>
2020-12-29 22:32:03 -08:00
robbederks 80dbda5342 Don't re-init pigeon while offroad (#2687)
* don't re-init pigeon while offroad

* we don't need this
2020-12-03 17:54:46 +01:00
robbederks 57cd8c38b7 add legacy reset line support (#2625)
* add legacy reset line support

* clean up names

Co-authored-by: Comma Device <device@comma.ai>
2020-11-26 14:37:07 +01:00
Willem Melching ff65dc1401 Stricter check on date for RTC time sync (#2582)
* More strict check on time

* Also update thermald
2020-11-20 11:47:39 +01: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
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
Shane Smiskol 5eea86cbf4 Abstract set_unsafe_mode function to Panda (#2431)
* Abstract set_unsafe_mode function to panda.cc

* whoops

* use uint16_t
2020-10-28 13:21:07 -07:00
Adeeb Shihadeh 94991d9319 remove unused params function 2020-10-22 17:05:52 -07:00
Willem Melching 339d1967cb --std=c++17 (#2330)
* switch to c++17

* more 17

* 1z

* use std::clamp

* Fix types in clamp

* bump submodules

* bump laika

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2020-10-17 13:33:12 -07:00
Willem Melching 3dd9448981 Params path only in one place (#2344)
* fix params paths

* Qcom & qcom2

* This env variable is not used anywhere

* params path in only one place

* fix other PARAMS_PATH references

* absolute path is probably better
2020-10-15 13:15:22 +02: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
eFini ea81d36c41 white/grey/black pandas still have power ctrl function (#2308) 2020-10-12 13:58:36 +02:00
Willem Melching cfd16faad2 boardd always send can packet (#2307)
* boardd always send message

* Only log missed cycles when ignition is on

* Just clip, no completely different code paths
2020-10-09 12:45:43 +02:00
Willem Melching 8e0bb6a7ce Fix MacOS CI (#2145)
* compile flag for cython

* fix more setups

* bump cereal

* reenable mac build

* don't let that fail the build

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2020-10-04 15:03:20 -07:00
Adeeb Shihadeh ef21b83937 Improve realtime performance on NEOS (#2166)
* fix setting core affinity

* dmonitoringd doesn't need rt priority

* android only gets two cores

* model and planner get core 2

* log missed cycle count

* neos update

* prod image

* revert NEOS changes

* still need this
2020-09-16 15:33:12 -07:00
Willem Melching 855f52c3e0 hub is handled by systemd gpio service (#2172) 2020-09-16 17:58:46 +02:00
Dean Lee 9fa56b4eab more messagebuilder (#2162)
* more messagebuilder

* little more

* revert

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2020-09-13 13:00:06 -07:00
Adeeb Shihadeh 4d5733924a message builder (#2161)
* use custom MessageBuilder from cereal

* use MesageBuilder.toBytes

* bump cereal

* unused

* another one

* fix ui msg

Co-authored-by: deanlee <deanlee3@gmail.com>
2020-09-12 21:48:15 -07: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
Willem Melching 9eb3d89ca2 Thermald cleanup (#2049)
* Thermald cleanup

* no Temps, fix ui formatter

* Fix scaling

* Don't touch that

* typo

* Fix fan control

* Fix if

* change cereal

* Update comment
2020-08-24 14:17:41 +02:00
Willem Melching e03044530c boardd: return early from usb functions if not connected 2020-08-20 17:36:02 +02:00
robbederks c624b40842 more panda fault types (#2036) 2020-08-17 13:02:06 +02:00
robbederks 7555379b2b Car power integrator + power management refactor (#1994)
* wip, ready to test

* tweaks

* fix

* fix

* fix power monitoring

* fix param writing

* no forced charging on high voltage

* reset capacity on reboot

* don't shutdown unless started seen

* fix unused var warning

* fix linting errors

* time is always valid

* QCOM gate

* Local params

* decimate saving

* fix linting

* rename param

* Log car battery capacity

* fix put_nonblocking

* Added some unit tests

* Add test to docker test list

* fix precommit

* cleanup

* run tests in CI

* bump cereal

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2020-08-17 11:56:27 +02:00