AP_LeakDetector: Add navigator support

Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
This commit is contained in:
Patrick José Pereira 2020-09-30 10:18:38 -03:00 committed by Jacob Walser
parent 4c7af1d99f
commit 175d55a0aa
1 changed files with 8 additions and 3 deletions

View File

@ -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