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

Preparing for releaes v2.1

This commit is contained in:
Austen Adler 2015-03-22 14:29:07 -04:00
parent 76e282b413
commit 3de6e0023c
7 changed files with 19 additions and 11 deletions

View File

@ -71,19 +71,19 @@ Autonomous::Autonomous(int seq){
//TODO: Implement this //TODO: Implement this
break; break;
case 7: case 7:
// Same as auto 4 with (Three|Two) totes checked, collect bin, drive to Auto Zone (TM), release totes // Same as auto 4, then collect bin, drive to Auto Zone (TM), release totes
//TODO: Implement this //TODO: Implement this
break; break;
case 8: case 8:
//Use rear elevator to move tote //Use rear elevator to move tote
AddSequential(new Turn(1.8)); AddSequential(new Turn(1.8));
AddSequential(new AutoDrive(2.3,0.0,-0.75)); AddSequential(new AutoDrive(2.3, 0.0, -0.75));
AddSequential(new Turn(1.8)); AddSequential(new Turn(1.8));
break; break;
case 9: case 9:
//Use rear elevator to move bin //Use rear elevator to move bin
AddSequential(new BinLower(.1)); AddSequential(new BinLower(0.1));
AddSequential(new AutoDrive(SmartDashboard::GetNumber("Auto Zone Distance"),0.0,0.75)); AddSequential(new AutoDrive(SmartDashboard::GetNumber("Auto Zone Distance"), 0.0, 0.75));
AddSequential(new Turn(2.1)); AddSequential(new Turn(2.1));
break; break;
default: default:

View File

@ -19,6 +19,18 @@
* Sequence 2: Collects a tote, turns, then drives to the auto zone * Sequence 2: Collects a tote, turns, then drives to the auto zone
* *
* Sequence 3: Collects two or three totes then drives to auto zone * Sequence 3: Collects two or three totes then drives to auto zone
*
* Sequence 4: Collect one, two, or three totes, drive to Auto Zone, release totes
*
* Sequence 5: Same as auto 4, but navigate around bins (not implemented)
*
* Sequence 6: Collect 1 bin and 1 tote (not implemented)
*
* Sequence 7: Same as auto 4, then collect bin, drive to auto zone, release totes (not implemented)
*
* Sequence 8: Use rear elevator to move tote
*
* Sequence 9: Use rear elevator to move bin
*/ */
class Autonomous: public CommandGroup{ class Autonomous: public CommandGroup{
public: public:

View File

@ -5,7 +5,7 @@
#include "WPILib.h" #include "WPILib.h"
/** /**
* @brief Closes BinElevatorArms (NOT USED) * @brief Closes BinElevatorArms (unused)
* *
* Sets the solenoid to close the arms of the BinElevator * Sets the solenoid to close the arms of the BinElevator
*/ */
@ -40,6 +40,5 @@ class BinCloseArms: public Command{
*/ */
void Interrupted(); void Interrupted();
}; };
#endif #endif
// vim: ts=2:sw=2:et // vim: ts=2:sw=2:et

View File

@ -8,7 +8,6 @@
* @brief Lowers the bin elevator until a timeout is reached * @brief Lowers the bin elevator until a timeout is reached
*/ */
class BinLower: public Command{ class BinLower: public Command{
private:
public: public:
/** /**
* @brief Constructs BinLower * @brief Constructs BinLower

View File

@ -11,7 +11,7 @@
*/ */
class RollVar: public Command{ class RollVar: public Command{
private: private:
double speed; //<! Speed control of the collector double speed; //<! Speed multiplier of the collector
public: public:
/** /**
* @brief Constructs RollVar * @brief Constructs RollVar

View File

@ -72,12 +72,11 @@ void DentRobot::TeleopInit(){
} }
void DentRobot::TeleopPeriodic(){ void DentRobot::TeleopPeriodic(){
Scheduler::GetInstance()->Run(); Scheduler::GetInstance()->Run();
//TODO: Calibrate 1.0 to the height we want the elevator to automatically raise
if(elevator->GetUseEncoder()&&elevator->GetHeight()<=-1.0){ if(elevator->GetUseEncoder()&&elevator->GetHeight()<=-1.0){
// Raise the elevator if it dips below elevatorTop // Raise the elevator if it dips below elevatorTop
oi->raise->Start(); oi->raise->Start();
} }
SmartDashboard::PutNumber("CollectorThrottle",oi->GetLeftThrottle()); SmartDashboard::PutNumber("CollectorThrottle", oi->GetLeftThrottle());
} }
void DentRobot::TestPeriodic(){ void DentRobot::TestPeriodic(){
} }

View File

@ -13,7 +13,6 @@ void Drivetrain::InitDefaultCommand(){
SetDefaultCommand(new Drive()); SetDefaultCommand(new Drive());
} }
void Drivetrain::DriveMecanum(double x, double y, double z, double sensitivity, bool driveStraight){ void Drivetrain::DriveMecanum(double x, double y, double z, double sensitivity, bool driveStraight){
//TODO: Find the correct value for kP
double kP=SmartDashboard::GetNumber("Gyro kP"); double kP=SmartDashboard::GetNumber("Gyro kP");
double correctX = -(sensitivity*(pow(x, 3))+(1-sensitivity)*x); double correctX = -(sensitivity*(pow(x, 3))+(1-sensitivity)*x);
double correctY = -(sensitivity*(pow(y, 3))+(1-sensitivity)*y); double correctY = -(sensitivity*(pow(y, 3))+(1-sensitivity)*y);