Sorry wasnt paying attention when i posted that it was off the backup file. heres the working version.
Code:
pwm01 = p1_y;
if (p1_y >= 120 && p1_y <= 133)
{pwm01 = 127;}
else if (p1_y < 120 && p1_y > 133)
{pwm01 = (1/1635.6 * (p1_y * p1_y) - 0.16149181 * (p1_y * p1_y) + 9.10002);}
/******************/
pwm02 = p2_y;
if (p2_y >= 120 && p2_y <= 133)
{pwm02 = 127;}
else if (p2_y < 120 && p2_y > 133)
{pwm02 = (1/1635.6 * (p2_y * p2_y) - 0.16149181 * (p2_y * p2_y) + 9.10002);}
Sometimes numbers are fun... not today.
__________________
If saftey is first and i put FIRST ahead of everything, then i must be the safest guy in the world.
Team 521 Alumni -- Team 1740 Mentor-- Go Go 1740!
Sometimes I think I've been doing this too long and other times I think I haven't done this enough... but all the times I'm sure I'm crazy
Photonics, It's Your Future