code/WPILib/CANJaguar.cpp
/**
 * Get the version of the Jaguar hardware.
 * 
 * @return The hardware version. 1: Jaguar,  2: Black Jaguar
 */
Get the version of the Jaguar hardware.

@return The hardware version. 1: Jaguar,  2: Black Jaguar
Get the version of the Jaguar hardware . @return The hardware version . 1 : Jaguar 2 : Black Jaguar
UINT8 CANJaguar::GetHardwareVersion()
{
	UINT8 dataBuffer[8];
	UINT8 dataSize;
	getTransaction(LM_API_HWVER, dataBuffer, &dataSize);
	if (dataSize == sizeof(UINT8)+sizeof(UINT8))
	{
		if (*dataBuffer == m_deviceNumber)
		{
			return *(dataBuffer+1);
		}
	}
	return LM_HWVER_JAG_1_0;
}
UINT8 CANJaguar :: GetHardwareVersion ( ) { UINT8 dataBuffer [ 8 ] ; UINT8 dataSize ; getTransaction ( LM_API_HWVER , dataBuffer , & dataSize ) ; if ( dataSize == sizeof ( UINT8 ) + sizeof ( UINT8 ) ) { if ( * dataBuffer == m_deviceNumber ) { return * ( dataBuffer + 1 ) ; } } return LM_HWVER_JAG_1_0 ; }
Get the version of the Jaguar hardware.
Get the version of the Jaguar hardware .
// Assume Gray Jag if there is no response