mirror of
https://github.com/team2059/Dent
synced 2024-12-18 20:52:29 -05:00
Merge branch 'develop' into feature/ps3
This commit is contained in:
commit
987cba8bc1
@ -8,9 +8,8 @@ void RollVar::Initialize(){
|
||||
Requires(DentRobot::drivetrain);
|
||||
}
|
||||
void RollVar::Execute(){
|
||||
DentRobot::collector->MoveRollers(DentRobot::oi->GetLeftThrottle() * 1.0);
|
||||
DentRobot::collector->MoveLeftRoller(speed*DentRobot::oi->GetLeftStick()->GetRawAxis(2));
|
||||
DentRobot::collector->MoveRightRoller(speed*-DentRobot::oi->GetLeftStick()->GetRawAxis(2));
|
||||
DentRobot::collector->MoveLeftRoller(1-(speed*(DentRobot::oi->GetLeftStick()->GetRawAxis(2)+1)/2));
|
||||
DentRobot::collector->MoveRightRoller(-(speed*(DentRobot::oi->GetLeftStick()->GetRawAxis(2)+1)/2));
|
||||
DentRobot::collector->MoveBottomRollers(speed*1.0);
|
||||
}
|
||||
bool RollVar::IsFinished(){
|
||||
|
@ -22,7 +22,11 @@ void Drive::Execute(){
|
||||
x = -x;
|
||||
y = -y;
|
||||
}
|
||||
DentRobot::drivetrain->DriveMecanum(x, y, z, 0.9);
|
||||
if(DentRobot::oi->GetLeftStick()->GetRawButton(7)){
|
||||
DentRobot::drivetrain->DriveMecanum(0.0, 0.0, 0.0, 0.9);
|
||||
}else{
|
||||
DentRobot::drivetrain->DriveMecanum(x, y, z, 0.9);
|
||||
}
|
||||
}
|
||||
bool Drive::IsFinished(){
|
||||
return IsTimedOut();
|
||||
|
Loading…
Reference in New Issue
Block a user