From 7f3a5044729566f3e8fb4d7c4ebace90aa41f96c Mon Sep 17 00:00:00 2001 From: Austen Adler Date: Mon, 2 Feb 2015 20:43:22 -0500 Subject: [PATCH] Fixed indentation --- Commands/CloseCollector.cpp | 6 +++--- Commands/CollectTote.cpp | 8 ++++---- Commands/Drive.cpp | 6 +++--- Commands/ReleaseTote.cpp | 8 ++++---- DentRobot.h | 34 +++++++++++++++++----------------- OI.cpp | 4 ++++ Subsystems/AirCompressor.h | 2 +- Subsystems/Collector.h | 4 ++-- 8 files changed, 38 insertions(+), 34 deletions(-) diff --git a/Commands/CloseCollector.cpp b/Commands/CloseCollector.cpp index 92b1362..3a956f4 100644 --- a/Commands/CloseCollector.cpp +++ b/Commands/CloseCollector.cpp @@ -1,15 +1,15 @@ #include "CloseCollector.h" CloseCollector::CloseCollector() : Command("CloseCollector"){ - Requires(DentRobot::collector); + Requires(DentRobot::collector); } void CloseCollector::Initialize(){ SetTimeout(0.5); } void CloseCollector::Execute(){ - DentRobot::collector->MoveArms(.1); + DentRobot::collector->MoveArms(.1); } bool CloseCollector::IsFinished(){ - return DentRobot::collector->ArmSensor(); + return DentRobot::collector->ArmSensor(); } void CloseCollector::End(){ } diff --git a/Commands/CollectTote.cpp b/Commands/CollectTote.cpp index ce8ed62..c634fcb 100644 --- a/Commands/CollectTote.cpp +++ b/Commands/CollectTote.cpp @@ -1,15 +1,15 @@ #include "CollectTote.h" CollectTote::CollectTote() : Command("CollectTote"){ - Requires(DentRobot::collector); + Requires(DentRobot::collector); } void CollectTote::Initialize(){ } void CollectTote::Execute(){ - //TODO check this value to move the motors in the right direction - DentRobot::collector->MoveRollers(-1); + //TODO check this value to move the motors in the right direction + DentRobot::collector->MoveRollers(-1); } bool CollectTote::IsFinished(){ - return DentRobot::collector->BoxCollected(); + return DentRobot::collector->BoxCollected(); } void CollectTote::End(){ } diff --git a/Commands/Drive.cpp b/Commands/Drive.cpp index 7c82425..5882880 100644 --- a/Commands/Drive.cpp +++ b/Commands/Drive.cpp @@ -2,7 +2,7 @@ #include #include "../DentRobot.h" Drive::Drive() : Command("Drive"){ - Requires(DentRobot::drivetrain); + Requires(DentRobot::drivetrain); } void Drive::Initialize(){ } @@ -18,8 +18,8 @@ void Drive::Execute(){ z = DentRobot::oi->GetLeftStick()->GetRawAxis(2); y = DentRobot::oi->GetLeftStick()->GetRawAxis(1); if (DentRobot::oi->GetLeftStick()->GetRawAxis(3)<=0.5){ - y /= 2; - z /= 2; + y /= 2; + z /= 2; } //X axis, Y axis, Z axis, sensitivity, speed threshold (usually throttle), gyro DentRobot::drivetrain->DriveMecanum(x,y,z,0.9,0); diff --git a/Commands/ReleaseTote.cpp b/Commands/ReleaseTote.cpp index e1b1e89..67306ad 100644 --- a/Commands/ReleaseTote.cpp +++ b/Commands/ReleaseTote.cpp @@ -1,15 +1,15 @@ #include "ReleaseTote.h" ReleaseTote::ReleaseTote() : Command("ReleaseTote"){ - Requires(DentRobot::collector); + Requires(DentRobot::collector); } void ReleaseTote::Initialize(){ } void ReleaseTote::Execute(){ - //TODO check this value to move the motors in the right direction - DentRobot::collector->MoveRollers(1); + //TODO check this value to move the motors in the right direction + DentRobot::collector->MoveRollers(1); } bool ReleaseTote::IsFinished(){ - return DentRobot::collector->BoxCollected(); + return DentRobot::collector->BoxCollected(); } void ReleaseTote::End(){ } diff --git a/DentRobot.h b/DentRobot.h index 000a33e..653114a 100644 --- a/DentRobot.h +++ b/DentRobot.h @@ -8,23 +8,23 @@ #include "Subsystems/Collector.h" #include "Subsystems/AirCompressor.h" class DentRobot: public IterativeRobot { -private: - Command *driveCommand = NULL; -public: - static OI* oi; - static Collector* collector; - static Drivetrain* drivetrain; - static Elevator* elevator; - static DIO* dio; - static AirCompressor* airCompressor; - DentRobot(); - void RobotInit(); - void DisabledPeriodic(); - void AutonomousInit(); - void AutonomousPeriodic(); - void TeleopInit(); - void TeleopPeriodic(); - void TestPeriodic(); + private: + Command *driveCommand = NULL; + public: + static OI* oi; + static Collector* collector; + static Drivetrain* drivetrain; + static Elevator* elevator; + static DIO* dio; + static AirCompressor* airCompressor; + DentRobot(); + void RobotInit(); + void DisabledPeriodic(); + void AutonomousInit(); + void AutonomousPeriodic(); + void TeleopInit(); + void TeleopPeriodic(); + void TestPeriodic(); }; #endif // vim: ts=2:sw=2:et diff --git a/OI.cpp b/OI.cpp index a2c9e66..dc49b63 100644 --- a/OI.cpp +++ b/OI.cpp @@ -16,10 +16,14 @@ OI::OI() { JoystickButton *right2=new JoystickButton(rightStick, 2); JoystickButton *right3=new JoystickButton(rightStick, 3); JoystickButton *right4=new JoystickButton(rightStick, 4); + JoystickButton *right5=new JoystickButton(rightStick, 5); + JoystickButton *right6=new JoystickButton(rightStick, 6); right1->WhenPressed(new OpenCollector()); right2->WhenPressed(new CloseCollector()); right3->WhenPressed(new CollectTote()); right4->WhenPressed(new ReleaseTote()); + right5->WhenPressed(new StartCompressing()); + right6->WhenPressed(new StopCompressing()); } Joystick* OI::GetRightStick(){ return rightStick; diff --git a/Subsystems/AirCompressor.h b/Subsystems/AirCompressor.h index ca48f25..df9ec00 100644 --- a/Subsystems/AirCompressor.h +++ b/Subsystems/AirCompressor.h @@ -5,7 +5,7 @@ class AirCompressor: public Subsystem { private: - Compressor *compressor; + Compressor *compressor; public: AirCompressor(); void InitDefaultCommand(); diff --git a/Subsystems/Collector.h b/Subsystems/Collector.h index f5bc658..5302835 100644 --- a/Subsystems/Collector.h +++ b/Subsystems/Collector.h @@ -5,8 +5,8 @@ class Collector: public Subsystem { private: - CANTalon *windowMotorLeft, *windowMotorRight, *collectorMotorLeft, *collectorMotorRight; - DigitalInput *boxSwitch; + CANTalon *windowMotorLeft, *windowMotorRight, *collectorMotorLeft, *collectorMotorRight; + DigitalInput *boxSwitch; public: Collector(); void InitDefaultCommand();