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

buttons? #4

Open
fabriofabrio opened this issue Jan 12, 2023 · 2 comments
Open

buttons? #4

fabriofabrio opened this issue Jan 12, 2023 · 2 comments

Comments

@fabriofabrio
Copy link

so

I have add this instructions in loop code

          Serial.print("LeftX ");Serial.print(LastestState.LeftX); 
          Serial.print("LeftY ");Serial.print(LastestState.LeftY);  
          Serial.print("Right X");Serial.print(LastestState.RightX);  
          Serial.print("Right Y"); Serial.println(LastestState.RightY);

// Serial.print("square ");Serial.print(LastestState.square);
// Serial.print("cross ");Serial.print(LastestState.cross);
// Serial.print("circle ");Serial.print(LastestState.circle);
// Serial.print("triangle "); Serial.println(LastestState.RightY);
// Serial.print("l1 ");Serial.print(LastestState.l1 : 1);
// Serial.print("r1 ");Serial.print(LastestState.r1);
// Serial.print("l2 ");Serial.print(LastestState.l2);

work fine for the analog parts, but if I decommenting the buttons the compiler return error beacouse do not recognize the references buttons.

any ideas?
thank you

@fabriofabrio
Copy link
Author

like this

Serial.print("l2 ");Serial.print(LastestState.l2);
^~
exit status 1
'struct DS4DataExt' has no member named 'l2'

@fabriofabrio
Copy link
Author

Solved:

Serial.print(LastestState.Buttons.l2)

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