Does anybody know what the value being returned by getRaw() actually signifies? and how is it distinct from get()?
Look at the file “Encoder.java” in the WPILib source code folder installed on your development computer.
Search for get() and getRaw() and look at the comment section preceding each method.
/**
* 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
/**
* 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.).