ok so correct my if im wrong but for 60 inches it would look something like this?
Code:
encoder->Setdistanceperpulse (60.0)
double distanceTraveled = (leftfrontEncoder->GetDistance() +
rightFrontEncoder->GetDistance() +
leftRearEncoder->GetDistance() +
rightRearEncoder->GetDistance())/4.0;
if (distanceTraveled < targetDistance)
{
MecaumDrive_Polar(forwardPower, 0.0, 0.0);
}
else
{
MecaumDrive_Polar(0.0, 0.0, 0.0);
}
thanks for the help in advance im new to c++