Advertisement
Guest User

RobotC vexRT Bug

a guest
Sep 12th, 2014
273
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. typedef struct
  2. {
  3. TVexJoysticks upButton;
  4. TVexJoysticks downButton;
  5. } myStructType;
  6.  
  7. myStructType myStruct;
  8.  
  9. while (true)
  10. {
  11. myStruct.upButton = Btn8U;
  12. myStruct.downButton = Btn8D;
  13.  
  14. if (vexRT[myStruct.upButton])
  15. {
  16. //Do something
  17. }
  18. else if (vexRT[myStruct.downButton])
  19. {
  20. //Do something different
  21. }
  22. else
  23. {
  24. //Do nothing
  25. }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement