From 8d1b6ef8a18574a41c9714e822937bd4fb69f045 Mon Sep 17 00:00:00 2001 From: Jacob Walser Date: Fri, 14 Apr 2017 15:20:31 -0400 Subject: [PATCH] Sub: Don't set notify leak status if leak failsafe is disabled --- ArduSub/failsafe.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ArduSub/failsafe.cpp b/ArduSub/failsafe.cpp index 2c00c2afb1..a25c2684c6 100644 --- a/ArduSub/failsafe.cpp +++ b/ArduSub/failsafe.cpp @@ -256,8 +256,6 @@ void Sub::failsafe_leak_check() { bool status = leak_detector.get_status(); - AP_Notify::flags.leak_detected = status; - // Do nothing if we are dry, or if leak failsafe action is disabled if (status == false || g.failsafe_leak == FS_LEAK_DISABLED) { if (failsafe.leak) { @@ -267,6 +265,8 @@ void Sub::failsafe_leak_check() return; } + AP_Notify::flags.leak_detected = status; + uint32_t tnow = AP_HAL::millis(); // We have a leak