commander: send parachute command on termination (#17564)

* commander: send parachute command on termination

This sends the DO_PARACHUTE command to parachute component.

* commander: fix lying comments and printf

* commander: use one flag for termination triggered

This merges the duplicate flags _flight_termination_triggered and
_flight_flight_termination_printed.

* commander: correct variable name

* commander: always send tune with parachute

* commander: fix target_component for parachute cmd

The previous changes were wrong in that all commands were now sent to
the parachute component which doesn't make any sense. Of course only the
parachute command should be sent there.
This commit is contained in:
Julian Oes
2021-06-15 11:50:30 +02:00
committed by GitHub
parent b550ad22b9
commit e828ba4288
3 changed files with 45 additions and 17 deletions
+2 -1
View File
@@ -187,6 +187,8 @@ private:
bool stabilization_required();
void send_parachute_command();
DEFINE_PARAMETERS(
(ParamInt<px4::params::NAV_DLL_ACT>) _param_nav_dll_act,
@@ -373,7 +375,6 @@ private:
bool _failsafe_old{false}; ///< check which state machines for changes, clear "changed" flag
bool _have_taken_off_since_arming{false};
bool _should_set_home_on_takeoff{true};
bool _flight_termination_printed{false};
bool _system_power_usb_connected{false};
cpuload_s _cpuload{};