|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools |
Rating:
|
Display Modes |
|
#13
|
|||
|
|||
|
Re: Unexpected results from Encoder::GetRate()
Quote:
Here, the upSource is A chan and the downSource is B chan. This is called by encoder.cpp. Counter::Counter(EncodingType encodingType, DigitalSource *upSource, DigitalSource *downSource, bool inverted) { wpi_assert(encodingType == k1X || encodingType == k2X); InitCounter(kExternalDirection); SetUpSource(upSource); SetDownSource(downSource); if (encodingType == k1X) SetUpSourceEdge(true, false); // THis is clear to me else SetUpSourceEdge(true, true); // This is clear to me SetDownSourceEdge(inverted, true); // This needs explanation } As I understand it, the tcounters have independent sources than can be set to count up or down. How does setting the B chan to always count down on a TED and down on TEU if inverted=true set up the counter to give the proper direction? |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [BB] An unexpected change in plans | yodameister | General Forum | 22 | 01-12-2009 21:26 |
| Inconsistent reading from encoder get rate | rwood359 | National Instruments LabVIEW and Data Acquisition | 5 | 13-01-2009 19:10 |
| Results from Drexel, thanks from 365. | archiver | 2001 | 1 | 24-06-2002 02:44 |
| Results from GLR? | archiver | 2001 | 0 | 24-06-2002 02:44 |
| results from regionals | archiver | 2000 | 0 | 23-06-2002 22:31 |