From 83b75db6b0e26195b71fe4ff04372c26af87a09b Mon Sep 17 00:00:00 2001 From: Jacob Walser Date: Wed, 22 Feb 2017 16:38:18 -0500 Subject: [PATCH] Sub: Increase interval between failsafe warnings --- ArduSub/events.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/ArduSub/events.cpp b/ArduSub/events.cpp index 0f43baf0be..75ecb0bbd7 100644 --- a/ArduSub/events.cpp +++ b/ArduSub/events.cpp @@ -70,8 +70,8 @@ void Sub::failsafe_internal_pressure_check() failsafe.internal_pressure = true; } - // Warn every 5 seconds - if (failsafe.internal_pressure && tnow > last_pressure_warn_ms + 5000) { + // Warn every 30 seconds + if (failsafe.internal_pressure && tnow > last_pressure_warn_ms + 30000) { last_pressure_warn_ms = tnow; gcs_send_text(MAV_SEVERITY_WARNING, "Internal pressure critical!"); } @@ -99,8 +99,8 @@ void Sub::failsafe_internal_temperature_check() failsafe.internal_temperature = true; } - // Warn every 5 seconds - if (failsafe.internal_temperature && tnow > last_temperature_warn_ms + 5000) { + // Warn every 30 seconds + if (failsafe.internal_temperature && tnow > last_temperature_warn_ms + 30000) { last_temperature_warn_ms = tnow; gcs_send_text(MAV_SEVERITY_WARNING, "Internal temperature critical!"); } @@ -122,8 +122,8 @@ void Sub::set_leak_status(bool status) uint32_t tnow = AP_HAL::millis(); // We have a leak - // Always send a warning every 5 seconds - if (tnow > failsafe.last_leak_warn_ms + 5000) { + // Always send a warning every 20 seconds + if (tnow > failsafe.last_leak_warn_ms + 20000) { failsafe.last_leak_warn_ms = tnow; gcs_send_text(MAV_SEVERITY_CRITICAL, "Leak Detected"); } @@ -168,8 +168,8 @@ void Sub::failsafe_gcs_check() // GCS heartbeat has timed out ////////////////////////////// - // Send a warning every 5 seconds - if (tnow > failsafe.last_gcs_warn_ms + 5000) { + // Send a warning every 30 seconds + if (tnow > failsafe.last_gcs_warn_ms + 30000) { failsafe.last_gcs_warn_ms = tnow; gcs_send_text_fmt(MAV_SEVERITY_WARNING, "MYGCS: %d, heartbeat lost", g.sysid_my_gcs); }