![]() |
Can't use joystick when using two CAN Jaguars
We are currently only able to control one CAN Jaguar in our code. Adding a second CANJaguar object creates a problem where the joystick values are not getting read into the robot. Even with the second CANJaguar (called m_JaguarLeft below) only created and initialized (no methods being called on it), and the robot stops responding to the joystick. The joystick is seen by the drive station, and the values are being displayed on all of the appropriate views.
Code:
class Robot: public SampleRobot |
Re: Can't use joystick when using two CAN Jaguars
Does the driver-station still say teleop-enabled when the Jags are misbehaving?
If so then the problem is likely RIO <=> Jag, not Gamepad <=> RIO. Are the eclipse-plugins up-to-date 1/15/2016? Prolly not the issue but worth checking. What are the Jag LEDs doing when they are misbehaving. Be sure they both show up in the roboRIO web-based config okay. |
Re: Can't use joystick when using two CAN Jaguars
Replying from home, but same person (not on the team account).
Quote:
Quote:
Quote:
At one point we had the joystick axis values printing out to a log to check if the value was changing, but the joystick Y-axis remained at zero no mater where the actual joystick was. Again, the DS showed that the joystick moved, but the code was not seeing this change. |
Re: Can't use joystick when using two CAN Jaguars
We don't use the "SimpleRobot" framework (we instead use Command-Based robot), but I wonder if you're using up a resource (maybe CAN bandwidth?) by sending too many messages too quickly.
The rate of DS control packet updates is only 50Hz. I'd suggest changing the Wait(0.005) to Wait (0.02) and seeing if that helps. |
Re: Can't use joystick when using two CAN Jaguars
Thanks everyone the update to the library worked so now everything is running well
|
| All times are GMT -5. The time now is 09:14 AM. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi