removed counter object in preparation for encoder over cantalon

This commit is contained in:
Aidan Ferguson 2016-02-10 14:42:20 -05:00
parent afad5d4660
commit fb39b56c90
2 changed files with 2 additions and 8 deletions

View File

@ -19,16 +19,14 @@ class Robot: public IterativeRobot
RobotDrive drive; RobotDrive drive;
Shooter shooter; Shooter shooter;
Joystick driver_stick, operator_stick; Joystick driver_stick, operator_stick;
Counter ramp_height;
public: public:
Robot(): 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 right_drive(1), // Right DriveTrain Talons plug // left wheel 2
shooter1(10), // shooter drive 1 shooter1(10), // shooter drive 1
shooter2(11), // shooter drive 2 shooter2(11), // shooter drive 2
ramp(12), ramp(12),
drive(&left_drive, &right_drive), drive(&left_drive, &right_drive),
ramp_height(),
shooter( // initialize Shooter object. shooter( // initialize Shooter object.
&shooter1, &shooter2, &ramp, &ramp_height), &shooter1, &shooter2, &ramp, &ramp_height),
driver_stick(0), // right stick (operator) driver_stick(0), // right stick (operator)

View File

@ -34,12 +34,11 @@ public:
* s2 is also for the pickup-mechanism and can be controlled independently. * 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); shooterDrive = new RobotDrive(s1, s2);
pickup = s2; pickup = s2;
ramp = r; ramp = r;
rampState = Uncalibrated; rampState = Uncalibrated;
rampHeight = h;
} }
/** /**
@ -58,7 +57,6 @@ public:
delete shooterDrive; delete shooterDrive;
delete pickup; delete pickup;
delete ramp; delete ramp;
delete rampHeight;
} }
void PickUp(bool state = true) { void PickUp(bool state = true) {
@ -77,7 +75,6 @@ public:
} else } else
{ {
ramp->Set(0); ramp->Set(0);
rampHeight->Reset();
} }
} }
} }
@ -98,7 +95,6 @@ private:
RobotDrive *shooterDrive; RobotDrive *shooterDrive;
CANTalon *pickup; CANTalon *pickup;
CANTalon *ramp; CANTalon *ramp;
Counter *rampHeight;
RampState rampState; RampState rampState;
RampState targetState; RampState targetState;