Added some more comments.
This commit is contained in:
parent
62a93449cb
commit
2299016c7e
@ -11,10 +11,18 @@
|
|||||||
#define PICKUP_POWER 0.5
|
#define PICKUP_POWER 0.5
|
||||||
#define RAMP_LOWER_DURATION 2 //Rotations.
|
#define RAMP_LOWER_DURATION 2 //Rotations.
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* You can use the values assigned to each of these values as the number
|
||||||
|
* of rotations to run the motor down from the "Shoot" position.
|
||||||
|
*
|
||||||
|
* This might not be the best way to do it, and also requires that we
|
||||||
|
* figure out how to read the Hall Effect signal from the motor.
|
||||||
|
*/
|
||||||
enum RampState {
|
enum RampState {
|
||||||
Shoot = 0, // 0 rotations
|
Shoot = 0, // 0 rotations
|
||||||
Half = 1, // 1 rotation
|
Half = 1, // 1 rotation?
|
||||||
Down = 2, // 2 rotations
|
Down = 2, // 2 rotations?
|
||||||
Uncalibrated = -1
|
Uncalibrated = -1
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -32,6 +40,10 @@ public:
|
|||||||
rampState = Uncalibrated;
|
rampState = Uncalibrated;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Call this method on TeleopInit so that the ramp is properly
|
||||||
|
* set at the beginning of the match.
|
||||||
|
*/
|
||||||
RampState CalibrateRamp() {
|
RampState CalibrateRamp() {
|
||||||
// TODO:
|
// TODO:
|
||||||
// Raise ramp until limit switch is triggered,
|
// Raise ramp until limit switch is triggered,
|
||||||
@ -42,6 +54,8 @@ public:
|
|||||||
|
|
||||||
virtual ~Shooter() {
|
virtual ~Shooter() {
|
||||||
delete shooterDrive;
|
delete shooterDrive;
|
||||||
|
delete pickup;
|
||||||
|
delete ramp;
|
||||||
}
|
}
|
||||||
|
|
||||||
void PickUp(bool state = true) {
|
void PickUp(bool state = true) {
|
||||||
|
Reference in New Issue
Block a user