code/WPILib/CANJaguar.cpp
/**
 * Get the recently set outputValue setpoint.
 * 
 * The scale and the units depend on the mode the Jaguar is in.
 * In PercentVbus Mode, the outputValue is from -1.0 to 1.0 (same as PWM Jaguar).
 * In Voltage Mode, the outputValue is in Volts.
 * In Current Mode, the outputValue is in Amps.
 * In Speed Mode, the outputValue is in Rotations/Minute.
 * In Position Mode, the outputValue is in Rotations.
 * 
 * @return The most recently set outputValue setpoint.
 */
Get the recently set outputValue setpoint.

The scale and the units depend on the mode the Jaguar is in.
In PercentVbus Mode, the outputValue is from -1.0 to 1.0 (same as PWM Jaguar).
In Voltage Mode, the outputValue is in Volts.
In Current Mode, the outputValue is in Amps.
In Speed Mode, the outputValue is in Rotations/Minute.
In Position Mode, the outputValue is in Rotations.

@return The most recently set outputValue setpoint.
Get the recently set outputValue setpoint . The scale and the units depend on the mode the Jaguar is in . In PercentVbus Mode the outputValue is from - 1 . 0 to 1 . 0 ( same as PWM Jaguar ) . In Voltage Mode the outputValue is in Volts . In Current Mode the outputValue is in Amps . In Speed Mode the outputValue is in Rotations / Minute . In Position Mode the outputValue is in Rotations . @return The most recently set outputValue setpoint .
float CANJaguar::Get()
{
	UINT8 dataBuffer[8];
	UINT8 dataSize;
	switch(m_controlMode)
	{
	case kPercentVbus:
		getTransaction(LM_API_VOLT_SET, dataBuffer, &dataSize);
		if (dataSize == sizeof(INT16))
		{
			return unpackPercentage(dataBuffer);
		}
		break;
	case kSpeed:
		getTransaction(LM_API_SPD_SET, dataBuffer, &dataSize);
		if (dataSize == sizeof(INT32))
		{
			return unpackFXP16_16(dataBuffer);
		}
		break;
	case kPosition:
		getTransaction(LM_API_POS_SET, dataBuffer, &dataSize);
		if (dataSize == sizeof(INT32))
		{
			return unpackFXP16_16(dataBuffer);
		}
		break;
	case kCurrent:
		getTransaction(LM_API_ICTRL_SET, dataBuffer, &dataSize);
		if (dataSize == sizeof(INT16))
		{
			return unpackFXP8_8(dataBuffer);
		}
		break;
	case kVoltage:
		getTransaction(LM_API_VCOMP_SET, dataBuffer, &dataSize);
		if (dataSize == sizeof(INT16))
		{
			return unpackFXP8_8(dataBuffer);
		}
		break;
	}
	return 0.0;
}
float CANJaguar :: Get ( ) { UINT8 dataBuffer [ 8 ] ; UINT8 dataSize ; switch ( m_controlMode ) { case kPercentVbus : getTransaction ( LM_API_VOLT_SET , dataBuffer , & dataSize ) ; if ( dataSize == sizeof ( INT16 ) ) { return unpackPercentage ( dataBuffer ) ; } break ; case kSpeed : getTransaction ( LM_API_SPD_SET , dataBuffer , & dataSize ) ; if ( dataSize == sizeof ( INT32 ) ) { return unpackFXP16_16 ( dataBuffer ) ; } break ; case kPosition : getTransaction ( LM_API_POS_SET , dataBuffer , & dataSize ) ; if ( dataSize == sizeof ( INT32 ) ) { return unpackFXP16_16 ( dataBuffer ) ; } break ; case kCurrent : getTransaction ( LM_API_ICTRL_SET , dataBuffer , & dataSize ) ; if ( dataSize == sizeof ( INT16 ) ) { return unpackFXP8_8 ( dataBuffer ) ; } break ; case kVoltage : getTransaction ( LM_API_VCOMP_SET , dataBuffer , & dataSize ) ; if ( dataSize == sizeof ( INT16 ) ) { return unpackFXP8_8 ( dataBuffer ) ; } break ; } return 0.0 ; }
Get the recently set outputValue setpoint.
Get the recently set outputValue setpoint .