Sub: correct failsafe recovery test

This commit is contained in:
Peter Barker 2018-09-07 13:49:43 +10:00 committed by Randy Mackay
parent d8c53bbd9c
commit c0a990fda7
1 changed files with 1 additions and 1 deletions

View File

@ -314,7 +314,7 @@ void Sub::failsafe_gcs_check()
uint32_t tnow = AP_HAL::millis();
// Check if we have gotten a GCS heartbeat recently (GCS sysid must match SYSID_MYGCS parameter)
if (tnow - failsafe.last_heartbeat_ms > FS_GCS_TIMEOUT_MS) {
if (tnow - failsafe.last_heartbeat_ms < FS_GCS_TIMEOUT_MS) {
// Log event if we are recovering from previous gcs failsafe
if (failsafe.gcs) {
Log_Write_Error(ERROR_SUBSYSTEM_FAILSAFE_GCS, ERROR_CODE_FAILSAFE_RESOLVED);