untested tweaks: different TURN_FACTOR, buttons toggle between piecewise and arcade drive
This commit is contained in:
parent
5153aaa161
commit
2f010032da
@ -14,7 +14,7 @@
|
|||||||
// affecting the robot. Use this for cleaning up drive train and shooter.
|
// affecting the robot. Use this for cleaning up drive train and shooter.
|
||||||
// Also used for detecting changes in an axis' value.
|
// 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
|
// = y : x >= 0
|
||||||
// Right(x,y) = y : x < 0
|
// Right(x,y) = y : x < 0
|
||||||
// = y*(1 - TF*x) : x >= 0
|
// = y*(1 - TF*x) : x >= 0
|
||||||
@ -52,6 +52,7 @@ private:
|
|||||||
bool ramping;
|
bool ramping;
|
||||||
bool shooting;
|
bool shooting;
|
||||||
bool unjamming;
|
bool unjamming;
|
||||||
|
bool arcade;
|
||||||
float shooter_power;
|
float shooter_power;
|
||||||
|
|
||||||
LiveWindow *lw = LiveWindow::GetInstance();
|
LiveWindow *lw = LiveWindow::GetInstance();
|
||||||
@ -118,6 +119,20 @@ private:
|
|||||||
}
|
}
|
||||||
|
|
||||||
void TeleopPeriodic()
|
void TeleopPeriodic()
|
||||||
|
{
|
||||||
|
if(driver_stick.GetRawButton(7))
|
||||||
|
{
|
||||||
|
arcade = true;
|
||||||
|
}
|
||||||
|
if(driver_stick.GetRawButton(8))
|
||||||
|
{
|
||||||
|
arcade = false;
|
||||||
|
}
|
||||||
|
if (arcade)
|
||||||
|
{
|
||||||
|
drive.ArcadeDrive(driver_stick);
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
if (driver_stick.GetRawButton(THUMB))
|
if (driver_stick.GetRawButton(THUMB))
|
||||||
{
|
{
|
||||||
@ -130,6 +145,7 @@ private:
|
|||||||
{
|
{
|
||||||
UpdateDrive();
|
UpdateDrive();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
//bool rampDoing = false;
|
//bool rampDoing = false;
|
||||||
// This is shit code for testing. Replace it with real code.
|
// This is shit code for testing. Replace it with real code.
|
||||||
if(!ramping && operator_stick.GetRawButton(RAMP_RAISE))
|
if(!ramping && operator_stick.GetRawButton(RAMP_RAISE))
|
||||||
|
Reference in New Issue
Block a user