Quote:
Originally Posted by JBotAlan
So are you saying that it is bad to have the infamous
Code:
pwm01 = p1_y;
pwn02 = p2_y;
lines that have been used in my code in the past? I'm thinking the velocity control stuff is really cool, but overkill for anything but auton.
|
If that was what was the interface, then it's perfectly ok. It's just sorta limiting. Something like
Code:
#define SetVelocity(left,right) pwm01 = left, pwm02 = right
is preferred for this change factor. (EDIT: Typos fixed)
Quote:
|
If I did use the velocity control (which I now fully intend to implement this year) I would use a lookup table for joystick values matching to velocity settings. But like I said, that seems a bit overkill.
|
It might be overkill, but why spend 20hrs writing it for only 10s of the match?
This is especially helpful the drive motors are not symetric--they're biased.
Just one word of advice. If you get into fancy motor control loops, I recommend calibrating the victors to absolute. Subtle bugs appear when 127 - 7 drives but 127 + 7 doesn't. You can use
my small program to do this.