|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#7
|
|||
|
|||
|
Re: Is my Java code ok?
Won't this only work if I move the stick up? Shouldn't I need both > and < .1 if I'd like to both increase and decrease
Example of what I mean: Code:
if (Math.abs(xboxController.getRawAxis(5)) > .1) {
//set your motor output to the axis value
slideMotor.set(xboxController.getRawAxis(5));
}else if (Math.abs(xboxController.getRawAxis(5)) < .1 {
slideMotor.set(xboxController.getRawAxis(5));
}
|
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|