code/WPILib/CANJaguar.cpp
/**
 * Get the active control mode from the Jaguar.
 * 
 * Ask the Jag what mode it is in.
 * 
 * @return ControlMode that the Jag is in.
 */
Get the active control mode from the Jaguar.

Ask the Jag what mode it is in.

@return ControlMode that the Jag is in.
Get the active control mode from the Jaguar . Ask the Jag what mode it is in . @return ControlMode that the Jag is in .
CANJaguar::ControlMode CANJaguar::GetControlMode()
{
	UINT8 dataBuffer[8];
	UINT8 dataSize;
	getTransaction(LM_API_STATUS_CMODE, dataBuffer, &dataSize);
	if (dataSize == sizeof(INT8))
	{
		return (ControlMode)dataBuffer[0];
	}
	return kPercentVbus;
}
CANJaguar :: ControlMode CANJaguar :: GetControlMode ( ) { UINT8 dataBuffer [ 8 ] ; UINT8 dataSize ; getTransaction ( LM_API_STATUS_CMODE , dataBuffer , & dataSize ) ; if ( dataSize == sizeof ( INT8 ) ) { return ( ControlMode ) dataBuffer [ 0 ] ; } return kPercentVbus ; }
Get the active control mode from the Jaguar.
Get the active control mode from the Jaguar .