-
Notifications
You must be signed in to change notification settings - Fork 196
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
Fix WinMR config read by retrying also tidy c file #246
base: master
Are you sure you want to change the base?
Conversation
Since this is based on master and not dev-wmr, i will test this for merge into the 0.3 branch to mark for bugfix release. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Retry is fine to make it work, although I'd like to understand what happens there. Is it just failing randomly, or are we consistently asking for the config too early?
int size = hid_read(priv->hmd_imu, buffer, FEATURE_BUFFER_SIZE); | ||
if(size < 0){ | ||
if(size < 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (size < 0)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch :)
free(priv); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like this very much, being used to kernel coding style. But if we are going to make this a rule I'm ok with it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair enough, that's deffo a me:ism :)
Hi, I have tried this, I would recommend to double the wait time after each retry and have more retry. On first try, I may need to restart the program for it to work the second time. When connecting the hmd, it takes a certain time to boot up. So extending the wait time to a few minutes could be a good idea. Here output of opengl when freshly plugged (like about 15s ?).
When it works this is the output :
|
No description provided.