View Single Post
  #3   Spotlight this post!  
Unread 10-02-2013, 16:06
joelg236 joelg236 is offline
4334 Retired Mentor & Alumni
AKA: Joel Gallant
no team
Team Role: Mentor
 
Join Date: Dec 2011
Rookie Year: 2012
Location: Calgary
Posts: 733
joelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond repute
Re: significance of encoder function getRaw()

Code:
/**
 * Read the current counter value.
 * Read the value at this instant. It may still be running, so it reflects the current value. Next
 * time it is read, it might have a different value.
 */
public int get() {
    return m_counter.readOutput_Value();
}
and

Code:
/**
 * Gets the raw value from the encoder.
 * The raw value is the actual count unscaled by the 1x, 2x, or 4x scale
 * factor.
 * @return Current raw count from the encoder
 */
public int getRaw() {
    int value;
    if (m_counter != null) {
        value = m_counter.get();
    } else {
        value = m_encoder.readOutput_Value();
    }
    return value;
}
getRaw() is unscaled for the encoder type (quadrature, 2x, 1x, etc.).
__________________
All opinions are my own.
Reply With Quote