mirror of
https://github.com/team2059/Dent
synced 2024-12-18 20:52:29 -05:00
Added independent speed control for collector motors
This commit is contained in:
parent
a440280b82
commit
76e282b413
@ -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,8 +22,12 @@ void Drive::Execute(){
|
||||
x = -x;
|
||||
y = -y;
|
||||
}
|
||||
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