|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Toggle Speed adjustment Help
I'm just tank drive with a Xbox controller, i want to make it so when i press one of the two triggers it will make a limit the speed of the robot.
My code : Quote:
|
|
#2
|
|||||
|
|||||
|
Re: Toggle Speed adjustment Help
I'm not familiar with C++, but in general, one can simply multiply the joystick values by a constant, if the button is pressed, before feeding it to the drive.
|
|
#3
|
|||||
|
|||||
|
Re: Toggle Speed adjustment Help
Read the raw joystick values into temporary variables. If the button is pressed, multiply the values by something less than one. Feed those variables into the TankDrive function.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|