mirror of https://github.com/ArduPilot/ardupilot
AP_ADC_AnalogSource: obey changes to AnalogSource interface
This commit is contained in:
parent
2be552ea22
commit
a6d80af9ed
|
@ -1,8 +1,13 @@
|
|||
|
||||
#include "AP_AnalogSource_ADC.h"
|
||||
#include "AP_ADC_AnalogSource.h"
|
||||
|
||||
float AP_ADC_AnalogSource::read() {
|
||||
float fullscale = _adc->Ch(_ch);
|
||||
float scaled = _prescale * fullscale;
|
||||
return scaled;
|
||||
}
|
||||
|
||||
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. */
|
||||
}
|
||||
|
|
|
@ -12,6 +12,7 @@ public:
|
|||
_adc(adc), _ch(ch), _prescale(prescale)
|
||||
{}
|
||||
float read(void);
|
||||
void set_pin(uint8_t);
|
||||
|
||||
private:
|
||||
AP_ADC * _adc;
|
||||
|
|
Loading…
Reference in New Issue