|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Question about QuadEncoders [C++]
what does the Get function in Encoder class return? detailed explaination if you can, please
![]() |
|
#2
|
|||
|
|||
|
Re: Question about QuadEncoders [C++]
from Encoder.cpp:
Code:
/**
* Gets the current count.
* Returns the current count on the QuadEncoder.
* @return Current count from the QuadEncoder.
*/
INT32 Encoder::Get(void)
{
INT32 value = m_encoder->readOutput_Value(&status);
wpi_assertCleanStatus(status);
return value;
}
Your other option is GetPeriod, which: "Returns the period of the most recent Quad Encoder pulse in microseconds." |
|
#3
|
|||
|
|||
|
Re: Question about QuadEncoders [C++]
well, but what happened if I change the direction, will the Get function give me the duplication of ticks or maybe the distance it passed?
![]() |
|
#4
|
||||
|
||||
|
Re: Question about QuadEncoders [C++]
Quote:
I am not sure if GetPeriod will return a negative encoder period or not. |
|
#5
|
|||
|
|||
|
Re: Question about QuadEncoders [C++]
No, GetPeriod will not return a negative number. It simply returns time passed between the last two pulses.
And yes, Daniel is right about the values Get() returns. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| question about judgeing | legomaster3945 | 3D Animation and Competition | 3 | 01-03-2008 23:40 |
| A question about current.... | Adam Y. | Electrical | 41 | 26-11-2004 21:46 |
| Question about wheels | Randy_Ai | Technical Discussion | 9 | 24-01-2002 17:14 |
| Question about bumpers | Randy_Ai | Technical Discussion | 2 | 23-01-2002 17:59 |
| question about gyrochip | wes16zeus | Technical Discussion | 3 | 13-11-2001 16:24 |