code/WPILib/CANJaguar.cpp
/**
 * Get the speed of the encoder.
 * 
 * @return The speed of the motor in RPM based on the configured feedback.
 */
Get the speed of the encoder.

@return The speed of the motor in RPM based on the configured feedback.
Get the speed of the encoder . @return The speed of the motor in RPM based on the configured feedback .
double CANJaguar::GetSpeed()
{
	UINT8 dataBuffer[8];
	UINT8 dataSize;
	getTransaction(LM_API_STATUS_SPD, dataBuffer, &dataSize);
	if (dataSize == sizeof(INT32))
	{
		return unpackFXP16_16(dataBuffer);
	}
	return 0.0;
}
double CANJaguar :: GetSpeed ( ) { UINT8 dataBuffer [ 8 ] ; UINT8 dataSize ; getTransaction ( LM_API_STATUS_SPD , dataBuffer , & dataSize ) ; if ( dataSize == sizeof ( INT32 ) ) { return unpackFXP16_16 ( dataBuffer ) ; } return 0.0 ; }
Get the speed of the encoder.
Get the speed of the encoder .