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

Update handling of calibration data for PS4 controllers #363

Open
nitsch opened this issue Jul 27, 2018 · 1 comment
Open

Update handling of calibration data for PS4 controllers #363

nitsch opened this issue Jul 27, 2018 · 1 comment

Comments

@nitsch
Copy link
Collaborator

nitsch commented Jul 27, 2018

The HID report for retrieving calibration data (and probably the actual calibration data itself) has changed in the PS4 Move controller.

Since the raw calibration data is currently directly written to disk, this is a problem. We should probably save the data in a custom format that we can fill with data from the reports as needed.

@HipsterSloth
Copy link
Contributor

I was able to work around this in #372. Since the ZCM2 calibration data is smaller than the ZCM1 calibration data (two blocks instead of three) we can just write out the max buffer size (i.e. the ZCM1 calibration buffer size).

At runtime it doesn't matter that _PSMoveCalibration::usb_calibration is bigger than it needs to be for the ZCM2 calibration because the psmove_ZCM2_calibration_parse_usb and psmove_calibration_get_usb_accel_values parse functions pull the ZCM2 data correctly from the expected offsets. The calibration block on disk just has an extra 3rd block of zeros.

Now all that said, I can understand if you would still prefer to have a calibration buffer written to disk that exactly matches the fetched USB calibration buffer size. It wouldn't be that much more code to make that work. I can amend my PR to add that if you want.

@thp thp changed the title Update handling of calibration data Update handling of calibration data for PS4 controllers Jan 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants