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

Look into python asyncio/callback functions #260

Open
adangert opened this issue Jan 5, 2021 · 3 comments
Open

Look into python asyncio/callback functions #260

adangert opened this issue Jan 5, 2021 · 3 comments

Comments

@adangert
Copy link
Owner

adangert commented Jan 5, 2021

Currently each controller gets it's own process but the logic loop is as follows:
get controller reading
do game logic
ect.....

instead with async or callback functions we can do as follows:
do game logic
(new sensor reading come in)
process sensor reading
continue to do game logic until new sensor reading ect..

This paradigm should make things much smoother especially when paired with an EKF as well.

@adangert
Copy link
Owner Author

adangert commented Jan 5, 2021

Need to process both frames for faster and better response:
https://github.com/thp/psmoveapi/blob/85d7eadcf818f34163e2ff23556f06934d9643d8/include/psmove.h#L170

@adangert
Copy link
Owner Author

adangert commented Jan 5, 2021

currently joustmania uses if move.poll():
which I believe is only using the most up to date data, we should update this to use while move.poll(): to get all data from the controllers

@adangert
Copy link
Owner Author

adangert commented Jan 5, 2021

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

1 participant