untested tweaks: different TURN_FACTOR, buttons toggle between piecewise and arcade drive
This commit is contained in:
parent
46e5a428b1
commit
2a0a5095a8
@ -14,7 +14,7 @@
|
||||
// affecting the robot. Use this for cleaning up drive train and shooter.
|
||||
// Also used for detecting changes in an axis' value.
|
||||
|
||||
#define TURN_FACTOR 1.5 // Left(x,y) = y*(1 + TF*x) : x < 0
|
||||
#define TURN_FACTOR 0.5 // Left(x,y) = y*(1 + TF*x) : x < 0
|
||||
// = y : x >= 0
|
||||
// Right(x,y) = y : x < 0
|
||||
// = y*(1 - TF*x) : x >= 0
|
||||
@ -52,6 +52,7 @@ private:
|
||||
bool ramping;
|
||||
bool shooting;
|
||||
bool unjamming;
|
||||
bool arcade;
|
||||
float shooter_power;
|
||||
|
||||
LiveWindow *lw = LiveWindow::GetInstance();
|
||||
@ -119,16 +120,31 @@ private:
|
||||
|
||||
void TeleopPeriodic()
|
||||
{
|
||||
if (driver_stick.GetRawButton(THUMB))
|
||||
if(driver_stick.GetRawButton(7))
|
||||
{
|
||||
float left = driver_stick.GetTwist();
|
||||
float right = -driver_stick.GetTwist();
|
||||
|
||||
drive.TankDrive(left, right);
|
||||
arcade = true;
|
||||
}
|
||||
if(driver_stick.GetRawButton(8))
|
||||
{
|
||||
arcade = false;
|
||||
}
|
||||
if (arcade)
|
||||
{
|
||||
drive.ArcadeDrive(driver_stick);
|
||||
}
|
||||
else
|
||||
{
|
||||
UpdateDrive();
|
||||
if (driver_stick.GetRawButton(THUMB))
|
||||
{
|
||||
float left = driver_stick.GetTwist();
|
||||
float right = -driver_stick.GetTwist();
|
||||
|
||||
drive.TankDrive(left, right);
|
||||
}
|
||||
else
|
||||
{
|
||||
UpdateDrive();
|
||||
}
|
||||
}
|
||||
//bool rampDoing = false;
|
||||
// This is shit code for testing. Replace it with real code.
|
||||
|
Reference in New Issue
Block a user