Plane: fixed FS_GCS_ENABL=2 for hearbeat failsafe

This commit is contained in:
Andrew Tridgell 2019-12-04 11:49:13 +11:00
parent 6d981ce733
commit f3dfd62f32

View File

@ -351,7 +351,8 @@ void Plane::check_long_failsafe()
failsafe.last_heartbeat_ms != 0 &&
(tnow - failsafe.last_heartbeat_ms) > g.fs_timeout_long*1000) {
failsafe_long_on_event(FAILSAFE_GCS, ModeReason::GCS_FAILSAFE);
} else if (g.gcs_heartbeat_fs_enabled == GCS_FAILSAFE_HEARTBEAT &&
} else if ((g.gcs_heartbeat_fs_enabled == GCS_FAILSAFE_HEARTBEAT ||
g.gcs_heartbeat_fs_enabled == GCS_FAILSAFE_HB_RSSI) &&
failsafe.last_heartbeat_ms != 0 &&
(tnow - failsafe.last_heartbeat_ms) > g.fs_timeout_long*1000) {
failsafe_long_on_event(FAILSAFE_GCS, ModeReason::GCS_FAILSAFE);