mirror of
https://github.com/team2059/Dent
synced 2024-12-18 20:52:29 -05:00
Tuning autonomous
This commit is contained in:
parent
57ef72d403
commit
c3e5b0cc5b
@ -34,12 +34,17 @@ Autonomous::Autonomous(int seq){
|
|||||||
printf("Done");
|
printf("Done");
|
||||||
AddSequential(new AutoDrive(SmartDashboard::GetNumber("Auto Tote Distance"), -0.75));
|
AddSequential(new AutoDrive(SmartDashboard::GetNumber("Auto Tote Distance"), -0.75));
|
||||||
AddSequential(new CollectTote());
|
AddSequential(new CollectTote());
|
||||||
|
AddSequential(new Raise());
|
||||||
AddSequential(new AutoDrive(SmartDashboard::GetNumber("Auto Tote Distance"), -0.75));
|
AddSequential(new AutoDrive(SmartDashboard::GetNumber("Auto Tote Distance"), -0.75));
|
||||||
AddSequential(new CollectTote());
|
AddSequential(new CollectTote());
|
||||||
|
AddSequential(new Lower());
|
||||||
|
AddSequential(new Raise());
|
||||||
printf("Three totes?: %d\n",SmartDashboard::GetBoolean("Three totes"));
|
printf("Three totes?: %d\n",SmartDashboard::GetBoolean("Three totes"));
|
||||||
if(SmartDashboard::GetBoolean("Three totes")){
|
if(SmartDashboard::GetBoolean("Three totes")){
|
||||||
AddSequential(new AutoDrive(SmartDashboard::GetNumber("Auto Tote Distance"), -0.75));
|
AddSequential(new AutoDrive(SmartDashboard::GetNumber("Auto Tote Distance"), -0.75));
|
||||||
AddSequential(new CollectTote());
|
AddSequential(new CollectTote());
|
||||||
|
AddSequential(new Lower());
|
||||||
|
AddSequential(new Raise());
|
||||||
}
|
}
|
||||||
AddSequential(new Turn(90));
|
AddSequential(new Turn(90));
|
||||||
AddSequential(new AutoDrive(SmartDashboard::GetNumber("Auto Zone Distance"), -0.75));
|
AddSequential(new AutoDrive(SmartDashboard::GetNumber("Auto Zone Distance"), -0.75));
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
Lower::Lower() : Command("Lower"){
|
Lower::Lower() : Command("Lower"){
|
||||||
}
|
}
|
||||||
void Lower::Initialize(){
|
void Lower::Initialize(){
|
||||||
SetTimeout(2.5);
|
SetTimeout(3.0);
|
||||||
}
|
}
|
||||||
void Lower::Execute(){
|
void Lower::Execute(){
|
||||||
DentRobot::elevator->Run(-1.0);
|
DentRobot::elevator->Run(-1.0);
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
Raise::Raise() : Command("Raise"){
|
Raise::Raise() : Command("Raise"){
|
||||||
}
|
}
|
||||||
void Raise::Initialize(){
|
void Raise::Initialize(){
|
||||||
SetTimeout(3.0);
|
SetTimeout(3.5);
|
||||||
}
|
}
|
||||||
void Raise::Execute(){
|
void Raise::Execute(){
|
||||||
DentRobot::elevator->Run(1.0);
|
DentRobot::elevator->Run(1.0);
|
||||||
|
@ -20,8 +20,8 @@
|
|||||||
#define BINELEVATOR_TOP_DIO 8
|
#define BINELEVATOR_TOP_DIO 8
|
||||||
#define BINELEVATOR_ENCODERA 10
|
#define BINELEVATOR_ENCODERA 10
|
||||||
#define BINELEVATOR_ENCODERB 11
|
#define BINELEVATOR_ENCODERB 11
|
||||||
#define BINELEVATOR_SOLDENOID_ONE 1
|
#define BINELEVATOR_SOLDENOID_ONE 6
|
||||||
#define BINELEVATOR_SOLDENOID_TWO 2
|
#define BINELEVATOR_SOLDENOID_TWO 7
|
||||||
|
|
||||||
// Drivetrain
|
// Drivetrain
|
||||||
#define DRIVE_FRONT_LEFT_CAN 2
|
#define DRIVE_FRONT_LEFT_CAN 2
|
||||||
|
Loading…
Reference in New Issue
Block a user