2014-05-24 14:29:44 -04:00
|
|
|
#include <WPILib.h>
|
|
|
|
#include "../Definitions.h"
|
|
|
|
|
|
|
|
class ZaphodShooter
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
Jaguar *shooterLeft1, *shooterLeft2, *shooterRight1, *shooterRight2;
|
|
|
|
AnalogChannel *shooterAngle;
|
|
|
|
public:
|
|
|
|
ZaphodShooter();
|
|
|
|
enum
|
|
|
|
{
|
|
|
|
IDLE_PRESHOT,
|
|
|
|
FIRING,
|
|
|
|
LOWERING,
|
|
|
|
IDLE_POSTSHOT
|
|
|
|
}e_ShooterState;
|
2014-05-24 21:42:12 -04:00
|
|
|
bool isShooting;
|
2014-05-25 14:41:10 -04:00
|
|
|
float shootingPower;
|
|
|
|
void startShootingSequence(float);
|
2014-05-24 14:29:44 -04:00
|
|
|
void shootForAngle(float, float);
|
|
|
|
void shootRaw(float);
|
|
|
|
void lower(float);
|
|
|
|
void stopShooter();
|
|
|
|
void updateShooterPosition();
|
|
|
|
float floatToPWM(float input);
|
|
|
|
float getAngle();
|
|
|
|
};
|