mirror of
https://github.com/team2059/Dent
synced 2024-12-18 20:52:29 -05:00
Fixed all doxygen errors, other slight modifications
This commit is contained in:
parent
4a2cf10c22
commit
49ad9dac39
@ -8,10 +8,11 @@ AutoDrive::AutoDrive(double duration, double xtmp, double ytmp): Command("AutoDr
|
||||
y=ytmp;
|
||||
}
|
||||
void AutoDrive::Initialize(){
|
||||
DentRobot::drivetrain->ResetGyro();
|
||||
}
|
||||
void AutoDrive::Execute(){
|
||||
//X axis, Y axis, Z axis, sensitivity, speed threshold (usually throttle)
|
||||
DentRobot::drivetrain->DriveMecanum(x, y, 0.0, 0.9);
|
||||
DentRobot::drivetrain->DriveMecanum(x, y, 0.0, 0.9, true);
|
||||
}
|
||||
bool AutoDrive::IsFinished(){
|
||||
return IsTimedOut();
|
||||
|
@ -13,7 +13,7 @@ class BinLower: public Command{
|
||||
/**
|
||||
* @brief Constructs BinLower
|
||||
*
|
||||
* @param float The timeout
|
||||
* @param timeout The timeout
|
||||
*/
|
||||
BinLower(float timeout);
|
||||
/**
|
||||
|
@ -13,11 +13,10 @@ class RollIn: public Command{
|
||||
private:
|
||||
double rawSpeed; //<! Raw speed of the collector
|
||||
public:
|
||||
RollIn();
|
||||
/**
|
||||
* @brief Constructs RollIn
|
||||
*
|
||||
* @param double Speed to roll the collector
|
||||
* @param speed Speed to roll the collector
|
||||
*/
|
||||
RollIn(double speed);
|
||||
/**
|
||||
|
@ -6,7 +6,6 @@ RollOut::RollOut(double timeout): Command("RollOut"){
|
||||
void RollOut::Initialize(){
|
||||
}
|
||||
void RollOut::Execute(){
|
||||
//TODO check this value to move the motors in the right direction
|
||||
// Divide by 2 twice because this speed should be half the collector speed
|
||||
DentRobot::collector->MoveRollers(-DentRobot::oi->GetLeftThrottle() * 0.8);
|
||||
SmartDashboard::PutNumber("DriveThrottle", -DentRobot::oi->GetLeftThrottle());
|
||||
|
@ -9,11 +9,10 @@
|
||||
*/
|
||||
class Lower: public Command{
|
||||
public:
|
||||
Lower(double timeout=3.0);
|
||||
/**
|
||||
* @brief Constructs Lower
|
||||
*/
|
||||
Lower();
|
||||
Lower(double timeout=3.0);
|
||||
/**
|
||||
* @brief Initializes the class
|
||||
*/
|
||||
|
@ -9,11 +9,10 @@
|
||||
*/
|
||||
class Raise: public Command{
|
||||
public:
|
||||
Raise(double timeout=3.5);
|
||||
/**
|
||||
* @brief Constructs Raise
|
||||
*/
|
||||
Raise();
|
||||
Raise(double timeout=3.5);
|
||||
/**
|
||||
* @brief Initializes the class
|
||||
*/
|
||||
|
@ -16,7 +16,7 @@ class CheckDrive: public CommandGroup{
|
||||
/**
|
||||
* @brief TODO
|
||||
*
|
||||
* @param int
|
||||
* @param motorID
|
||||
*/
|
||||
CheckDrive(int);
|
||||
/**
|
||||
|
@ -29,7 +29,6 @@ void DentRobot::RobotInit(){
|
||||
// If the robot will be picking up three totes in sequence 3
|
||||
SmartDashboard::PutBoolean("Two totes", true);
|
||||
SmartDashboard::PutBoolean("Three totes", false);
|
||||
// TODO: Calibrate the following two values
|
||||
// Distance (in time) to auto zone
|
||||
SmartDashboard::PutNumber("Auto Zone Distance", 2.1);
|
||||
// Distance (in time) to auto tote (used in sequence 3)
|
||||
@ -43,7 +42,7 @@ void DentRobot::RobotInit(){
|
||||
SmartDashboard::PutBoolean("Elevator Bottom", false);
|
||||
SmartDashboard::PutBoolean("Elevator Top", false);
|
||||
//Drive speed
|
||||
SmartDashboard::PutNumber("DriveSpeedReductionThresh", 2);
|
||||
SmartDashboard::PutNumber("DriveSpeedReductionThresh", 2.0);
|
||||
}
|
||||
void DentRobot::DisabledPeriodic(){
|
||||
Scheduler::GetInstance()->Run();
|
||||
|
@ -24,11 +24,11 @@ class BinElevator{
|
||||
/**
|
||||
* @brief Runs the bin elevator
|
||||
*
|
||||
* @param double The power to run the bin elevator
|
||||
* @param power The power to run the bin elevator
|
||||
*
|
||||
* Ranges from -1.0 to 1.0
|
||||
*/
|
||||
void Run(double);
|
||||
void Run(double power);
|
||||
/**
|
||||
* @brief Sets the encoder value to 0 (unused)
|
||||
*/
|
||||
|
@ -10,12 +10,12 @@ Collector::Collector(): Subsystem("Collector"){
|
||||
}
|
||||
void Collector::InitDefaultCommand(){
|
||||
}
|
||||
void Collector::MoveRollers(double a){
|
||||
collectorMotorLeft->Set(a);
|
||||
collectorMotorBottom->Set(-a);
|
||||
collectorMotorRamp->Set(a);
|
||||
collectorMotorRight->Set(-a);
|
||||
printf("Roller power: %f\n", a);
|
||||
void Collector::MoveRollers(double power){
|
||||
collectorMotorLeft->Set(power);
|
||||
collectorMotorBottom->Set(-power);
|
||||
collectorMotorRamp->Set(power);
|
||||
collectorMotorRight->Set(-power);
|
||||
printf("Roller power: %f\n", power);
|
||||
}
|
||||
double Collector::GetSonarDistance(){
|
||||
return sonarAnalog->GetAverageVoltage();
|
||||
|
@ -33,9 +33,9 @@ class Collector: public Subsystem{
|
||||
/**
|
||||
* @brief Moves the collectors
|
||||
*
|
||||
* @param double The speed to run the collectors
|
||||
* @param power The speed to run the collectors
|
||||
*/
|
||||
void MoveRollers(double);
|
||||
void MoveRollers(double power);
|
||||
/**
|
||||
* @brief Gets the distance of the sonar (unused)
|
||||
*
|
||||
|
@ -19,6 +19,7 @@ void Drivetrain::DriveMecanum(double x, double y, double z, double sensitivity,
|
||||
double correctY = -(sensitivity*(pow(y, 3))+(1-sensitivity)*y);
|
||||
double correctZ;
|
||||
if(driveStraight){
|
||||
printf("Driving straight at: %f\n", -gyro->GetAngle()*kP);
|
||||
correctZ = -gyro->GetAngle()*kP;
|
||||
}else{
|
||||
correctZ = -z * 0.5;
|
||||
|
@ -35,8 +35,8 @@ bool Elevator::GetElevatorTop(){
|
||||
SmartDashboard::PutBoolean("Elevator Top", !elevatorTop->Get());
|
||||
return elevatorTop->Get();
|
||||
}
|
||||
void Elevator::SetUseEncoder(bool param){
|
||||
useEncoder=param;
|
||||
void Elevator::SetUseEncoder(bool use){
|
||||
useEncoder=use;
|
||||
}
|
||||
bool Elevator::GetUseEncoder(){
|
||||
return useEncoder;
|
||||
|
@ -25,9 +25,9 @@ class Elevator{
|
||||
/**
|
||||
* @brief Runs the elevator
|
||||
*
|
||||
* @param double The power to run the bin elevator (-1.0 to 1.0)
|
||||
* @param power The power to run the bin elevator (-1.0 to 1.0)
|
||||
*/
|
||||
void Run(double);
|
||||
void Run(double power);
|
||||
/**
|
||||
* @brief Sets the encoder value to 0 (unused)
|
||||
*/
|
||||
@ -59,9 +59,9 @@ class Elevator{
|
||||
/**
|
||||
* @brief Use the elevator encoder (unused)
|
||||
*
|
||||
* @param bool State to use encoder
|
||||
* @param use State to use encoder
|
||||
*/
|
||||
void SetUseEncoder(bool);
|
||||
void SetUseEncoder(bool use);
|
||||
/**
|
||||
* @brief Gets the state of useEncoder (unused)
|
||||
*
|
||||
|
@ -23,9 +23,9 @@ class Pneumatics: public Subsystem{
|
||||
/**
|
||||
* @brief Sets the state of the arms
|
||||
*
|
||||
* @param bool State of the arms
|
||||
* @param state State of the arms
|
||||
*/
|
||||
void SetOpen(bool);
|
||||
void SetOpen(bool state);
|
||||
};
|
||||
#endif
|
||||
// vim: ts=2:sw=2:et
|
||||
|
Loading…
Reference in New Issue
Block a user