From 175d55a0aae3590e89faf3823fad9f1479280527 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20Jos=C3=A9=20Pereira?= Date: Wed, 30 Sep 2020 10:18:38 -0300 Subject: [PATCH] AP_LeakDetector: Add navigator support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Patrick José Pereira --- libraries/AP_LeakDetector/AP_LeakDetector.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/libraries/AP_LeakDetector/AP_LeakDetector.cpp b/libraries/AP_LeakDetector/AP_LeakDetector.cpp index 4539640b60..1127bbd769 100644 --- a/libraries/AP_LeakDetector/AP_LeakDetector.cpp +++ b/libraries/AP_LeakDetector/AP_LeakDetector.cpp @@ -7,7 +7,7 @@ const AP_Param::GroupInfo AP_LeakDetector::var_info[] = { // @Param: 1_PIN // @DisplayName: Pin that leak detector is connected to // @Description: Pin that the leak detector is connected to - // @Values: -1:Disabled,50:Pixhawk Aux1,51:Pixhawk Aux2,52:Pixhawk Aux3,53:Pixhawk Aux4,54:Pixhawk Aux5,55:Pixhawk Aux6,13:Pixhawk 3.3ADC1,14:Pixhawk 3.3ADC2,15:Pixhawk 6.6ADC + // @Values: -1:Disabled,50:Pixhawk Aux1,51:Pixhawk Aux2,52:Pixhawk Aux3,53:Pixhawk Aux4,54:Pixhawk Aux5,55:Pixhawk Aux6,13:Pixhawk 3.3ADC1,14:Pixhawk 3.3ADC2,15:Pixhawk 6.6ADC,11:Navigator Leak1 // @User: Standard // @RebootRequired: True AP_GROUPINFO("1_PIN", 1, AP_LeakDetector, _pin[0], -1), @@ -23,7 +23,7 @@ const AP_Param::GroupInfo AP_LeakDetector::var_info[] = { // @Param: 2_PIN // @DisplayName: Pin that leak detector is connected to // @Description: Pin that the leak detector is connected to - // @Values: -1:Disabled,50:Pixhawk Aux1,51:Pixhawk Aux2,52:Pixhawk Aux3,53:Pixhawk Aux4,54:Pixhawk Aux5,55:Pixhawk Aux6,13:Pixhawk 3.3ADC1,14:Pixhawk 3.3ADC2,15:Pixhawk 6.6ADC + // @Values: -1:Disabled,50:Pixhawk Aux1,51:Pixhawk Aux2,52:Pixhawk Aux3,53:Pixhawk Aux4,54:Pixhawk Aux5,55:Pixhawk Aux6,13:Pixhawk 3.3ADC1,14:Pixhawk 3.3ADC2,15:Pixhawk 6.6ADC,11:Navigator Leak1 // @User: Standard // @RebootRequired: True AP_GROUPINFO("2_PIN", 3, AP_LeakDetector, _pin[1], -1), @@ -40,7 +40,7 @@ const AP_Param::GroupInfo AP_LeakDetector::var_info[] = { // @Param: 3_PIN // @DisplayName: Pin that leak detector is connected to // @Description: Pin that the leak detector is connected to - // @Values: -1:Disabled,50:Pixhawk Aux1,51:Pixhawk Aux2,52:Pixhawk Aux3,53:Pixhawk Aux4,54:Pixhawk Aux5,55:Pixhawk Aux6,13:Pixhawk 3.3ADC1,14:Pixhawk 3.3ADC2,15:Pixhawk 6.6ADC + // @Values: -1:Disabled,50:Pixhawk Aux1,51:Pixhawk Aux2,52:Pixhawk Aux3,53:Pixhawk Aux4,54:Pixhawk Aux5,55:Pixhawk Aux6,13:Pixhawk 3.3ADC1,14:Pixhawk 3.3ADC2,15:Pixhawk 6.6ADC,11:Navigator Leak1 // @User: Standard // @RebootRequired: True AP_GROUPINFO("3_PIN", 5, AP_LeakDetector, _pin[2], -1), @@ -79,6 +79,11 @@ void AP_LeakDetector::init() _state[i].instance = i; _drivers[i] = new AP_LeakDetector_Analog(*this, _state[i]); break; +#elif CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_NAVIGATOR + case 11: + _state[i].instance = i; + _drivers[i] = new AP_LeakDetector_Digital(*this, _state[i]); + break; #else #pragma message("Board does not support LeakDetection") #endif