From fb39b56c900b6e11b3e0fe0f5d8d9cf85ad4c6f6 Mon Sep 17 00:00:00 2001 From: Aidan Ferguson Date: Wed, 10 Feb 2016 14:42:20 -0500 Subject: [PATCH] removed counter object in preparation for encoder over cantalon --- Robot2016/src/Robot.cpp | 4 +--- Robot2016/src/Shooter.h | 6 +----- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/Robot2016/src/Robot.cpp b/Robot2016/src/Robot.cpp index 2cc4f0a..e63ffd9 100644 --- a/Robot2016/src/Robot.cpp +++ b/Robot2016/src/Robot.cpp @@ -19,16 +19,14 @@ class Robot: public IterativeRobot RobotDrive drive; Shooter shooter; Joystick driver_stick, operator_stick; - Counter ramp_height; public: Robot(): - left_drive(0), // Left DriveTrain Talons plug into PWM channel 1 with a Y-spliter + left_drive(0), // Left DriveTrain Talons plug into PWM channel 1 with a Y-splitter right_drive(1), // Right DriveTrain Talons plug // left wheel 2 shooter1(10), // shooter drive 1 shooter2(11), // shooter drive 2 ramp(12), drive(&left_drive, &right_drive), - ramp_height(), shooter( // initialize Shooter object. &shooter1, &shooter2, &ramp, &ramp_height), driver_stick(0), // right stick (operator) diff --git a/Robot2016/src/Shooter.h b/Robot2016/src/Shooter.h index 8b7a833..7d498cd 100644 --- a/Robot2016/src/Shooter.h +++ b/Robot2016/src/Shooter.h @@ -34,12 +34,11 @@ public: * s2 is also for the pickup-mechanism and can be controlled independently. * */ - Shooter(CANTalon *s1, CANTalon *s2, CANTalon *r, Counter *h) { + Shooter(CANTalon *s1, CANTalon *s2, CANTalon *r) { shooterDrive = new RobotDrive(s1, s2); pickup = s2; ramp = r; rampState = Uncalibrated; - rampHeight = h; } /** @@ -58,7 +57,6 @@ public: delete shooterDrive; delete pickup; delete ramp; - delete rampHeight; } void PickUp(bool state = true) { @@ -77,7 +75,6 @@ public: } else { ramp->Set(0); - rampHeight->Reset(); } } } @@ -98,7 +95,6 @@ private: RobotDrive *shooterDrive; CANTalon *pickup; CANTalon *ramp; - Counter *rampHeight; RampState rampState; RampState targetState;