mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 14:38:30 -04:00
10e546eebd
this gives the full resolution when using the ADC backend. It also adds scaling for the Arduino backend
10 lines
175 B
C++
10 lines
175 B
C++
|
|
#include "AP_AnalogSource_ADC.h"
|
|
|
|
float AP_AnalogSource_ADC::read(void)
|
|
{
|
|
float fullscale = _adc->Ch(_ch);
|
|
float scaled = _prescale * fullscale;
|
|
return scaled;
|
|
}
|