code/WPILib/DriverStation.cpp
/**
 * Get an analog voltage from the Driver Station.
 * The analog values are returned as voltage values for the Driver Station analog inputs.
 * These inputs are typically used for advanced operator interfaces consisting of potentiometers
 * or resistor networks representing values on a rotary switch.
 * 
 * @param channel The analog input channel on the driver station to read from. Valid range is 1 - 4.
 * @return The analog voltage on the input.
 */
Get an analog voltage from the Driver Station.
The analog values are returned as voltage values for the Driver Station analog inputs.
These inputs are typically used for advanced operator interfaces consisting of potentiometers
or resistor networks representing values on a rotary switch.

@param channel The analog input channel on the driver station to read from. Valid range is 1 - 4.
@return The analog voltage on the input.
Get an analog voltage from the Driver Station . The analog values are returned as voltage values for the Driver Station analog inputs . These inputs are typically used for advanced operator interfaces consisting of potentiometers or resistor networks representing values on a rotary switch . @param channel The analog input channel on the driver station to read from . Valid range is 1 - 4 . @return The analog voltage on the input .
float DriverStation::GetAnalogIn(UINT32 channel)
{
	wpi_assert ((channel >= 1) && (channel <= 4));
	switch (channel)
	{
	case 1:
		return kDSAnalogInScaling * m_controlData->analog1;
	case 2:
		return kDSAnalogInScaling * m_controlData->analog2;
	case 3:
		return kDSAnalogInScaling * m_controlData->analog3;
	case 4:
		return kDSAnalogInScaling * m_controlData->analog4;
	}
	return 0.0;
}
float DriverStation :: GetAnalogIn ( UINT32 channel ) { wpi_assert ( ( channel >= 1 ) && ( channel <= 4 ) ) ; switch ( channel ) { case 1 : return kDSAnalogInScaling * m_controlData -> analog1 ; case 2 : return kDSAnalogInScaling * m_controlData -> analog2 ; case 3 : return kDSAnalogInScaling * m_controlData -> analog3 ; case 4 : return kDSAnalogInScaling * m_controlData -> analog4 ; } return 0.0 ; }
Get an analog voltage from the Driver Station.
Get an analog voltage from the Driver Station .