View Single Post
  #5   Spotlight this post!  
Unread 15-12-2015, 14:43
ozrien's Avatar
ozrien ozrien is offline
Omar Zrien
AKA: Omar
no team
Team Role: Mentor
 
Join Date: Sep 2006
Rookie Year: 2003
Location: Sterling Heights, MI
Posts: 522
ozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond repute
Re: Talon SRX Swerve Control

Cool so the Talon SRX, and sensor are working as expected.

So if you want to do servo to the closest degree, what I'd recommend is taking a look at the google sheet below. Basically the strategy is to input the current sensor position (could be anything) and the target-desired angle (expressed in sensor units from 0 to 1023). The output is the final full position to send to the Talon to servo to. The middle columns will calc the distance to the target in both directions, and then chooses the smaller distance. Looks like this is what's attempted in your VI, but it's hard to follow because there is a lot going on.

hah, Levi you emailed me the same question so I guess this post is redundant, but figured posting this on CD helps everybody.

Zebracorn's (FRC900) followed this strategy last year and it seemed to work well. For anyone interested in looking at an LV implementation I would check out their github (2015 FRC code base).

Google sheet. Make a copy into your google drive or download as excel so you can edit.
https://docs.google.com/spreadsheets...it?usp=sharing

Last edited by ozrien : 15-12-2015 at 14:46.
Reply With Quote