code/WPILib/CANJaguar.cpp
/**
 * Get the position of the encoder or potentiometer.
 * 
 * @return The position of the motor in rotations based on the configured feedback.
 */
Get the position of the encoder or potentiometer.

@return The position of the motor in rotations based on the configured feedback.
Get the position of the encoder or potentiometer . @return The position of the motor in rotations based on the configured feedback .
double CANJaguar::GetPosition()
{
	UINT8 dataBuffer[8];
	UINT8 dataSize;
	getTransaction(LM_API_STATUS_POS, dataBuffer, &dataSize);
	if (dataSize == sizeof(INT32))
	{
		return unpackFXP16_16(dataBuffer);
	}
	return 0.0;
}
double CANJaguar :: GetPosition ( ) { UINT8 dataBuffer [ 8 ] ; UINT8 dataSize ; getTransaction ( LM_API_STATUS_POS , dataBuffer , & dataSize ) ; if ( dataSize == sizeof ( INT32 ) ) { return unpackFXP16_16 ( dataBuffer ) ; } return 0.0 ; }
Get the position of the encoder or potentiometer.
Get the position of the encoder or potentiometer .