Skip to content

Commit

Permalink
Temp: Add sysid target to safety switch command
Browse files Browse the repository at this point in the history
  • Loading branch information
stephendade authored and meee1 committed Sep 22, 2023
1 parent 53a993a commit 1108eb4
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions temp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1187,8 +1187,11 @@ private void but_disablearmswitch_Click(object sender, EventArgs e)
{
if (CustomMessageBox.Show("Are you sure?", "", MessageBoxButtons.YesNo) == (int)DialogResult.Yes)
MainV2.comPort.setMode(
new MAVLink.mavlink_set_mode_t() { custom_mode = (MainV2.comPort.MAV.cs.sensors_enabled.motor_control == true && MainV2.comPort.MAV.cs.sensors_enabled.seen) ? 1u : 0u },
MAVLink.MAV_MODE_FLAG.SAFETY_ARMED);
new MAVLink.mavlink_set_mode_t()
{
custom_mode = (MainV2.comPort.MAV.cs.sensors_enabled.motor_control == true && MainV2.comPort.MAV.cs.sensors_enabled.seen) ? 1u : 0u,
target_system = (byte)MainV2.comPort.sysidcurrent
}, MAVLink.MAV_MODE_FLAG.SAFETY_ARMED);
}

private void but_hwids_Click(object sender, EventArgs e)
Expand Down

0 comments on commit 1108eb4

Please sign in to comment.