diff --git a/src/HHBase.cpp b/src/HHBase.cpp index 20fbdb7..0023bc3 100644 --- a/src/HHBase.cpp +++ b/src/HHBase.cpp @@ -21,6 +21,7 @@ void HHBase::DisabledPeriodic(){} void HHBase::AutonomousPeriodic(){ } void HHBase::TeleopPeriodic(){ + hhbot->Handler(); } void HHBase::Test(){} START_ROBOT_CLASS(HHBase); diff --git a/src/HHRobot.cpp b/src/HHRobot.cpp index e8a2eae..d05f564 100644 --- a/src/HHRobot.cpp +++ b/src/HHRobot.cpp @@ -28,9 +28,9 @@ void HHRobot::Handler(){ hhdrive->MecanumDrive_Cartesian(joystick1->GetJoystickAxis("z"), joystick1->GetJoystickAxis("y"), joystick1->GetJoystickAxis("x")); } if(joystick1->GetJoystickButton(11)){ - collector->Collect(255); + collector->Collect(-1.0f); }else if(joystick1->GetJoystickButton(12)){ - collector->Collect(1); + collector->Collect(1.0f); }else if(joystick1->GetJoystickButton(9)){ collector->Raise(255); }else if(joystick1->GetJoystickButton(10)){ diff --git a/src/classes/Collector.cpp b/src/classes/Collector.cpp index ab1a040..919158c 100644 --- a/src/classes/Collector.cpp +++ b/src/classes/Collector.cpp @@ -1,22 +1,22 @@ #include "Collector.h" DentCollector::DentCollector(int fl, int fr, int rl, int rr){ - frontLeft = new Talon(fl); - frontRight = new Talon(fr); + collectorLeft = new Talon(fl); + collectorRight = new Talon(fr); raiserLeft = new Talon(rl); raiserRight = new Talon(rr); } -void DentCollector::Collect(int power){ - frontLeft->Set(power); - frontRight->Set(power); +void DentCollector::Collect(float power){ + collectorLeft->Set(power); + collectorRight->Set(power); } -void DentCollector::Raise(int power){ +void DentCollector::Raise(float power){ raiserLeft->Set(power); raiserRight->Set(power); } void DentCollector::Rest(){ raiserLeft->Set(0); raiserRight->Set(0); - frontLeft->Set(0); - frontRight->Set(0); + collectorLeft->Set(0); + collectorRight->Set(0); } // vim: ts=2:sw=2:et diff --git a/src/classes/Collector.h b/src/classes/Collector.h index 386f078..f112d0a 100644 --- a/src/classes/Collector.h +++ b/src/classes/Collector.h @@ -4,11 +4,11 @@ //#include "" class DentCollector{ private: - Talon *frontLeft, *frontRight, *raiserLeft, *raiserRight; + Talon *collectorLeft, *collectorRight, *raiserLeft, *raiserRight; public: DentCollector(int, int, int, int); - void Collect(int); - void Raise(int); + void Collect(float); + void Raise(float); void Rest(); }; #endif