Browse Source

APM Planner 1.1.15

fix reset issue
add Circle AP Mode
change time to wait to 17 secs
master
Michael Oborne 13 years ago
parent
commit
8b2f14c40a
  1. 2
      Tools/ArdupilotMegaPlanner/CommsSerialInterface.cs
  2. 7
      Tools/ArdupilotMegaPlanner/CommsSerialPort.cs
  3. 4
      Tools/ArdupilotMegaPlanner/CommsTCPSerial.cs
  4. 4
      Tools/ArdupilotMegaPlanner/CommsUdpSerial.cs
  5. 2
      Tools/ArdupilotMegaPlanner/CurrentState.cs
  6. 6
      Tools/ArdupilotMegaPlanner/GCSViews/Firmware.cs
  7. 4
      Tools/ArdupilotMegaPlanner/GCSViews/Terminal.cs
  8. 4
      Tools/ArdupilotMegaPlanner/Log.cs
  9. 5
      Tools/ArdupilotMegaPlanner/MAVLink.cs
  10. 6
      Tools/ArdupilotMegaPlanner/MainV2.cs
  11. 2
      Tools/ArdupilotMegaPlanner/Properties/AssemblyInfo.cs
  12. 4
      Tools/ArdupilotMegaPlanner/Setup/Setup.cs

2
Tools/ArdupilotMegaPlanner/CommsSerialInterface.cs

@ -27,6 +27,8 @@ namespace ArdupilotMega @@ -27,6 +27,8 @@ namespace ArdupilotMega
//void Write(char[] buffer, int offset, int count);
void WriteLine(string text);
void toggleDTR();
// Properties
//Stream BaseStream { get; }
int BaudRate { get; set; }

7
Tools/ArdupilotMegaPlanner/CommsSerialPort.cs

@ -9,5 +9,12 @@ namespace ArdupilotMega @@ -9,5 +9,12 @@ namespace ArdupilotMega
class SerialPort : System.IO.Ports.SerialPort,ICommsSerial
{
public void toggleDTR()
{
DtrEnable = true;
System.Threading.Thread.Sleep(100);
DtrEnable = false;
}
}
}

4
Tools/ArdupilotMegaPlanner/CommsTCPSerial.cs

@ -35,6 +35,10 @@ namespace System.IO.Ports @@ -35,6 +35,10 @@ namespace System.IO.Ports
Port = "5760";
}
public void toggleDTR()
{
}
public string Port { get; set; }
public int ReadTimeout

4
Tools/ArdupilotMegaPlanner/CommsUdpSerial.cs

@ -35,6 +35,10 @@ namespace System.IO.Ports @@ -35,6 +35,10 @@ namespace System.IO.Ports
Port = "14550";
}
public void toggleDTR()
{
}
public string Port { get; set; }
public int ReadTimeout

2
Tools/ArdupilotMegaPlanner/CurrentState.cs

@ -461,7 +461,7 @@ namespace ArdupilotMega @@ -461,7 +461,7 @@ namespace ArdupilotMega
}
break;
case (byte)ArdupilotMega.MAVLink.MAV_MODE.MAV_MODE_TEST3:
mode = "FBW B";
mode = "Circle";
break;
case (byte)ArdupilotMega.MAVLink.MAV_MODE.MAV_MODE_AUTO:
switch (sysstatus.nav_mode)

6
Tools/ArdupilotMegaPlanner/GCSViews/Firmware.cs

@ -693,7 +693,7 @@ namespace ArdupilotMega.GCSViews @@ -693,7 +693,7 @@ namespace ArdupilotMega.GCSViews
}
}
lbl_status.Text = "Write Done... Waiting (90 sec)";
lbl_status.Text = "Write Done... Waiting (17 sec)";
}
else
{
@ -714,7 +714,7 @@ namespace ArdupilotMega.GCSViews @@ -714,7 +714,7 @@ namespace ArdupilotMega.GCSViews
DateTime startwait = DateTime.Now;
while ((DateTime.Now - startwait).TotalSeconds < 75)
while ((DateTime.Now - startwait).TotalSeconds < 17)
{
try
{
@ -722,7 +722,7 @@ namespace ArdupilotMega.GCSViews @@ -722,7 +722,7 @@ namespace ArdupilotMega.GCSViews
}
catch { }
System.Threading.Thread.Sleep(1000);
progress.Value = (int)((DateTime.Now - startwait).TotalSeconds / 75 * 100);
progress.Value = (int)((DateTime.Now - startwait).TotalSeconds / 17 * 100);
progress.Refresh();
}
try

4
Tools/ArdupilotMegaPlanner/GCSViews/Terminal.cs

@ -172,14 +172,14 @@ namespace ArdupilotMega.GCSViews @@ -172,14 +172,14 @@ namespace ArdupilotMega.GCSViews
if (comPort.IsOpen)
comPort.Close();
comPort.DtrEnable = true;
comPort.ReadBufferSize = 1024 * 1024;
comPort.PortName = MainV2.comportname;
comPort.Open();
comPort.toggleDTR();
System.Threading.Thread t11 = new System.Threading.Thread(delegate()
{
threadrun = true;

4
Tools/ArdupilotMegaPlanner/Log.cs

@ -69,9 +69,7 @@ namespace ArdupilotMega @@ -69,9 +69,7 @@ namespace ArdupilotMega
//comPort.ReadBufferSize = 1024 * 1024;
try
{
comPort.DtrEnable = false;
System.Threading.Thread.Sleep(100);
comPort.DtrEnable = true;
comPort.toggleDTR();
//comPort.Open();
}
catch (Exception)

5
Tools/ArdupilotMegaPlanner/MAVLink.cs

@ -98,10 +98,7 @@ namespace ArdupilotMega @@ -98,10 +98,7 @@ namespace ArdupilotMega
BaseStream.DiscardInBuffer();
System.Threading.Thread.Sleep(200); // allow reset to work
if (BaseStream.DtrEnable)
BaseStream.DtrEnable = false;
BaseStream.toggleDTR();
// allow 2560 connect timeout on usb
System.Threading.Thread.Sleep(1000);

6
Tools/ArdupilotMegaPlanner/MainV2.cs

@ -685,7 +685,7 @@ namespace ArdupilotMega @@ -685,7 +685,7 @@ namespace ArdupilotMega
comPort.BaseStream.DtrEnable = false;
if (config["CHK_resetapmonconnect"] == null || bool.Parse(config["CHK_resetapmonconnect"].ToString()) == true)
comPort.BaseStream.DtrEnable = true;
comPort.BaseStream.toggleDTR();
try
{
@ -1047,6 +1047,8 @@ namespace ArdupilotMega @@ -1047,6 +1047,8 @@ namespace ArdupilotMega
{
this.MenuConnect.BackgroundImage = global::ArdupilotMega.Properties.Resources.disconnect;
this.MenuConnect.BackgroundImage.Tag = "Disconnect";
CMB_baudrate.Enabled = false;
CMB_serialport.Enabled = false;
});
}
}
@ -1058,6 +1060,8 @@ namespace ArdupilotMega @@ -1058,6 +1060,8 @@ namespace ArdupilotMega
{
this.MenuConnect.BackgroundImage = global::ArdupilotMega.Properties.Resources.connect;
this.MenuConnect.BackgroundImage.Tag = "Connect";
CMB_baudrate.Enabled = true;
CMB_serialport.Enabled = true;
});
}
}

2
Tools/ArdupilotMegaPlanner/Properties/AssemblyInfo.cs

@ -34,5 +34,5 @@ using System.Resources; @@ -34,5 +34,5 @@ using System.Resources;
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.1.14")]
[assembly: AssemblyFileVersion("1.1.15")]
[assembly: NeutralResourcesLanguageAttribute("")]

4
Tools/ArdupilotMegaPlanner/Setup/Setup.cs

@ -811,11 +811,11 @@ namespace ArdupilotMega.Setup @@ -811,11 +811,11 @@ namespace ArdupilotMega.Setup
}
catch (Exception ex) { MainV2.givecomport = false; MessageBox.Show("Invalid Comport Settings : " + ex.Message); return; }
BUT_reset.Text = "Rebooting (75 sec)";
BUT_reset.Text = "Rebooting (17 sec)";
BUT_reset.Refresh();
Application.DoEvents();
Sleep(75000, comPortT); // wait for boot/reset
Sleep(17000, comPortT); // wait for boot/reset
comPortT.DtrEnable = false;

Loading…
Cancel
Save