Skip to content

Commit 9199c21

Browse files
Ryan Friedmanmeee1
authored andcommitted
Add support for MAV_CMD_DO_FLIGHT_TERMINATION
* https://mavlink.io/en/messages/common.html#MAV_CMD_DO_FLIGHTTERMINATION Signed-off-by: Ryan Friedman <Ryan.Friedman@avinc.com>
1 parent a15cfc7 commit 9199c21

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

GCSViews/FlightData.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ public enum actions
197197
Do_Parachute,
198198
Engine_Start,
199199
Engine_Stop,
200+
Terminate_Flight,
200201
}
201202

202203
private Dictionary<int, string> NIC_table = new Dictionary<int, string>()
@@ -1748,6 +1749,13 @@ private void BUTactiondo_Click(object sender, EventArgs e)
17481749
param3 = 1; // baro / airspeed
17491750
}
17501751

1752+
if (CMB_action.Text == actions.Terminate_Flight.ToString())
1753+
{
1754+
MainV2.comPort.doCommand(MainV2.comPort.MAV.sysid, MainV2.comPort.MAV.compid, MAVLink.MAV_CMD.DO_FLIGHTTERMINATION, 1.0f, 0, 0, 0, 0, 0, 0);
1755+
((Control)sender).Enabled = true;
1756+
return;
1757+
}
1758+
17511759
if (CMB_action.Text == actions.Preflight_Reboot_Shutdown.ToString())
17521760
{
17531761
MainV2.comPort.doReboot();

0 commit comments

Comments
 (0)