View Single Post
  #3   Spotlight this post!  
Unread 24-01-2017, 17:23
fovea1959's Avatar
fovea1959 fovea1959 is offline
Herder of programmers
AKA: Doug Wegscheid
FRC #3620 (The Average Joes)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2011
Location: St Joseph
Posts: 336
fovea1959 will become famous soon enough
Re: Minimum Flywheel Encoder CPR

Quote:
Originally Posted by Oblarg View Post
It depends on whether the advertised CPR is cycles per revolution or edges per revolution - these differ by a factor of 4.

The config method wants the former, despite all the native units being calculated using the latter.

Yes, this is confusing and bad and should be changed
Ah, now I *think* I understand. Once I say .ConfigEncoderCodesPerRev(3) [which is correct, 12 transitions per rev is 3 cycles or counts per rev), then the .set() method works in RPM.

If I don't call .ConfigEncoderCodesPerRev(), then .set() works in the silly transitions / 100ms units.

Do I have that correct?
Reply With Quote