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;
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)

View File

@ -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;