AP_HAL_Linux: changed ADC logic a bit for Navio 2

- make voltage_average_ratiometric() the same as voltage_average()
- make read_latest() the same as voltage_average()

wip
This commit is contained in:
Staroselskii Georgii 2016-04-27 16:36:01 +03:00
parent 3feade792a
commit 60426faa52

View File

@ -62,7 +62,7 @@ float AnalogSource_Navio2::read_average()
float AnalogSource_Navio2::read_latest()
{
return _value;
return voltage_average();
}
float AnalogSource_Navio2::voltage_average()
@ -84,12 +84,13 @@ float AnalogSource_Navio2::voltage_average()
float AnalogSource_Navio2::voltage_latest()
{
read_latest();
return _value;
}
float AnalogSource_Navio2::voltage_average_ratiometric()
{
return _value;
return voltage_average();
}
AnalogIn_Navio2::AnalogIn_Navio2()