2
0
mirror of https://github.com/team2059/Zaphod synced 2025-01-17 22:19:21 -05:00

Deleted extra variables (i think they do nothing, but untested(

This commit is contained in:
Austen Adler 2014-03-02 03:28:36 +00:00
parent eef7029109
commit 3681a15c2b

View File

@ -1,4 +1,6 @@
//Sonar code //TODO
//Add a button on joystick that activates "auto" to drive to 40 inches away and another to shoot when at 40 inches away (use the little joystick on both drive and shooter stick)
//Sonar in auto: drive till 40in away (dashboard value) and shoot
#include "WPILib.h" #include "WPILib.h"
#include "SmartDashboard/SmartDashboard.h" #include "SmartDashboard/SmartDashboard.h"
//#include "Command.h" //#include "Command.h"
@ -10,14 +12,13 @@ class RobotDemo : public SimpleRobot
{ {
RobotDrive myRobot; RobotDrive myRobot;
float potVal, multiplier, servoXState, servoYState, throttle, ServoXJoyPos, ServoYJoyPos; float potVal, multiplier, servoXState, servoYState, throttle, ServoXJoyPos, ServoYJoyPos;
int lastToggle; bool collectorExtended, shooting, compressing;
bool collectorExtended, toggleCollector, shooting, compressing;
float upLimit; float upLimit;
//string cmd; //string cmd;
Joystick Rstick, Lstick; Joystick Rstick, Lstick;
Servo Servo1, Servo2; Servo Servo1, Servo2;
Solenoid collectorSole1, collectorSole2; Solenoid collectorSole1, collectorSole2;
DigitalInput pneumaticLS, shootTopLS, shootBottomLS; //Do we need this? TODO - Austen
Relay collectorSpike, lightingSpike; Relay collectorSpike, lightingSpike;
Compressor compressor; Compressor compressor;
Jaguar Left1, Left2, Left3, Right1, Right2, Right3, RightArmMotor1, RightArmMotor2, LeftArmMotor1, LeftArmMotor2, CollectorMotor1; Jaguar Left1, Left2, Left3, Right1, Right2, Right3, RightArmMotor1, RightArmMotor2, LeftArmMotor1, LeftArmMotor2, CollectorMotor1;
@ -25,12 +26,10 @@ class RobotDemo : public SimpleRobot
//Ultrasonic //Ultrasonic
AnalogChannel BallSonicLeft, BallSonicRight, WallSonicLeft, WallSonicRight; AnalogChannel BallSonicLeft, BallSonicRight, WallSonicLeft, WallSonicRight;
DigitalOutput BallLeft, BallRight, WallLeft, WallRight; DigitalOutput BallLeft, BallRight, WallLeft, WallRight;
//DigitalInput ballLimit;
public: public:
RobotDemo(): RobotDemo():
//Limit Switches //Limit Switches
//TODO //TODO
//ballLimit(),
//Joysticks //Joysticks
Rstick(1), Rstick(1),
Lstick(2), Lstick(2),
@ -50,10 +49,6 @@ public:
//Solenoids //Solenoids
collectorSole1(1), collectorSole1(1),
collectorSole2(2), collectorSole2(2),
//Limit switches
pneumaticLS(1),
shootTopLS(2),
shootBottomLS(3),
//Driver Motors //Driver Motors
Left1(1, 1), Left1(1, 1),
Left2(1, 2), Left2(1, 2),
@ -79,7 +74,6 @@ public:
} }
void RobotInit() { void RobotInit() {
//Initializing robot //Initializing robot
lastToggle = 0;
DashboardSetup(); DashboardSetup();
servoXState = 90; servoXState = 90;
servoYState = 90; servoYState = 90;
@ -88,7 +82,6 @@ public:
compressor.Start(); compressor.Start();
shooting = false; shooting = false;
compressing = true; compressing = true;
toggleCollector = false;
throttle=0; throttle=0;
} }
void DashboardSetup() { void DashboardSetup() {