Skip to content

Commit

Permalink
Merge pull request #14 from PenguinEmpire/dev
Browse files Browse the repository at this point in the history
Dev to master
  • Loading branch information
ryan-blanchard authored Mar 27, 2018
2 parents b949b01 + 6615b77 commit fc3b33f
Show file tree
Hide file tree
Showing 2 changed files with 506 additions and 157 deletions.
19 changes: 16 additions & 3 deletions FRC2018/src/PenguinEmpire.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,15 @@ class Robot : public IterativeRobot {
Spark lift1, lift2; // Lifter motor controllers
AHRS *ahrs; // Purple sensor board
Compressor compressor;
DoubleSolenoid leftGearbox, rightGearbox, liftGearbox; // Gearbox shifters
DoubleSolenoid omniDropper;
DoubleSolenoid driveGearboxes, liftGearbox, omniDropper; // Gearbox shifters and omni actuator
Timer* mainTimer;
Timer* lidarTimer;
Lidar* lidar;
DigitalInput* bottomSensor;
DigitalInput* switchSensor;
DigitalInput* topSensor;
DigitalInput* centerPosSwitch;
DigitalInput* rightPosSwitch;
Encoder leftEnc, rightEnc;

// Values and Structures
Expand All @@ -71,6 +72,7 @@ class Robot : public IterativeRobot {
bool turnSetup;
bool comboLift;
bool comboDrive;
bool autoDrop;

bool gl90, gr90, gl180, gr180;

Expand Down Expand Up @@ -105,7 +107,7 @@ class Robot : public IterativeRobot {
// };

std::vector<std::vector<double>> autosteps;
std::vector<std::vector<double>> ll, lr, cl, cr, rl, rr;
std::vector<std::vector<double>> lll, llr, lrl, lrr, cl, cr, rrr, rrl, rlr, rll;
int numsteps, curstep;
bool stepSetup, stepComplete;
int fpos;
Expand All @@ -114,6 +116,14 @@ class Robot : public IterativeRobot {
int lastLiftState;
bool haltLifter;
bool goingPastSwitch;
bool checkSwitch;
bool ioForward, ioBackward;
bool released;
bool autoRaise;
long raiseCounter;
int sightCounter;

bool visionAligned;

std::shared_ptr<NetworkTable> contour;
std::vector<double> centerX, centerY, area, width;
Expand Down Expand Up @@ -153,6 +163,8 @@ class Robot : public IterativeRobot {
void ManualCubeIO(bool inBtn, bool outBtn);
void DropOmnis(bool dropBtn, bool raiseBtn);
void HoldOmnis(bool btn);
void ToggleSwitchSensor(bool on, bool off);
void ManualVision(bool btn);

// Test
void TestInit();
Expand All @@ -164,6 +176,7 @@ class Robot : public IterativeRobot {
void RunCubeIO(Direction dir);
void RunLifter(bool up, bool down);
void CheckHallSensor();
void ToggleIO(bool forward, bool backward);

};

Expand Down
Loading

0 comments on commit fc3b33f

Please sign in to comment.