Copter: incorporate AP_ADSB function rename

- non-functional change
This commit is contained in:
Tom Pittenger 2015-12-22 09:39:35 -08:00 committed by Andrew Tridgell
parent 3b06260358
commit d969154391

View File

@ -43,7 +43,7 @@ void Copter::adsb_update(void)
void Copter::adsb_handle_vehicle_threats(void) void Copter::adsb_handle_vehicle_threats(void)
{ {
// handle clearing of threat // handle clearing of threat
if (adsb.get_is_evading_threat() && !adsb.get_another_vehicle_within_radius()) { if (adsb.get_is_evading_threat() && !adsb.get_possible_threat()) {
adsb.set_is_evading_threat(false); adsb.set_is_evading_threat(false);
Log_Write_Error(ERROR_SUBSYSTEM_FAILSAFE_ADSB, ERROR_CODE_FAILSAFE_RESOLVED); Log_Write_Error(ERROR_SUBSYSTEM_FAILSAFE_ADSB, ERROR_CODE_FAILSAFE_RESOLVED);
gcs_send_text(MAV_SEVERITY_CRITICAL, "ADS-B threat cleared"); gcs_send_text(MAV_SEVERITY_CRITICAL, "ADS-B threat cleared");
@ -51,7 +51,7 @@ void Copter::adsb_handle_vehicle_threats(void)
} }
// handle new threat // handle new threat
if (!adsb.get_is_evading_threat() && adsb.get_another_vehicle_within_radius()) { if (!adsb.get_is_evading_threat() && adsb.get_possible_threat()) {
adsb.set_is_evading_threat(true); adsb.set_is_evading_threat(true);
Log_Write_Error(ERROR_SUBSYSTEM_FAILSAFE_ADSB, ERROR_CODE_FAILSAFE_OCCURRED); Log_Write_Error(ERROR_SUBSYSTEM_FAILSAFE_ADSB, ERROR_CODE_FAILSAFE_OCCURRED);
gcs_send_text(MAV_SEVERITY_CRITICAL, "ADS-B threat!"); gcs_send_text(MAV_SEVERITY_CRITICAL, "ADS-B threat!");