2011-11-12 23:14:55 -04:00
|
|
|
|
2012-12-04 18:56:57 -04:00
|
|
|
#include "AP_ADC_AnalogSource.h"
|
2011-11-12 23:14:55 -04:00
|
|
|
|
2012-10-11 13:39:27 -03:00
|
|
|
float AP_ADC_AnalogSource::read() {
|
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;
|
|
|
|
}
|
2012-12-04 18:56:57 -04:00
|
|
|
|
|
|
|
void AP_ADC_AnalogSource::set_pin(uint8_t machtnichts) {
|
|
|
|
/* it would be an error to call this
|
|
|
|
* but for now we'll leave it a no-op. */
|
|
|
|
}
|