code/WPILib/CANJaguar.cpp
/**
 * Set the maximum voltage change rate.
 * 
 * When in PercentVbus or Voltage output mode, the rate at which the voltage changes can
 * be limited to reduce current spikes.  Set this to 0.0 to disable rate limiting.
 * 
 * @param rampRate The maximum rate of voltage change in Percent Voltage mode in V/s.
 */
Set the maximum voltage change rate.

When in PercentVbus or Voltage output mode, the rate at which the voltage changes can
be limited to reduce current spikes.  Set this to 0.0 to disable rate limiting.

@param rampRate The maximum rate of voltage change in Percent Voltage mode in V/s.
Set the maximum voltage change rate . When in PercentVbus or Voltage output mode the rate at which the voltage changes can be limited to reduce current spikes . Set this to 0 . 0 to disable rate limiting . @param rampRate The maximum rate of voltage change in Percent Voltage mode in V / s .
void CANJaguar::SetVoltageRampRate(double rampRate)
{
	UINT8 dataBuffer[8];
	UINT8 dataSize;
	switch(m_controlMode)
	{
	case kPercentVbus:
		dataSize = packPercentage(dataBuffer, rampRate / (m_maxOutputVoltage * kControllerRate));
		setTransaction(LM_API_VOLT_SET_RAMP, dataBuffer, dataSize);
		break;
	case kVoltage:
		dataSize = packFXP8_8(dataBuffer, rampRate / kControllerRate);
		setTransaction(LM_API_VCOMP_IN_RAMP, dataBuffer, dataSize);
		break;
	default:
		return;
	}
}
void CANJaguar :: SetVoltageRampRate ( double rampRate ) { UINT8 dataBuffer [ 8 ] ; UINT8 dataSize ; switch ( m_controlMode ) { case kPercentVbus : dataSize = packPercentage ( dataBuffer , rampRate / ( m_maxOutputVoltage * kControllerRate ) ) ; setTransaction ( LM_API_VOLT_SET_RAMP , dataBuffer , dataSize ) ; break ; case kVoltage : dataSize = packFXP8_8 ( dataBuffer , rampRate / kControllerRate ) ; setTransaction ( LM_API_VCOMP_IN_RAMP , dataBuffer , dataSize ) ; break ; default : return ; } }
Set the maximum voltage change rate.
Set the maximum voltage change rate .