2011-11-12 23:14:55 -04:00
|
|
|
|
|
|
|
#include "AP_AnalogSource_ADC.h"
|
|
|
|
|
2011-12-16 16:18:29 -04:00
|
|
|
float AP_AnalogSource_ADC::read(void)
|
2011-11-12 23:14:55 -04:00
|
|
|
{
|
2011-12-16 16:18:29 -04:00
|
|
|
float fullscale = _adc->Ch(_ch);
|
|
|
|
float scaled = _prescale * fullscale;
|
2011-11-12 23:14:55 -04:00
|
|
|
return scaled;
|
|
|
|
}
|