Quote:
Originally Posted by ozrien
You must select the sensor type before calling setPosition(). setpos and getpos are for the "selected" sensor.
Also be aware that calling setPosition doesn't instantly clear the return of the next getPosition(), leave at least 20ms or so for the Talon Feedback Status Frame to update the RIO. Then call getPosition(). It does however clear the position in the firmware of the Talon within 100us or so.
setEncPosition/getEncPosition are low level functions for quadrature encoder. They do not update as fast but provide low-level api for getting sensor values from all sensor types at once. See section 16.9 for more info. Similarly there are GetAnalo* functions for analog sensors, and GetPulseWid* funcs for pulse width sensors.
|
Ah, thank you for the clarification.