mission_result: remove unused fields

This commit is contained in:
Beat Küng
2022-09-08 21:04:22 +02:00
committed by Daniel Agar
parent 455b885f86
commit ae6377dfa0
4 changed files with 0 additions and 29 deletions
-23
View File
@@ -1904,29 +1904,6 @@ void Commander::checkForMissionUpdate()
_user_mode_intention.change(vehicle_status_s::NAVIGATION_STATE_AUTO_LOITER);
}
}
// Check for mission flight termination
if (_arm_state_machine.isArmed() && mission_result.flight_termination &&
!_circuit_breaker_flight_termination_disabled) {
if (!_flight_termination_triggered && !_lockdown_triggered) {
// navigator only requests flight termination on GPS failure
mavlink_log_critical(&_mavlink_log_pub, "GPS failure: Flight terminated\t");
events::send(events::ID("commander_mission_termination"), {events::Log::Alert, events::LogInternal::Warning},
"GPS failure: Flight terminated");
_flight_termination_triggered = true;
_actuator_armed.force_failsafe = true;
_status_changed = true;
send_parachute_command();
}
if (hrt_elapsed_time(&_last_termination_message_sent) > 4_s) {
_last_termination_message_sent = hrt_absolute_time();
mavlink_log_critical(&_mavlink_log_pub, "Flight termination active\t");
events::send(events::ID("commander_mission_termination_active"), {events::Log::Alert, events::LogInternal::Warning},
"Flight termination active");
}
}
}
}