From 56207ac284fc177925f550d998df6a079851e15c Mon Sep 17 00:00:00 2001 From: Jacob Walser Date: Tue, 7 Feb 2017 14:43:41 -0500 Subject: [PATCH] Sub: AP_WaterDetector -> AP_LeakDetector --- ArduSub/ArduSub.cpp | 2 +- ArduSub/Parameters.cpp | 8 ++++---- ArduSub/Parameters.h | 2 +- ArduSub/Sub.h | 6 ++---- ArduSub/make.inc | 2 +- ArduSub/wscript | 2 +- 6 files changed, 10 insertions(+), 12 deletions(-) diff --git a/ArduSub/ArduSub.cpp b/ArduSub/ArduSub.cpp index 1263593540..6c808d40b8 100644 --- a/ArduSub/ArduSub.cpp +++ b/ArduSub/ArduSub.cpp @@ -460,7 +460,7 @@ void Sub::dataflash_periodic(void) // three_hz_loop - 3.3hz loop void Sub::three_hz_loop() { - set_leak_status(water_detector.update()); + set_leak_status(leak_detector.update()); failsafe_internal_pressure_check(); diff --git a/ArduSub/Parameters.cpp b/ArduSub/Parameters.cpp index 32b95f0526..2f0c532c9e 100644 --- a/ArduSub/Parameters.cpp +++ b/ArduSub/Parameters.cpp @@ -916,10 +916,10 @@ const AP_Param::Info Sub::var_info[] = { // @Path: ../libraries/AP_GPS/AP_GPS.cpp GOBJECT(gps, "GPS_", AP_GPS), - // Water driver - // @Group: WD_ - // @Path: ../libraries/AP_WaterDetector/AP_WaterDetector.cpp - GOBJECT(water_detector, "WD_", AP_WaterDetector), + // Leak detector + // @Group: LEAK_ + // @Path: ../libraries/AP_LeakDetector/AP_LeakDetector.cpp + GOBJECT(leak_detector, "LEAK", AP_LeakDetector), // @Group: SCHED_ // @Path: ../libraries/AP_Scheduler/AP_Scheduler.cpp diff --git a/ArduSub/Parameters.h b/ArduSub/Parameters.h index 68d628e188..b63ceb36db 100644 --- a/ArduSub/Parameters.h +++ b/ArduSub/Parameters.h @@ -390,7 +390,7 @@ public: k_param_pid_crosstrack_control, k_param_pid_heading_control, - k_param_water_detector, // water detector object + k_param_leak_detector, // leak detector object k_param_failsafe_leak, // leak failsafe behavior k_param_failsafe_pressure, // internal pressure failsafe behavior k_param_failsafe_pressure_max, // maximum internal pressure in pascal before failsafe is triggered diff --git a/ArduSub/Sub.h b/ArduSub/Sub.h index ffab3e488c..631da1e7ea 100644 --- a/ArduSub/Sub.h +++ b/ArduSub/Sub.h @@ -92,9 +92,7 @@ #include #include // Pilot input handling library #include // Joystick/gamepad button function assignment -#include // Water detector - -// Configuration +#include "../libraries/AP_LeakDetector/AP_LeakDetector.h" // Leak detector #include "defines.h" #include "config.h" @@ -171,7 +169,7 @@ private: AP_GPS gps; - AP_WaterDetector water_detector; + AP_LeakDetector leak_detector; // flight modes convenience array AP_Int8 *flight_modes; diff --git a/ArduSub/make.inc b/ArduSub/make.inc index 42f818c8e5..03916fd98d 100644 --- a/ArduSub/make.inc +++ b/ArduSub/make.inc @@ -61,4 +61,4 @@ LIBRARIES += AP_IRLock LIBRARIES += AC_InputManager LIBRARIES += AP_ADSB LIBRARIES += AP_JSButton -LIBRARIES += AP_WaterDetector +LIBRARIES += AP_LeakDetector diff --git a/ArduSub/wscript b/ArduSub/wscript index 59e9a78702..943bef7dc2 100644 --- a/ArduSub/wscript +++ b/ArduSub/wscript @@ -23,6 +23,7 @@ def build(bld): 'AP_InertialNav', 'AP_JSButton', 'AP_LandingGear', + 'AP_LeakDetector', 'AP_Menu', 'AP_Motors', 'AP_Mount', @@ -32,7 +33,6 @@ def build(bld): 'AP_RSSI', 'AP_Relay', 'AP_ServoRelayEvents', - 'AP_WaterDetector', ], use='mavlink', )