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

Data-driven gesture #6

Open
proppy opened this issue Jan 18, 2018 · 2 comments
Open

Data-driven gesture #6

proppy opened this issue Jan 18, 2018 · 2 comments

Comments

@proppy
Copy link

proppy commented Jan 18, 2018

Currently most of the gesture are hardcoded in https://github.com/Deeplocal/android-things-handbot/blob/master/app/src/main/java/com/example/sewl/androidthingssample/HandController.java as a series of functions call that translate to fixed angle for the servo controller:
https://github.com/Deeplocal/android-things-handbot/blob/master/app/src/main/java/com/example/sewl/androidthingssample/FingerController.java#L37
https://github.com/Deeplocal/android-things-handbot/blob/master/app/src/main/java/com/example/sewl/androidthingssample/ForearmController.java#L40

Instead you may want to consider encoded the gesture as data resources, so that it's more convenient to add new one without editing any code?

@proppy proppy changed the title Gesture data Data-driven gesture Jan 18, 2018
@sewl-dl
Copy link
Contributor

sewl-dl commented Jan 19, 2018

@proppy -- I really like this in theory, but as soon as I started refactoring, I realized you would still need to make code changes to map the current game state to the new action (since wrist and forearm actions are specific to to the sign and game you're in). Not a huge deal, but as soon as I started writing the mapping I started to feel like it was getting a little convoluted.

@proppy
Copy link
Author

proppy commented Jan 31, 2018

since wrist and forearm actions are specific to to the sign and game you're in

couldn't that be solved with another mapping from actions to gesture per game?

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