ArduPlane: add and use accessor for last-RADIO_STATUS.remrssi-ms

This commit is contained in:
Peter Barker 2020-06-04 12:06:30 +10:00 committed by Andrew Tridgell
parent b428f12913
commit f59d2fdbf4
1 changed files with 2 additions and 2 deletions

View File

@ -324,8 +324,8 @@ void Plane::check_long_failsafe()
failsafe_long_on_event(FAILSAFE_GCS, ModeReason::GCS_FAILSAFE);
} else if (g.gcs_heartbeat_fs_enabled == GCS_FAILSAFE_HB_RSSI &&
gcs().chan(0) != nullptr &&
gcs().chan(0)->last_radio_status_remrssi_ms != 0 &&
(tnow - gcs().chan(0)->last_radio_status_remrssi_ms) > g.fs_timeout_long*1000) {
gcs().chan(0)->last_radio_status_remrssi_ms() != 0 &&
(tnow - gcs().chan(0)->last_radio_status_remrssi_ms()) > g.fs_timeout_long*1000) {
failsafe_long_on_event(FAILSAFE_GCS, ModeReason::GCS_FAILSAFE);
}
} else {