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