Why does the defalt arcade drive on robotc have slow turning and how can I combat this?

This is the program that I’m using
task main()
{
int threshold = 10;
static int leftSpeed = 0;
static int rightSpeed = 0;

while(true)
{
	leftSpeed = (getJoystickValue(ChA) + getJoystickValue(ChC)/2);	// (y - x)/2
	rightSpeed = (getJoystickValue(ChA) - getJoystickValue(ChC)/2);	// (y + x)/2

	if(leftSpeed > threshold || leftSpeed < -threshold)
	{
		setMotorSpeed(leftMotor, leftSpeed);
	}
	else
	{
		setMotorSpeed(leftMotor, 0);
	}

	if(rightSpeed > threshold || rightSpeed < -threshold)
	{
		setMotorSpeed(rightMoto, rightSpeed);
	}
	else
	{
		setMotorSpeed(rightMoto, 0);
	}
	if(getJoystickValue(ChB) > threshold ||getJoystickValue(ChB) < - threshold)
	{
		setMotorSpeed(omniMotor, getJoystickValue(ChB));
	}
	else
	{
		setMotorSpeed(omniMotor, 0);
	}
}

}
the omni is set in the c direction.

Find the setting of the left and right wheel speeds.

Take out the bolded "/2"s, so that that section of code looks like this:

leftSpeed = (getJoystickValue(ChA) + getJoystickValue(ChC)); // (y - x)/2
rightSpeed = (getJoystickValue(ChA) - getJoystickValue(ChC)); // (y + x)/2

Good luck!

3 Likes

thanks @2775Josh
(20Chars)