|
cRIO - motor controller code (esp. victor)
I think there is a bug in the speed controller init code for the victors.
The default settings for the victor speed controler set the center position as 132. The comments state that the values
used were established "empirically"
The default bounds are:
max 210
Dead Band Top 138
Dead Band Mid 132
Dead Band Bot 126
min 56
Given, as the comments state, the values can vary from victor to victor, and given the values can chage if the victors
are calibrated using the Victor calibration procedure of (give them max PWM and min PWM and push the switch on the
victor)
I think a better default would be centered around 127, with max and min at 254 and 0 respectively.
Better yet would be to have a motor controller constructor that allows these to be set whe the controller is created.
At the very least we need a note to teams to call SetBounds() on their controllers to get values that match their
hardware (instead of values that match the hardware of the WPI library developers.
This may explain why we were seeing the drive moters creep and hum when the joysticks were neutral. For those motors,
neutal was actually just a little bit on.
The code for the Jaguar controller looks more like what I would expect.
|