mirror of
https://github.com/team2059/Dent
synced 2024-12-18 20:52:29 -05:00
Fixed drivetrain locking
This commit is contained in:
parent
095114b3a2
commit
32834cc28b
@ -9,14 +9,15 @@ void Drive::Initialize(){
|
||||
void Drive::Execute(){
|
||||
double x,y,z;
|
||||
//Code to lock the x axis when not holding button 1
|
||||
if (DentRobot::oi->GetLeftStick()->GetRawButton(1)){
|
||||
x = DentRobot::oi->GetLeftStick()->GetRawAxis(0);
|
||||
x /= 1.3;
|
||||
}else{
|
||||
x = 0;
|
||||
}
|
||||
x = DentRobot::oi->GetLeftStick()->GetRawAxis(0);
|
||||
z = DentRobot::oi->GetLeftStick()->GetRawAxis(2);
|
||||
y = DentRobot::oi->GetLeftStick()->GetRawAxis(1);
|
||||
if (DentRobot::oi->GetLeftStick()->GetRawButton(1)){
|
||||
x=0;
|
||||
}
|
||||
if (DentRobot::oi->GetLeftStick()->GetRawButton(2)){
|
||||
y=0;
|
||||
}
|
||||
if (DentRobot::oi->GetLeftStick()->GetRawAxis(3)<=0.5){
|
||||
y /= 2;
|
||||
z /= 2;
|
||||
|
Loading…
Reference in New Issue
Block a user