Greetings.
below is my mission planner plugin code.
When I use this code there is always warning in the console that “setmode” function is obsolete.
is there any alternative for this function?
Thank you very much in advance.
public void changeModeToRTL_FD_Click(object sender, EventArgs e)
{
foreach (MAVLinkInterface mav in MainV2.Comports)
{
if (mav.sysidcurrent != 0)
{
if (mav.MAV.cs.firmware == MissionPlanner.ArduPilot.Firmwares.ArduPlane)
{
try
{
mav.setMode("RTL");//obsolete.
}
catch
{
MessageBox.Show("Failed to change mode to RTL");
}
}
}
}
}