Skip to content

Commit

Permalink
Mission Planner 1.2.85
Browse files Browse the repository at this point in the history
update map library - this will invalidate your map prefetch
remove arial narrow and Century Gothic font issues
add ability to load a kml linestring as a mission
add kmz overlay and import support
fix AC imax limits
add view flightplan as kml
fix speech over speak
fix bad first packet in mavlink logs
support now DF log gps line
modify getParam timeout from 0.2 to 0.7
  • Loading branch information
meee1 committed Oct 28, 2013
1 parent d6f2317 commit 849cb04
Show file tree
Hide file tree
Showing 64 changed files with 2,127 additions and 2,702 deletions.
4 changes: 0 additions & 4 deletions Arduino/BoardDetect.cs
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,6 @@ public static boards DetectBoard(string port)
return boards.b2560;
}
}

return boards.none;
}

if (serialPort.IsOpen)
Expand Down Expand Up @@ -232,8 +230,6 @@ public static boards DetectBoard(string port)
return boards.b2560;
}
}

return boards.none;
}

public enum ap_var_type
Expand Down
20 changes: 0 additions & 20 deletions ArdupilotMega.sln
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Core", "ExtLibs\Core\Core.c
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenTK.GLControl", "ExtLibs\GLControl\OpenTK.GLControl.csproj", "{A625BE88-0000-0000-0000-000000000000}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GMap.NET.Core", "ExtLibs\GMap.NET.Core\GMap.NET.Core.csproj", "{D0C39D9D-BED0-418B-9A5E-713176CAF40C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GMap.NET.WindowsForms", "ExtLibs\GMap.NET.WindowsForms\GMap.NET.WindowsForms.csproj", "{E06DEF77-F933-42FB-AFD7-DB2D0D8D6A98}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "KMLib", "ExtLibs\KMLib\KMLib.csproj", "{29976BA4-A04D-4A80-A866-098C879C2FDE}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharpKml", "ExtLibs\SharpKml\SharpKml.csproj", "{53F12A60-E9CC-44BC-8366-1AE3AB2B547D}"
Expand Down Expand Up @@ -119,22 +115,6 @@ Global
{A625BE88-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{A625BE88-0000-0000-0000-000000000000}.Release|x86.ActiveCfg = Release|Any CPU
{A625BE88-0000-0000-0000-000000000000}.Release|x86.Build.0 = Release|Any CPU
{D0C39D9D-BED0-418B-9A5E-713176CAF40C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D0C39D9D-BED0-418B-9A5E-713176CAF40C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D0C39D9D-BED0-418B-9A5E-713176CAF40C}.Debug|x86.ActiveCfg = Debug|Any CPU
{D0C39D9D-BED0-418B-9A5E-713176CAF40C}.Debug|x86.Build.0 = Debug|Any CPU
{D0C39D9D-BED0-418B-9A5E-713176CAF40C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D0C39D9D-BED0-418B-9A5E-713176CAF40C}.Release|Any CPU.Build.0 = Release|Any CPU
{D0C39D9D-BED0-418B-9A5E-713176CAF40C}.Release|x86.ActiveCfg = Release|Any CPU
{D0C39D9D-BED0-418B-9A5E-713176CAF40C}.Release|x86.Build.0 = Release|Any CPU
{E06DEF77-F933-42FB-AFD7-DB2D0D8D6A98}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E06DEF77-F933-42FB-AFD7-DB2D0D8D6A98}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E06DEF77-F933-42FB-AFD7-DB2D0D8D6A98}.Debug|x86.ActiveCfg = Debug|Any CPU
{E06DEF77-F933-42FB-AFD7-DB2D0D8D6A98}.Debug|x86.Build.0 = Debug|Any CPU
{E06DEF77-F933-42FB-AFD7-DB2D0D8D6A98}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E06DEF77-F933-42FB-AFD7-DB2D0D8D6A98}.Release|Any CPU.Build.0 = Release|Any CPU
{E06DEF77-F933-42FB-AFD7-DB2D0D8D6A98}.Release|x86.ActiveCfg = Release|Any CPU
{E06DEF77-F933-42FB-AFD7-DB2D0D8D6A98}.Release|x86.Build.0 = Release|Any CPU
{29976BA4-A04D-4A80-A866-098C879C2FDE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{29976BA4-A04D-4A80-A866-098C879C2FDE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{29976BA4-A04D-4A80-A866-098C879C2FDE}.Debug|x86.ActiveCfg = Debug|Any CPU
Expand Down
14 changes: 13 additions & 1 deletion ChangeLog.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
* Mission Planner 1.2.84
* Mission Planner 1.2.85
update map library - this will invalidate your map prefetch
remove arial narrow and Century Gothic font issues
add ability to load a kml linestring as a mission
add kmz overlay and import support
fix AC imax limits
add view flightplan as kml
fix speech over speak
fix bad first packet in mavlink logs
support now DF log gps line
modify getParam timeout from 0.2 to 0.7

* Mission Planner 1.2.84
add new winddir
fix px4 uploader same fw error
update parammetadatabackup.xml
Expand Down
9 changes: 5 additions & 4 deletions Common.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,15 @@ public override void OnRender(Graphics g)
if (Pen.Color == Color.Blue)
Pen.Color = Color.White;

double width = (Overlay.Control.Manager.GetDistance(Overlay.Control.FromLocalToLatLng(0, 0), Overlay.Control.FromLocalToLatLng(Overlay.Control.Width, 0)) * 1000.0);
double height = (Overlay.Control.Manager.GetDistance(Overlay.Control.FromLocalToLatLng(0, 0), Overlay.Control.FromLocalToLatLng(Overlay.Control.Height, 0)) * 1000.0);
double width = (Overlay.Control.MapProvider.Projection.GetDistance(Overlay.Control.FromLocalToLatLng(0, 0), Overlay.Control.FromLocalToLatLng(Overlay.Control.Width, 0)) * 1000.0);
double height = (Overlay.Control.MapProvider.Projection.GetDistance(Overlay.Control.FromLocalToLatLng(0, 0), Overlay.Control.FromLocalToLatLng(Overlay.Control.Height, 0)) * 1000.0);
double m2pixelwidth = Overlay.Control.Width / width;
double m2pixelheight = Overlay.Control.Height / height;

GPoint loc = new GPoint((int)(LocalPosition.X - (m2pixelwidth * wprad * 2)), LocalPosition.Y);// MainMap.FromLatLngToLocal(wpradposition);

g.DrawArc(Pen, new System.Drawing.Rectangle(LocalPosition.X - Offset.X - (Math.Abs(loc.X - LocalPosition.X) / 2), LocalPosition.Y - Offset.Y - Math.Abs(loc.X - LocalPosition.X) / 2, Math.Abs(loc.X - LocalPosition.X), Math.Abs(loc.X - LocalPosition.X)), 0, 360);
if (m2pixelheight > 0.5)
g.DrawArc(Pen, new System.Drawing.Rectangle(LocalPosition.X - Offset.X - (int)(Math.Abs(loc.X - LocalPosition.X) / 2), LocalPosition.Y - Offset.Y - (int)Math.Abs(loc.X - LocalPosition.X) / 2, (int)Math.Abs(loc.X - LocalPosition.X), (int)Math.Abs(loc.X - LocalPosition.X)), 0, 360);

}
}
Expand Down Expand Up @@ -180,7 +181,7 @@ public override void OnRender(Graphics g)
float desired_lead_dist = 100;


double width = (Overlay.Control.Manager.GetDistance(Overlay.Control.FromLocalToLatLng(0, 0), Overlay.Control.FromLocalToLatLng(Overlay.Control.Width, 0)) * 1000.0);
double width = (Overlay.Control.MapProvider.Projection.GetDistance(Overlay.Control.FromLocalToLatLng(0, 0), Overlay.Control.FromLocalToLatLng(Overlay.Control.Width, 0)) * 1000.0);
double m2pixelwidth = Overlay.Control.Width / width;

float alpha = ((desired_lead_dist * (float)m2pixelwidth) / MainV2.comPort.MAV.cs.radius) * rad2deg;
Expand Down
2 changes: 1 addition & 1 deletion Controls/ServoOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public ServoOptions()

servo++;

TXT_rcchannel.BackColor = Color.Silver;
TXT_rcchannel.BackColor = Color.Gray;
}

void loadSettings()
Expand Down
19 changes: 19 additions & 0 deletions CurrentState.cs
Original file line number Diff line number Diff line change
Expand Up @@ -671,6 +671,19 @@ enum gcs_severity {
//MAVLink.packets[(byte)MAVLink.MSG_NAMES.HIL_CONTROLS] = null;
}

bytearray = mavinterface.MAV.packets[(byte)MAVLink.MAVLINK_MSG_ID.SYSTEM_TIME];

if (bytearray != null)
{
var systime = bytearray.ByteArrayToStructure<MAVLink.mavlink_system_time_t>(6);

DateTime newtime = DateTime.Now;

//UInt64 ms_per_week = 7000ULL*86400ULL;
//UInt64 unix_offset = 17000ULL*86400ULL + 52*10*7000ULL*86400ULL - 15000ULL;
//UInt64 fix_time_ms = unix_offset + time_week*ms_per_week + time_week_ms;
}

bytearray = mavinterface.MAV.packets[(byte)MAVLink.MAVLINK_MSG_ID.HWSTATUS];

if (bytearray != null)
Expand Down Expand Up @@ -811,6 +824,11 @@ enum gcs_severity {
messageHigh = "Bad OptFlow Health";
messageHighTime = DateTime.Now;
}
else if (sensors_present.rc_receiver != sensors_enabled.rc_receiver)
{
messageHigh = "NO RC Receiver";
messageHighTime = DateTime.Now;
}


mavinterface.MAV.packets[(byte)MAVLink.MAVLINK_MSG_ID.SYS_STATUS] = null;
Expand Down Expand Up @@ -1202,6 +1220,7 @@ public Mavlink_Sensors(uint p)
public bool altitude_control { get { return bitArray[13]; } set { bitArray[13] = value; } }
public bool xy_position_control { get { return bitArray[14]; } set { bitArray[14] = value; } }
public bool motor_control { get { return bitArray[15]; } set { bitArray[15] = value; } }
public bool rc_receiver { get { return bitArray[16]; } set { bitArray[16] = value; } }

public int Value
{
Expand Down
28 changes: 14 additions & 14 deletions ExtLibs/Comms/CommsUdpSerial.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,26 @@ public bool DtrEnable
set;
}

public void Open()
public void Open()
{
if (client.Client.Connected)
{
log.Info("udpserial socket already open");
return;
}

string dest = Port;

dest = OnSettings("UDP_port", dest);

if (System.Windows.Forms.DialogResult.Cancel == InputBox.Show("Listern Port", "Enter Local port (ensure remote end is already sending)", ref dest))
{
return;
}
Port = dest;

OnSettings("UDP_port", Port, true);

ProgressReporterDialogue frmProgressReporter = new ProgressReporterDialogue
{
StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen,
Expand All @@ -98,18 +110,6 @@ public void Open()

void frmProgressReporter_DoWork(object sender, Controls.ProgressWorkerEventArgs e, object passdata = null)
{
string dest = Port;

dest = OnSettings("UDP_port", dest);

if (System.Windows.Forms.DialogResult.Cancel == InputBox.Show("Listern Port", "Enter Local port (ensure remote end is already sending)", ref dest))
{
return;
}
Port = dest;

OnSettings("UDP_port", Port, true);

client = new UdpClient(int.Parse(Port));

while (true)
Expand Down Expand Up @@ -148,7 +148,7 @@ void frmProgressReporter_DoWork(object sender, Controls.ProgressWorkerEventArgs
client.Close();
}
log.Info(ex.ToString());
CustomMessageBox.Show("Please check your Firewall settings\nPlease try running this command\n1. Run the following command in an elevated command prompt to disable Windows Firewall temporarily:\n \nNetsh advfirewall set allprofiles state off\n \nNote: This is just for test; please turn it back on with the command 'Netsh advfirewall set allprofiles state on'.\n", "Error");
//CustomMessageBox.Show("Please check your Firewall settings\nPlease try running this command\n1. Run the following command in an elevated command prompt to disable Windows Firewall temporarily:\n \nNetsh advfirewall set allprofiles state off\n \nNote: This is just for test; please turn it back on with the command 'Netsh advfirewall set allprofiles state on'.\n", "Error");
throw new Exception("The socket/serialproxy is closed " + e);
}
}
Expand Down
9 changes: 5 additions & 4 deletions ExtLibs/Controls/InputBox.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public static DialogResult Show(string title, string promptText, ref string valu
// ensure we run this on the right thread - mono - mac
if (Application.OpenForms.Count > 0 && Application.OpenForms[0].InvokeRequired)
{
Application.OpenForms[0].Invoke((Action)delegate
Application.OpenForms[0].Invoke((MethodInvoker)delegate
{
answer = ShowUI(title, promptText, passin, password);
});
Expand Down Expand Up @@ -90,12 +90,13 @@ static DialogResult ShowUI(string title, string promptText, string value, bool p

DialogResult dialogResult = DialogResult.Cancel;

Console.WriteLine("Input Box");
Console.WriteLine("Input Box " + System.Threading.Thread.CurrentThread.Name);

form.ShowDialog();
Application.DoEvents();

form.ShowDialog();

Console.WriteLine("Input Box 2");
Console.WriteLine("Input Box 2 " + System.Threading.Thread.CurrentThread.Name);

dialogResult = form.DialogResult;

Expand Down
16 changes: 8 additions & 8 deletions ExtLibs/Controls/MissionPlanner.Controls.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,14 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="GMap.NET.Core, Version=1.7.0.0, Culture=neutral, PublicKeyToken=b85b9027b614afef, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\..\Desktop\DIYDrones\greatmaps_09991dd06609\Demo.WindowsForms\bin\Debug\GMap.NET.Core.dll</HintPath>
</Reference>
<Reference Include="GMap.NET.WindowsForms, Version=1.7.0.0, Culture=neutral, PublicKeyToken=b85b9027b614afef, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\..\Desktop\DIYDrones\greatmaps_09991dd06609\Demo.WindowsForms\bin\Debug\GMap.NET.WindowsForms.dll</HintPath>
</Reference>
<Reference Include="log4net">
<HintPath>..\..\Lib\log4net.dll</HintPath>
</Reference>
Expand Down Expand Up @@ -282,14 +290,6 @@
<Project>{a625be88-0000-0000-0000-000000000000}</Project>
<Name>OpenTK.GLControl</Name>
</ProjectReference>
<ProjectReference Include="..\GMap.NET.Core\GMap.NET.Core.csproj">
<Project>{d0c39d9d-bed0-418b-9a5e-713176caf40c}</Project>
<Name>GMap.NET.Core</Name>
</ProjectReference>
<ProjectReference Include="..\GMap.NET.WindowsForms\GMap.NET.WindowsForms.csproj">
<Project>{e06def77-f933-42fb-afd7-db2d0d8d6a98}</Project>
<Name>GMap.NET.WindowsForms</Name>
</ProjectReference>
<ProjectReference Include="..\Utilities\MissionPlanner.Utilities.csproj">
<Project>{1378a66c-38e4-46f5-a05f-dc04ef7d4d16}</Project>
<Name>MissionPlanner.Utilities</Name>
Expand Down
3 changes: 1 addition & 2 deletions ExtLibs/Controls/ProgressReporterDialogue.designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ExtLibs/Controls/QuickView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ void GetFontSize()

//SizeF extenttest2 = Graphics.FromHwnd(this.Handle).MeasureString(labelWithPseudoOpacity2.Text, this.Font);

//SizeF extent = Measure.MeasureString(Graphics.FromHwnd(this.Handle), this.Font, labelWithPseudoOpacity2.Text);
// SizeF extent2 = Measure.MeasureString(Graphics.FromHwnd(this.Handle), this.Font, labelWithPseudoOpacity2.Text);

// extent = extenttest;

Expand Down
Loading

0 comments on commit 849cb04

Please sign in to comment.