From cec08be9cb170b3ce6aa8a8e8015dd305271591a Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 13 May 2013 15:13:43 +1000 Subject: [PATCH] AP_Rangefinder: use ratiometric analog input for analog sonar --- libraries/AP_RangeFinder/AP_RangeFinder_analog.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/AP_RangeFinder/AP_RangeFinder_analog.cpp b/libraries/AP_RangeFinder/AP_RangeFinder_analog.cpp index b26e778d70..79cb539414 100644 --- a/libraries/AP_RangeFinder/AP_RangeFinder_analog.cpp +++ b/libraries/AP_RangeFinder/AP_RangeFinder_analog.cpp @@ -120,7 +120,7 @@ float AP_RangeFinder_analog::voltage(void) _source->set_pin(_pin); _source->set_stop_pin((uint8_t)_stop_pin); _source->set_settle_time((uint16_t)_settle_time_ms); - return _source->voltage_average(); + return _source->voltage_average_ratiometric(); } /*