diff --git a/DriveBase/src/Robot.cpp b/DriveBase/src/Robot.cpp index cc574d5..e65d1b1 100644 --- a/DriveBase/src/Robot.cpp +++ b/DriveBase/src/Robot.cpp @@ -6,8 +6,16 @@ * This sample shows how to use the new CANTalon to just run a motor in a basic * throttle mode, in the same manner as you might control a traditional PWM * controlled motor. - * */ + +#ifndef BUTTON_LAYOUT +#define BUTTON_LAYOUT + +#define TRIGGER 10 // I have no idea what the right button number is... +#define THUMB 11 + +#endif + class Robot: public IterativeRobot { CANTalon r1_drive; CANTalon r2_drive; @@ -64,10 +72,23 @@ public: drive.Drive(&lstick); float power = (1.0 - rstick.GetThrottle()) / 2.0; - //shooter1.Set(power); - //shooter2.Set(power); - shooter.SetPower(power); + //shooter.SetPower(power); + if(rstick.GetRawButton(TRIGGER)) + { + // SHOOT THE BALL + } + + if(rstick.GetRawButton(THUMB)) + { + // lower the ramp + } + else + { + // raise the ramp to HALF (so it isn't down all the time!) + } + + // How to pickup? } }; diff --git a/DriveBase/src/TankDrive.h b/DriveBase/src/TankDrive.h index d20d264..a3db736 100644 --- a/DriveBase/src/TankDrive.h +++ b/DriveBase/src/TankDrive.h @@ -51,8 +51,8 @@ public: } float speed = y * th; - - float rot = x; // TODO: do some math here to smooth out turning? + // TODO: do some math here to smooth out turning? + float rot = x * th; dt1->ArcadeDrive(speed, rot, false); dt2->ArcadeDrive(speed, rot, false);