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

changed formatting

This commit is contained in:
Adam Long 2015-09-19 21:57:42 +00:00
parent 0af5b351d6
commit 166e0a96b7
17 changed files with 20 additions and 40 deletions

View File

@ -4,8 +4,7 @@ Turn::Turn(double timeout): Command("Turn") {
Requires(DentRobot::drivetrain);
SetTimeout(timeout);
}
void Turn::Initialize() {
}
void Turn::Initialize() {}
void Turn::Execute() {
//X axis, Y axis, Z axis, sensitivity, speed threshold (usually throttle)
DentRobot::drivetrain->DriveArcade(0.0, 0.0, 0.6, 0.9);

View File

@ -4,8 +4,7 @@
BinIn::BinIn(float timeout): Command("BinIn") {
SetTimeout(timeout);
}
void BinIn::Initialize() {
}
void BinIn::Initialize() {}
void BinIn::Execute() {
DentRobot::binCollector->MoveArms(0.75);
}

View File

@ -4,8 +4,7 @@
BinOut::BinOut(double timeout): Command("BinOut") {
SetTimeout(timeout);
}
void BinOut::Initialize() {
}
void BinOut::Initialize() {}
void BinOut::Execute() {
DentRobot::binCollector->MoveArms(-0.1);
}

View File

@ -4,16 +4,14 @@
BinCloseArms::BinCloseArms(double timeout): Command("BinCloseArms") {
SetTimeout(timeout);
}
void BinCloseArms::Initialize() {
}
void BinCloseArms::Initialize() {}
void BinCloseArms::Execute() {
DentRobot::pneumatics->SetArmsOpen(false);
}
bool BinCloseArms::IsFinished() {
return true;
}
void BinCloseArms::End() {
}
void BinCloseArms::End() {}
void BinCloseArms::Interrupted() {
End();
}

View File

@ -4,8 +4,7 @@
BinLower::BinLower(float timeout): Command("BinLower") {
SetTimeout(timeout);
}
void BinLower::Initialize() {
}
void BinLower::Initialize() {}
void BinLower::Execute() {
DentRobot::binElevator->Run(-1.0);
}

View File

@ -4,16 +4,14 @@
BinOpenArms::BinOpenArms(double timeout): Command("BinOpenArms") {
SetTimeout(timeout);
}
void BinOpenArms::Initialize() {
}
void BinOpenArms::Initialize() {}
void BinOpenArms::Execute() {
DentRobot::pneumatics->SetArmsOpen(true);
}
bool BinOpenArms::IsFinished() {
return true;
}
void BinOpenArms::End() {
}
void BinOpenArms::End() {}
void BinOpenArms::Interrupted() {
End();
}

View File

@ -4,8 +4,7 @@
BinRaise::BinRaise(double timeout): Command("BinRaise") {
SetTimeout(timeout);
}
void BinRaise::Initialize() {
}
void BinRaise::Initialize() {}
void BinRaise::Execute() {
DentRobot::binElevator->Run(1.0);
}

View File

@ -3,8 +3,7 @@ RollOut::RollOut(double timeout): Command("RollOut") {
Requires(DentRobot::collector);
SetTimeout(timeout);
}
void RollOut::Initialize() {
}
void RollOut::Initialize() {}
void RollOut::Execute() {
// Divide by 2 twice because this speed should be half the collector speed
DentRobot::collector->MoveRollers(-DentRobot::oi->GetLeftThrottle() * 0.8);

View File

@ -3,8 +3,7 @@
Drive::Drive(): Command("Drive") {
Requires(DentRobot::drivetrain);
}
void Drive::Initialize() {
}
void Drive::Initialize() {}
void Drive::Execute() {
double x, y, z;
x = DentRobot::oi->GetLeftStick()->GetRawAxis(0);
@ -29,8 +28,7 @@ void Drive::Execute() {
bool Drive::IsFinished() {
return IsTimedOut();
}
void Drive::End() {
}
void Drive::End() {}
void Drive::Interrupted() {
End();
}

View File

@ -5,8 +5,7 @@ Lower::Lower(double timeout, bool useSoftLimits): Command("Lower") {
SetTimeout(timeout);
softLimits=useSoftLimits;
}
void Lower::Initialize() {
}
void Lower::Initialize() {}
void Lower::Execute() {
DentRobot::elevator->Run(-1.0);
}

View File

@ -5,8 +5,7 @@ Raise::Raise(double timeout, bool useSoftLimits): Command("Raise") {
SetTimeout(timeout);
softLimits=useSoftLimits;
}
void Raise::Initialize() {
}
void Raise::Initialize() {}
void Raise::Execute() {
DentRobot::elevator->Run(1.0);
}

View File

@ -78,7 +78,6 @@ void DentRobot::TeleopPeriodic() {
}
SmartDashboard::PutNumber("CollectorThrottle", oi->GetLeftThrottle());
}
void DentRobot::TestPeriodic() {
}
void DentRobot::TestPeriodic() {}
START_ROBOT_CLASS(DentRobot);
// vim: ts=2:sw=2:et

View File

@ -5,8 +5,7 @@ BinCollector::BinCollector(): Subsystem("BinCollector") {
leftBinCollectorMotor = new CANTalon(BINCOLLECTOR_LEFT_CAN);
rightBinCollectorMotor = new CANTalon(BINCOLLECTOR_RIGHT_CAN);
}
void BinCollector::InitDefaultCommand() {
}
void BinCollector::InitDefaultCommand() {}
void BinCollector::MoveArms(double speed) {
leftBinCollectorMotor->Set(speed);
rightBinCollectorMotor->Set(-speed);

View File

@ -7,8 +7,7 @@ BinElevator::BinElevator() {
elevatorBottom = new DigitalInput(BINELEVATOR_BOTTOM_DIO);
elevatorTop = new DigitalInput(BINELEVATOR_TOP_DIO);
}
void BinElevator::InitDefaultCommand() {
}
void BinElevator::InitDefaultCommand() {}
void BinElevator::Run(double power) {
leftMotor->Set(power);
rightMotor->Set(-power);

View File

@ -8,8 +8,7 @@ Collector::Collector(): Subsystem("Collector") {
collectorMotorRight = new CANTalon(COLLECTOR_RIGHT_CAN);
sonarAnalog = new AnalogInput(COLLECTOR_SONAR_ANALOG);
}
void Collector::InitDefaultCommand() {
}
void Collector::InitDefaultCommand() {}
void Collector::MoveRollers(double power) {
MoveLeftRoller(power);
MoveRightRoller(-power);

View File

@ -9,8 +9,7 @@ Elevator::Elevator() {
// Checks if the elevator is drifting
useEncoder = false;
}
void Elevator::InitDefaultCommand() {
}
void Elevator::InitDefaultCommand() {}
void Elevator::Run(double power) {
// If we're not telling it to stop
if(power != 0.0) {

View File

@ -9,8 +9,7 @@ Pneumatics::Pneumatics(): Subsystem("Pneumatics") {
solenoid4 = new Solenoid(COMPRESSOR_PCM_CAN, BINELEVATOR_SOLENOID_FOUR);
armState = false;
}
void Pneumatics::InitDefaultCommand() {
}
void Pneumatics::InitDefaultCommand() {}
void Pneumatics::SetArmsOpen(bool state) {
if(state) {
solenoid1->Set(true);