RobotC recently added a feature to their IDE where you can reassign the values of the following variables:
joystick.joy1_y1 joystick.joy1_x1 joystick.joy1_y2 joystick.joy1_x2 joystick.joy2_y1 joystick.joy2_x1 joystick.joy2_y2 joystick.joy2_x2
From the wizard in Window>Configure Joysticks, you can choose a controller and assign the value of one of these variables, say joystick.joy1_x1
, and set it to one of the values for another variable. joystick.joy1_x1
can be assigned to the value of the right y-axis and joystick.joy1_y2
can be assigned to the value of the left x-axis. At first glance, this feature seems rather unhelpful, but if you find that it’s easier to think of the right joystick being joy1
, then you can switch the values. It’s also helpful if you are using controllers that have joysticks with 3 axes of motion, you can make one of the existing variables be the left z-axis.
Although this could be useful, it will not be for FTC teams, because we may not use it due to the way the field control software works, but FRC teams may use it, making the world of 3-dimensional joysticks more easily accessible.