Commit Graph

13 Commits

Author SHA1 Message Date
Sliicy
6ccf2cbfde Fixed joystickd.py incorrect steering control (#30879) 2024-01-01 14:29:01 -08:00
Kacper Rączy
6c62a31466 joystickd: remove WEB (#30612)
Remove WEB option from joystickd
2023-12-05 14:42:44 -08:00
Adeeb Shihadeh
a9626f95b6 add openpilot prefix to imports (#29498)
* add openpilot prefix to imports

* more

* more

* fix docs

* fix linter

* bump submodules

* fix patched tests

* update dynamic imports

* debug

* Revert "debug"

This reverts commit db5e13b9911cc74438bee123bc3430da6c31b24b.

* fix pm test
2023-08-20 20:49:55 -07:00
jp-solutionz
1d8fc4d21c joystickd: add controller mapping (#25986)
* Correct default controller mapping.

Current config maps steering to right trigger (ABS_RZ) when using a default xinput controller: https://inputs.readthedocs.io/en/latest/user/hardwaresupport.html

This results in default full left steering angle (1) requiring right trigger to return to centre (0) or right (-1).

It appears the intended mapping for steering is right thumbstick (ABS_RX).

Cancel button is also non-existent on default xinput controller. May be X button (BTN_NORTH) or Right Trigger (ABS_RZ).

Tested on Xbox One Controller via USB Cable, Logitech F710 and GameSir T4 Pro.

* Update joystickd.py

Fixed comment

* gamepad configuration

* gamepad arg

Co-authored-by: Cameron Clough <cameronjclough@gmail.com>
2022-10-12 20:48:22 -07:00
Adeeb Shihadeh
c6b749fb96 add pyside2 package (#25602) 2022-08-30 15:10:52 -07:00
Shane Smiskol
16fe10e128 joystick: revert max axes value (#25483)
revert this to 255
2022-08-18 23:34:48 -07:00
George Hotz
13e18b605a joystickd: add send thread 2022-04-18 22:35:19 -07:00
George Hotz
e9ef650901 joystickd: add WEB support, add logitech joystick support 2022-04-18 22:13:09 -07:00
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