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

added half speed and increased collector speed

This commit is contained in:
Adam Long 2015-02-28 07:22:43 +00:00
parent 2a3ddd6041
commit 05d755f87b
3 changed files with 6 additions and 1 deletions

View File

@ -11,7 +11,7 @@ void RollIn::Execute(){
if(cvt>=1.0){
DentRobot::collector->MoveRollers(1.0);
}else{
DentRobot::collector->MoveRollers(cvt);
DentRobot::collector->MoveRollers(cvt*1.5);
}
}
bool RollIn::IsFinished(){

View File

@ -42,6 +42,8 @@ void DentRobot::RobotInit(){
SmartDashboard::PutBoolean("Bin Elevator Top", false);
SmartDashboard::PutBoolean("Elevator Bottom", false);
SmartDashboard::PutBoolean("Elevator Top", false);
//Drive speed
SmartDashboard::PutNumber("DriveSpeedReductionThresh",2);
}
void DentRobot::DisabledPeriodic(){
Scheduler::GetInstance()->Run();

View File

@ -15,6 +15,9 @@ void Drivetrain::DriveMecanum(float x, float y, float z, float sensitivity, floa
double correctY = (sensitivity*(pow(y,3))+(1-sensitivity)*y);
double correctX = -(sensitivity*(pow(x,3))+(1-sensitivity)*x);
double correctZ = -z *.5;
if (DentRobot::oi->GetRightStick()->GetRawButton(9)){
correctY /= SmartDashboard::GetNumber("DriveSpeedReductionThresh");
}
rightFront->Set((-correctX + correctY - correctZ));
leftFront->Set((correctX + correctY + correctZ)*-1);
rightRear->Set((correctX + correctY - correctZ));