|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
Encoder function calls reporting inf
While attempting to improve our autonomous distance driving by employing a velocity based feedback control using the GetRate() function, we noticed that many of our encoder function calls to retrieve data are reporting inconsistent to our expectations.
GetDistance(): Works without flaw. Currently a mainstay in our autonomous code. This is our main reason to assume our encoder is connected properly GetRate(): Reports 0(zero) no matter the speed of the encoder physically turning GetPeriod(): Reports inf no matter the speed of the encoder physically turning. This is odd because this function is necessary for GetDistance() to work according to the encoder.c file We are calibrating the encoder using SetDistancePerPulse() We have one encoder per side of a WCD style drive, both side reporting the same. Encoder sampling is not changed from the default 4X Both A and B channels for both encoders are connected to the Side Car in ports 6,7,9 and 10 Slot 2 in a 4 slot cRio All data is being viewed using a cout from the WTX console (currently our main method of debugging). Thanks in advance for any help |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|