2
0
mirror of https://github.com/team2059/Dent synced 2024-12-18 20:52:29 -05:00

removed half speed button

This commit is contained in:
Adam Long 2015-10-09 23:04:28 +00:00
parent 69e7efabf0
commit 65b09fdf33
3 changed files with 3 additions and 7 deletions

View File

@ -8,9 +8,6 @@ Lower::Lower(double timeout, bool useSoftLimits, double liftSpeed): Command("Low
}
void Lower::Initialize() {}
void Lower::Execute() {
if(DentRobot::oi->GetRightStick()->GetRawButton(11)){
speed*=0.5;
}
DentRobot::elevator->Run(speed);
}
bool Lower::IsFinished() {

View File

@ -8,9 +8,6 @@ Raise::Raise(double timeout, bool useSoftLimits, double liftSpeed): Command("Rai
}
void Raise::Initialize() {}
void Raise::Execute() {
if(DentRobot::oi->GetRightStick()->GetRawButton(11)){
speed*=0.5;
}
DentRobot::elevator->Run(speed);
}
bool Raise::IsFinished() {

4
OI.cpp
View File

@ -39,6 +39,7 @@ OI::OI() {
// Elevator
JoystickButton *right4 = new JoystickButton(rightStick, 4);
JoystickButton *right5 = new JoystickButton(rightStick, 5);
JoystickButton *right6 = new JoystickButton(rightStick, 6);
JoystickButton *right11 = new JoystickButton(rightStick, 11);
JoystickButton *right12 = new JoystickButton(rightStick, 12);
@ -46,7 +47,8 @@ OI::OI() {
right12->WhenPressed(new CloseArm(2));
//Full speed lift
right4->WhileHeld(new Lower(3.5,false,1));
right6->WhileHeld(new Raise(3.5,false,-1));
right5->WhileHeld(new Raise(3.5,false,0.5));
right6->WhileHeld(new Raise(3.5,false,-0.5));
}
Joystick* OI::GetRightStick() {
return rightStick;