Commit Graph

172 Commits

Author SHA1 Message Date
robbederks b13f6b4288 also shutdown on tici (#20130)
old-commit-hash: 35b43d2084e78724a4faff60ad91e84a361e630c
2021-02-22 15:46:22 +01:00
Adeeb Shihadeh 05eb44115e cereal cleanup part 2 (#20092)
* car stuff

* thermal

* Revert "car stuff"

This reverts commit 77fd1c65ebd01abfa8493ae12c9e6b14f7ada976.

* panda state

* camera stuff

* start deg

* most is building

* builds

* planner + controls run

* fix up paramsd

* cleanup

* process replay passes

* fix webcam build

* camerad

* no more frame

* thermald

* ui

* paramsd

* camera replay

* fix long tests

* fix camerad tests

* maxSteeringAngle

* bump cereal

* more frame

* cereal master
old-commit-hash: 312b681a46b8153314a8420611b6479dd6f70dfc
2021-02-16 21:39:32 -08:00
Adeeb Shihadeh 829ab2dff3 fanSpeedRpmDesired -> fanSpeedPercentDesired
old-commit-hash: 4ace476f14bb73c354234c6bbedbc4ea0bf2d402
2021-02-11 17:00:26 -08:00
Dean Lee 31a811ca45 boardd: check do_exit in usb_retry_connect (#20007)
old-commit-hash: 2a935a2010a2ffb2ef3a35b1e49fdab8ef1dc10a
2021-02-08 12:01:12 +01:00
Adeeb Shihadeh 966945880b Cereal cleanup (#20003)
* start cleanup

* fan speed

* cleanup dm

* fix cereal

* hwType -> pandaType

* update refs

* update refs

* bump cereal

* freeSpacePercent

* cereal master
old-commit-hash: 000bd226aa9902da01e6010bf26762fca2c20df0
2021-02-03 19:57:30 -08:00
robbederks 8156542312 implement ublox MON_HW2 message (#19962)
* implement MON_HW2 message

* didn't mean to remove this
old-commit-hash: 99d58193e497385b925a215f42b8bc470e328da4
2021-02-03 13:09:44 +01:00
Dean Lee 0346652a66 move global connected_once into function static (#19999)
old-commit-hash: 13ea8b5fc9e7742eea4b1b2e0e036b12e0cdce6a
2021-02-02 14:39:19 +01:00
Dean Lee 04adbaf8e1 Don't call function in assert (#19997)
old-commit-hash: 91504176e403ca1bb6bd9491ce9e2075b7f4bae0
2021-02-02 13:18:11 +01:00
Dean Lee 6a04e4c06a Pigeon::receive: reserve 4kb+64b for std::string (#19951)
* receive: reserve 4kb+64b for std::string

* fix bug
old-commit-hash: b06da518924b5b44becbe681ca86ed6c01e802b2
2021-02-01 16:22:16 +01:00
Robbe Derks 5b221a0a32 Add back replay_many script for unlogging over jungles
old-commit-hash: 935b9ceb05418e5c6e78b7c556a0d6469d3b5f3c
2021-02-01 15:54:19 +01:00
Dean Lee 11defbb77f pigeon_thread: ensure the pigeon->init() will not be called twice (#19963)
* ensure init is not called twice

* add space
old-commit-hash: 3fde3a5f7d924062d47ebe934af1865e43a08dc9
2021-01-31 12:55:11 -08:00
Dean Lee 2162aae01b pigeon_publish_raw: use capnp::Data::Reader instead of Builder (#19952)
old-commit-hash: b0c8ce486394f010bd031b9f22f6e0679aeed5a4
2021-01-30 19:16:21 -08:00
Dean Lee 6bd51543e5 boardd: remove global variables spoofing_started&fake_send (#19966)
old-commit-hash: 4d6584a315f172b62463ad64393624f81d61066a
2021-01-31 00:02:03 +01:00
Dean Lee 35fe949cd8 fix panda: remove uninitialized err and check after (#19974)
old-commit-hash: edc2b3f67c561f1a44195a7a07e631a30e4d7747
2021-01-30 23:59:49 +01:00
Dean Lee 760b707597 boardd: refactor usb_connect, delete panda on failure (#19956)
old-commit-hash: dd3a2606765e51631034677df81b1513a74d503a
2021-01-29 13:10:56 +01:00
Dean Lee 53957eec3f Panda: add check for connected in usb_read (#19957)
old-commit-hash: c723bbd6be642ab939fa183fb065fc4928069b3c
2021-01-29 13:00:49 +01:00
Dean Lee 41368ada11 Panda: use 'std::atomic<bool> connected' to ensure thread-safety (#19954)
old-commit-hash: 0b75a85adc951f9d0e0e42fbece54d83e078395e
2021-01-28 11:35:13 -08:00
Dean Lee 24ffdd6183 Panda: refactor get_firmware_version, return std::optional<std::vector> (#19896)
Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: c4215d8476219cca33f85adc5ce0a425891c62c5
2021-01-28 16:25:05 +01:00
Dean Lee 7194e5926e panda: refactor get_serial, return std::optional<std::string> (#19895)
old-commit-hash: 96cc633d915caf5fd5a8eeee196db55ca8277c91
2021-01-28 16:21:18 +01:00
Adeeb Shihadeh f2ad4e28a6 remove legacy reset line support (#19770)
old-commit-hash: 8c31ab3cee7c2f3a4b91c223aa5c0eedae533fe6
2021-01-27 14:19:49 +01:00
Adeeb Shihadeh 2e946df700 actually wait for boardd to start
old-commit-hash: 6e70baa3063dde55056f0dfc2ed1540e4fe79f44
2021-01-26 15:09:09 -08:00
Dean Lee 2f3ae6ba78 fix indentation (#19925)
old-commit-hash: 511bad6a9ffea248dce81631fb58b3d020a4117b
2021-01-26 14:43:37 -08:00
Adeeb Shihadeh dc32aa52a8 wait for pandad to start boardd
old-commit-hash: 144227d3d3901544ac068eb70b469d006179dabe
2021-01-26 13:39:15 -08:00
Adeeb Shihadeh 256d586d6c fix boardd loopback test after #19880
old-commit-hash: 59f4ea9fe57b367a84ffd7906aceeb12a5ccccd1
2021-01-26 12:12:10 -08:00
Dean Lee 7dc1f76057 TTYPigeon::send : delete unnecessary temporary variables (#19898)
Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: 4ac08ce05ec645704befa84c7fb662f36f3ccdef
2021-01-26 17:33:53 +01:00
Dean Lee b16842b512 boardd: use setUbloxRaw to avoid memory alloc&copy in pigeon_publish_raw (#19884)
* use setUbloxRaw to avoid memory copy

* const std::string &dat
old-commit-hash: 0f8b5db8cefdd53c06ffd4867b8915d12f6e4603
2021-01-26 17:21:02 +01:00
Dean Lee faa4640ffe can_list_to_can_capnp_cpp: write message directly to the output string (#19912)
old-commit-hash: d17a5195e7f38a00364b38eeb1066dfd7484dba3
2021-01-26 17:18:02 +01:00
Dean Lee 06b8f1042b Panda: add can_send buffer caching (#19910)
old-commit-hash: 5c58a2618eed043bca9e1b5a2b8303756663cca1
2021-01-26 17:10:53 +01:00
Dean Lee c8935f44a1 Fix panda: dangling pointer problem in can_receive (#19892)
* refactor can_receive

* still send empty msg
old-commit-hash: b0c0de5b668ff5dbb4d1bf8e212d6136b77c162b
2021-01-26 16:04:38 +01:00
Dean Lee fe457a93d5 Panda: replace pthread_mutex with std::mutex (#19909)
old-commit-hash: 5594b8f3cbf908214d8a72ac15be25e29836c39d
2021-01-26 14:57:55 +01:00
Dean Lee 6f8e6a8d73 pigeon: use const reference for std::string parameter (#19886)
old-commit-hash: b1660cf585278a65ec439ad8152cc8969797001a
2021-01-25 20:48:24 -08:00
Dean Lee c1e97c00bb boardd: use std::atomic for ignition to ensure thread-safety (#19882)
old-commit-hash: 83003bdeac6ff082124b3e5a2f1fdda2644cb228
2021-01-22 15:26:27 -08:00
Dean Lee daf160a27c boardd: declare MessageBuilder close to usage (#19883)
old-commit-hash: 2df9736bb260b4efa1661d678395f630a0c4f407
2021-01-22 15:25:54 -08:00
Adeeb Shihadeh 0e78d18950 better can replay script
old-commit-hash: e6478c6b35db1707cebe21a75df9ffa816b6c313
2021-01-14 17:49:17 -08:00
Dean Lee 4c1919f41e merge utilpp.h into util.h (#19710)
old-commit-hash: 595830135bb79c8b23eb8339ae768ca7b6a822f8
2021-01-10 14:57:32 -08:00
Willem Melching bd9b1eb62f Fix battery voltage reading (#19699)
* tici: correct battery voltage

* read current

* use current too
old-commit-hash: 0cdb9e86583e4a7997a65bab0f785b2bf9311287
2021-01-08 17:21:58 +01:00
Dean Lee 5e557ed96d 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
old-commit-hash: 86fe2d1697531bebdf5d0d83609e91ed4006f54b
2021-01-05 20:19:53 -08:00
Adeeb Shihadeh d89bb8b29c setup clang tidy (#19533)
* setup clang tidy

* config

* some cleanup

* little more

* remove that

* fix qcom build
old-commit-hash: 87950eb3127e175f0f2b0bb42440f5350c679369
2021-01-05 12:50:23 -08:00
Dean Lee bbfb751d69 Replace usleep with util::sleep_for (#19643)
* replace usleep with sleep_for

* sleep microseconds

* sleep nanoseconds

* Trigger Build
old-commit-hash: c1cf0882bd4e0fce5e1a581536f6a0e7afb640e6
2021-01-04 18:03:11 +01:00
Adeeb Shihadeh 5bbe4f3d52 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>
old-commit-hash: ffa7e0cbdb0859751685caae1321d3ccf732fed9
2020-12-29 22:32:03 -08:00
robbederks 0fe9e3adf6 Don't re-init pigeon while offroad (#2687)
* don't re-init pigeon while offroad

* we don't need this
old-commit-hash: 80dbda534218dec02d7530c8131afe840be49bd0
2020-12-03 17:54:46 +01:00
robbederks c038a38f88 add legacy reset line support (#2625)
* add legacy reset line support

* clean up names

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

* Also update thermald
old-commit-hash: ff65dc1401681ca71f6449c5e059eb7a2fb2256c
2020-11-20 11:47:39 +01:00
grekiki 0b902a02c1 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>
old-commit-hash: 9529764549b8c59f7cf141ff3d2d9613ab53beab
2020-11-11 21:14:51 +01:00
Adeeb Shihadeh 3a05f06ced Qt spinner (#2494)
* move android spinner

* qt spinner

* rotation

* nothing by default

* spin spin

* fix rotate

* style

* spinner for all

* -2

* unused
old-commit-hash: 6c86afee16c706a3c8e787d576ead509373e6b55
2020-11-06 18:44:04 -08:00
Shane Smiskol 2b9b7182d8 Abstract set_unsafe_mode function to Panda (#2431)
* Abstract set_unsafe_mode function to panda.cc

* whoops

* use uint16_t
old-commit-hash: 5eea86cbf4da41b43f1d79c76689d49f8ffbde51
2020-10-28 13:21:07 -07:00
Adeeb Shihadeh cbafcbcc3c remove unused params function
old-commit-hash: 94991d9319bb96dd5b481a68afb3dffc1f1bc4f5
2020-10-22 17:05:52 -07:00
Willem Melching 651d4ce031 --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>
old-commit-hash: 339d1967cb1e8ca73aeb1f0066a23b0933706ae5
2020-10-17 13:33:12 -07:00
Willem Melching 789d5176cb 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
old-commit-hash: 3dd944898183be0ecf985f389d462e53c3feb8e5
2020-10-15 13:15:22 +02:00
Willem Melching 498ecbdf3c 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>
old-commit-hash: 2e182e5c574ea1468678b5fd8d0597e34ed5898d
2020-10-13 16:23:23 +02:00