Commit Graph

5 Commits (2c94f155840b49639b8bf1ec996d99e268fa9a52)

Author SHA1 Message Date
Adeeb Shihadeh 2c94f15584
linter: don't allow implicitly concatenated strings (#23513)
* linter: don't allow implicitly concatenated strings

* fix hyundai
2022-01-13 14:19:38 -08:00
Adeeb Shihadeh 7eca4d6207 tools: better joystick instructions 2022-01-10 12:03:27 -08:00
Cameron Clough 5a77157ea4
Joystick: learn axis min/max (#23377)
* Joystick: learn axis min/max

* clean up updating max/min

Co-authored-by: Willem Melching <willem.melching@gmail.com>
2022-01-04 14:17:30 +01:00
grekiki 6951b3271d
Python: Replace more lists with generators (#23116)
* Replace lists with generators v2

* Replace set with {}

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

* Replace more set() with {}

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-12-03 22:57:19 -08:00
ShaneSmiskol ae77f693a2
Fixup joystick (#21129)
* some common changes

* rename to joystick

* add alert and update controlsd to work with joystick

* update joystickd

* Update Joystick readme

* assume we have inputs

* only send gb or steer when engaged_toggle is true

* Update instructions

* fix --ip

* Easier to understand at a glance

* much better

* -a

* receive events and send msg in same loop

* always import

* Update selfdrive/controls/lib/events.py

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

* Update selfdrive/controls/lib/events.py

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

* combine logic and clean up

* use argparse

* outdated, and use normal class

* rm

* bit of a refactor

* refactor part 2 / 3

* much better (3 / 3)

* Simplify

* bump cereal and update readme

* capitalize

* Update tools/joystick/joystickd.py

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

* Update tools/joystick/joystickd.py

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

* make joystick abstraction class clearer

* use interp, clearer without comments

* no need to use apply_deadzone

* more explicit

* define btns and axes once

* split function by use_keyboard again, but simpler

* we can use handle_button as a reset function

* need to flip sign

* remove

* invert axes map for kb, easier to read the button mapping

* apply changes from review

* new lateral log for debug mode

* bump

* add saturated

* static alert

* joystick_mode

* conditionally subscribe

* Update selfdrive/controls/controlsd.py

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

* move params instantiation

* Spoof active and enabled

* Only allow car to engage

* no startup alert if joystick

* Update controlsd.py

* Should be orange not enabled, green enabled

* no more button states

* should work

* blue

* submaster conflates, so only send when we have an update

* final change

* remove msg

* clean up a bit

sort of clean up

clean up a bit

remove msg

* this was right

* Apply suggestions from code review

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

* lowercase

* suggestions from code review

* forgot laptop

* bump to latest

* fixes

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Co-authored-by: vanillagorillaa <31773928+vanillagorillaa@users.noreply.github.com>
2021-06-11 14:33:17 -07:00