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:
parent
2a3ddd6041
commit
05d755f87b
@ -11,7 +11,7 @@ void RollIn::Execute(){
|
|||||||
if(cvt>=1.0){
|
if(cvt>=1.0){
|
||||||
DentRobot::collector->MoveRollers(1.0);
|
DentRobot::collector->MoveRollers(1.0);
|
||||||
}else{
|
}else{
|
||||||
DentRobot::collector->MoveRollers(cvt);
|
DentRobot::collector->MoveRollers(cvt*1.5);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
bool RollIn::IsFinished(){
|
bool RollIn::IsFinished(){
|
||||||
|
@ -42,6 +42,8 @@ void DentRobot::RobotInit(){
|
|||||||
SmartDashboard::PutBoolean("Bin Elevator Top", false);
|
SmartDashboard::PutBoolean("Bin Elevator Top", false);
|
||||||
SmartDashboard::PutBoolean("Elevator Bottom", false);
|
SmartDashboard::PutBoolean("Elevator Bottom", false);
|
||||||
SmartDashboard::PutBoolean("Elevator Top", false);
|
SmartDashboard::PutBoolean("Elevator Top", false);
|
||||||
|
//Drive speed
|
||||||
|
SmartDashboard::PutNumber("DriveSpeedReductionThresh",2);
|
||||||
}
|
}
|
||||||
void DentRobot::DisabledPeriodic(){
|
void DentRobot::DisabledPeriodic(){
|
||||||
Scheduler::GetInstance()->Run();
|
Scheduler::GetInstance()->Run();
|
||||||
|
@ -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 correctY = (sensitivity*(pow(y,3))+(1-sensitivity)*y);
|
||||||
double correctX = -(sensitivity*(pow(x,3))+(1-sensitivity)*x);
|
double correctX = -(sensitivity*(pow(x,3))+(1-sensitivity)*x);
|
||||||
double correctZ = -z *.5;
|
double correctZ = -z *.5;
|
||||||
|
if (DentRobot::oi->GetRightStick()->GetRawButton(9)){
|
||||||
|
correctY /= SmartDashboard::GetNumber("DriveSpeedReductionThresh");
|
||||||
|
}
|
||||||
rightFront->Set((-correctX + correctY - correctZ));
|
rightFront->Set((-correctX + correctY - correctZ));
|
||||||
leftFront->Set((correctX + correctY + correctZ)*-1);
|
leftFront->Set((correctX + correctY + correctZ)*-1);
|
||||||
rightRear->Set((correctX + correctY - correctZ));
|
rightRear->Set((correctX + correctY - correctZ));
|
||||||
|
Loading…
Reference in New Issue
Block a user