From 47d2f8dc6d49b834296a28a5e1e943edb78d9f1e Mon Sep 17 00:00:00 2001 From: Lucas De Marchi Date: Thu, 28 Jul 2016 11:00:36 -0300 Subject: [PATCH] AP_HAL_Linux: AnalogIn_ADS1115: return 5V on board_voltage board voltage is not available - don't return 0V since that prevents arming. --- libraries/AP_HAL_Linux/AnalogIn_ADS1115.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/libraries/AP_HAL_Linux/AnalogIn_ADS1115.h b/libraries/AP_HAL_Linux/AnalogIn_ADS1115.h index ed5475d5d0..caf65b1ca0 100644 --- a/libraries/AP_HAL_Linux/AnalogIn_ADS1115.h +++ b/libraries/AP_HAL_Linux/AnalogIn_ADS1115.h @@ -25,14 +25,13 @@ private: class AnalogIn_ADS1115: public AP_HAL::AnalogIn { public: AnalogIn_ADS1115(); - void init(); - AP_HAL::AnalogSource* channel(int16_t n); + + void init() override; + AP_HAL::AnalogSource *channel(int16_t n) override; /* Board voltage is not available */ - float board_voltage(void) - { - return 0.0f; - } + float board_voltage() override { return 5.0f; } + private: uint8_t _channels_number; void _update();