code/WPILib/DriverStation.cpp
/**
 * Read the battery voltage from the specified AnalogChannel.
 * 
 * This accessor assumes that the battery voltage is being measured
 * through the voltage divider on an analog breakout.
 * 
 * @return The battery voltage.
 */
Read the battery voltage from the specified AnalogChannel.

This accessor assumes that the battery voltage is being measured
through the voltage divider on an analog breakout.

@return The battery voltage.
Read the battery voltage from the specified AnalogChannel . This accessor assumes that the battery voltage is being measured through the voltage divider on an analog breakout . @return The battery voltage .
float DriverStation::GetBatteryVoltage()
{
	wpi_assert(m_batteryChannel != NULL);
	return m_batteryChannel->GetAverageVoltage() * (1680.0 / 1000.0);
}
float DriverStation :: GetBatteryVoltage ( ) { wpi_assert ( m_batteryChannel != NULL ) ; return m_batteryChannel -> GetAverageVoltage ( ) * ( 1680.0 / 1000.0 ) ; }
Read the battery voltage from the specified AnalogChannel.
Read the battery voltage from the specified AnalogChannel .
// The Analog bumper has a voltage divider on the battery source. // Vbatt *--/\/\/\--* Vsample *--/\/\/\--* Gnd //         680 Ohms            1000 Ohms