|
Re: how to toggle motors in c++ using buttons
If you can post your entire code (or just the teleoperated part) that will help.
I imagine the problem is what Poseidon said, your Robot object's TankDrive() method is taking priority over your code.
The code that you posted SHOULD be working,(when the trigger is pressed on the joystick, the Talon moves the motor at full speed), assuming everything is initialized properly and the robot class isn't using those Talons for tank drive.
__________________
1771- Programmer, Captain, Drive Team (2009-2012)
4509- Mentor (2013-2015)
1771- Mentor (2015)
|