code/WPILib/AnalogTrigger.cpp
/**
 * Set the upper and lower limits of the analog trigger.
 * The limits are given as floating point voltage values.
 */
Set the upper and lower limits of the analog trigger.
The limits are given as floating point voltage values.
Set the upper and lower limits of the analog trigger . The limits are given as floating point voltage values .
void AnalogTrigger::SetLimitsVoltage(float lower, float upper)
{
	if (lower > upper)
	{
		wpi_fatal(AnalogTriggerLimitOrderError);
	}
	m_trigger->writeLowerLimit(m_analogModule->VoltsToValue(m_channel, lower), &status);
	m_trigger->writeUpperLimit(m_analogModule->VoltsToValue(m_channel, upper), &status);
	wpi_assertCleanStatus(status);
}
void AnalogTrigger :: SetLimitsVoltage ( float lower , float upper ) { if ( lower > upper ) { wpi_fatal ( AnalogTriggerLimitOrderError ) ; } m_trigger -> writeLowerLimit ( m_analogModule -> VoltsToValue ( m_channel , lower ) , & status ) ; m_trigger -> writeUpperLimit ( m_analogModule -> VoltsToValue ( m_channel , upper ) , & status ) ; wpi_assertCleanStatus ( status ) ; }
Set the upper and lower limits of the analog trigger.
Set the upper and lower limits of the analog trigger .
// TODO: This depends on the averaged setting.  Only raw values will work as is.