
TETRIX Remote Control Buttons - Information
In ROBOTC 2.01, the behaviors of the Joy1Btn and Joy2Btn functions have been changed.
In previous versions, these functions would return the individual bit-mask value of the buttons. This means that following buttons would return the following values:
Button 1 = 1
Button 2 = 2
Button 3 = 4
Button 4 = 8
etc.
Because of this, most common usage of this function would be something like this:
Which isn't always very intuitive.
To make this simpler, we added some bit logic to reduce all button values to return a "1" when the button is pressed. So now that means...
Button 1 = 1
Button 2 = 1
Button 3 = 1
Button 4 = 1
etc.
For those who like to see things behind the scenes, lines 83-86 from the JoystickInclude.c file shows how this works:
I hope this provides some clarification on button usage. If not, please post in this topic and we'll try and update this post to provide clearer information.
_________________Timothy Friez
ROBOTC Developer - SW Engineer
tfriez@robotc.net