Gocator API
|
Gets the current encoder count from the sensor.
This is useful when an encoder value is needed while the sensor is not started and thus not producing data with encoder values in the stamp.
Note that this function sends a command to the sensor, where the current encoder value is read and then sent back in a reply message. So this is not the most accurate method of reading the encoder value. To read the encoder value of a specific frame of data, use the encoder value from the GoStamp received as GO_DATA_MESSAGE_TYPE_STAMP.
sensor | GoSensor object. |
encoder | Receives the encoder count (ticks). |