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

Joystick POV returns only 0.0 or 1.0 #2

Open
miguelbarros opened this issue Nov 29, 2010 · 3 comments
Open

Joystick POV returns only 0.0 or 1.0 #2

miguelbarros opened this issue Nov 29, 2010 · 3 comments

Comments

@miguelbarros
Copy link
Contributor

The method "CalculatePOVValue" on the JoystickInput class returns 0 or 1.0. Shouldn't it return the angle of the POV (in degrees) that is, the value of the POV divided by 100?

@theone1984
Copy link
Contributor

AFAIK, the POV returns only one of the values given in JoystickInput.cs, for it is a "simple" 9-way button.

But correct me if I'm wrong.

@miguelbarros
Copy link
Contributor Author

the POV returns nine possible values:

-1 when the nothing is being pressed
or
0,45000,90000,135000,180000,225000,270000,315000

These last values represent the angle in degrees where the button is pointing (north is zero, east is 90 degress, etc.).

I dug a little more to understand the reason behind this. It happens that in the application the POV is being used to raise or lower the drone - hence, only two values are actually used. However i think that this should be done by some kind of mapping somewhere in the UI or the controller - and not by limiting the values returned by the joystick "driver".

@shtejv
Copy link
Owner

shtejv commented Dec 2, 2010

OK, now I see what you want to do ... we could use all the values, that's right

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

3 participants