From e3561f720459dc5a49e7133c37567f7d4fbaa7f9 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Wed, 27 Mar 2019 13:53:10 +1100 Subject: [PATCH] Sub: add log entry if depth sensor failure is resolved --- ArduSub/failsafe.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ArduSub/failsafe.cpp b/ArduSub/failsafe.cpp index 757c041f74..741eb3e1a3 100644 --- a/ArduSub/failsafe.cpp +++ b/ArduSub/failsafe.cpp @@ -73,7 +73,10 @@ void Sub::failsafe_sensors_check() // We need a depth sensor to do any sort of auto z control if (sensor_health.depth) { - failsafe.sensor_health = false; + if (failsafe.sensor_health) { + AP::logger().Write_Error(LogErrorSubsystem::FAILSAFE_SENSORS, LogErrorCode::ERROR_RESOLVED); + failsafe.sensor_health = false; + } return; }