|
Re: Programming help go foward but not reverse
you are turning it off
Code:
if (armjoy.GetRawButton(outtakeButton) == 1) {
roller.SetDirection(Relay::kForwardOnly);
roller.Set(Relay::kOn);
} else if (armjoy.GetRawButton(intakeButton) == 1) {
roller.SetDirection(Relay::kReverseOnly);
roller.Set(Relay::kOn);//not kOff
} else {
roller.Set(Relay::kOff);
}
if (armjoy.GetTrigger() == 1) {
winch.SetDirection(Relay::kForwardOnly);
winch.Set(Relay::kOn);
} else if (armjoy.GetRawButton(winchDownButton) == 1) {
winch.SetDirection(Relay::kReverseOnly);
winch.Set(Relay::kOn);//not kOff
} else {
winch.Set(Relay::kOff);
}
__________________
Bubble Wrap: programmers rewards
Watchdog.Kill();
printf("Watchdog is Dead, Celebrate!");
How to make a self aware robot: while (∞) cout<<(sqrt(-∞)/-0);
Previously FRC 451 (The Cat Attack)
Now part of the class of 2016 at WPI & helping on WPILib
|