Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(Legion Go S): Add Legion Go S Support #265

Merged
merged 3 commits into from
Jan 24, 2025
Merged

feat(Legion Go S): Add Legion Go S Support #265

merged 3 commits into from
Jan 24, 2025

Conversation

pastaq
Copy link
Contributor

@pastaq pastaq commented Jan 23, 2025

  • Adds Initial support for the Legion Go S

TODO:

  • The touchpad uses REL values instead of ABS values. Everything is plumbed for this to work, but commented out for now.
  • The buffer for the go s driver gets filled with the same garbage data when the gyro/accel hidraw interface is grabbed. Since the XInputDataReport for the gamepad doesn't have a report_id, this data can't be filtered out normally. Using hid-recorder to track all hid reports from both interfaces shows that this data doesn't come from the hidraw interface directly. For now I have a workaround to look for the bad data packet (which is consistent and may be an output report?).

Copy link
Contributor

@ShadowApex ShadowApex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few small things to fix and some nitpicks, but other than that, this looks good! 👍

@pastaq
Copy link
Contributor Author

pastaq commented Jan 24, 2025

I'm not sure why my clippy isn't showing the same suggestions. Please review that I didn't miss anything since I'm getting no warnings on my end except the Touchpad events not used..

- Adds reading IMU data from MCU interface 5. This device polls at 1000Hz and provides all 3 axis for each interial measurement in a single report.
- While at it, performs cleanup of unused event types and remanes many others to be simpler. The more complex names aren't needed for Go S as it doesn't have as many interfaces as the Go.
- Adds basic support for the touchpad. X/Y events are disabled until a firmware update can enable ABS values instead of REL values.
@pastaq pastaq merged commit 7d42f70 into main Jan 24, 2025
2 checks passed
@pastaq pastaq deleted the pastaq/lego_s branch January 24, 2025 02:10
Copy link

🎉 This PR is included in version 0.42.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants