diff --git a/Commands/Collector/RollVar.cpp b/Commands/Collector/RollVar.cpp index 62c1572..5066bf1 100644 --- a/Commands/Collector/RollVar.cpp +++ b/Commands/Collector/RollVar.cpp @@ -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(){ diff --git a/Commands/Drivetrain/Drive.cpp b/Commands/Drivetrain/Drive.cpp index 93d0e44..a4717ff 100644 --- a/Commands/Drivetrain/Drive.cpp +++ b/Commands/Drivetrain/Drive.cpp @@ -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();