mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-07-13 13:32:06 +08:00
baac950325
Wrap the pygame import in a try-except block to catch ImportError. This prevents the script from crashing and provides a clear message prompting the user to install pygame if it's missing. Remove "inputs" package and update "pygame" dependency The "inputs" package has been removed from the lockfile and dependency list, while "pygame" is now included universally without the "dev" extra marker. This change simplifies dependencies and ensures consistency across environments. Update dependencies: replace 'inputs' with 'pygame' Replaced the 'inputs' library with 'pygame' for joystickd dependencies in `pyproject.toml`. Additionally, removed a redundant 'pygame' entry from the general dependencies. Ugly, I know, but soundd is unhappy with joystick Allowing lat with mads Invert steering input for joystick control The steering axis input is now multiplied by -1 to reverse its direction. This ensures correct handling of the left stick's horizontal input, aligning behavior with expected control dynamics. Refactor joystick control to use pygame for broader support Replaced the `inputs` library with `pygame` for joystick handling, providing improved compatibility with Xbox and PlayStation controllers. Added initialization, adaptive mappings, deadzone handling, and enhanced event processing for robust joystick operation. Updated README with dependencies and usage information for Xbox controllers.