From 0bce543865ba4010632a51c4b06e391d62052fd9 Mon Sep 17 00:00:00 2001 From: Michael Oborne Date: Wed, 6 Nov 2013 06:57:21 +0800 Subject: [PATCH] Mission Planner 1.2.86 spline display support doublebuffer quick view move hud message text to bottom of hud & always ontop fix processreporterdialog size on mono add iris defaults to full param list fix rally point alt close comport on log download close close logbrowse on no file picked add internal plla to vector3 make mavlink log selection form close on new log load increase multiple timeouts on mavlink interface - ms - setparam 500 > 700 - get wp count 500 > 700 - set wp 150 > 700 - get fence point 500 > 700 - get rally point 500 > 700 add better high prio severity message parsing. fix 3dr radio config device id update H frame icons to I tweak wizard connect increase connect time - other boards compatability remove no rc receiver temp --- 3DRRadio/ChangeLog.txt | 23 +- 3DRRadio/Config.resx | 2 +- ChangeLog.txt | 26 +- Controls/ConnectionStats.Designer.cs | 3 + Controls/Waypoints/Spline.cs | 121 +++ CurrentState.cs | 5 +- .../Controls/BackstageView/BackstageView.cs | 14 +- ExtLibs/Controls/HUD.cs | 86 +- ExtLibs/Controls/MainSwitcher.cs | 10 +- ExtLibs/Controls/MyUserControl.cs | 2 + ExtLibs/Controls/ProgressReporterDialogue.cs | 5 + .../ProgressReporterDialogue.designer.cs | 3 +- ExtLibs/Controls/QuickView.Designer.cs | 6 +- .../ConfigFailSafe.Designer.cs | 72 +- GCSViews/ConfigurationView/ConfigFailSafe.cs | 10 +- .../ConfigurationView/ConfigFailSafe.resx | 140 +-- .../ConfigurationView/ConfigFirmware.resx | 72 +- .../ConfigFlightModes.Designer.cs | 24 +- .../ConfigRawParams.Designer.cs | 88 +- GCSViews/ConfigurationView/ConfigRawParams.cs | 92 +- .../ConfigurationView/ConfigRawParams.resx | 101 +- .../ConfigurationView/ConfigSimplePids.cs | 8 +- GCSViews/FlightData.cs | 13 + GCSViews/FlightPlanner.Designer.cs | 97 +- GCSViews/FlightPlanner.cs | 76 +- GCSViews/FlightPlanner.resx | 947 ++++++++++++------ GCSViews/Simple.cs | 19 +- GCSViews/Simulation.cs | 9 +- GCSViews/Terminal.cs | 3 + GenOTP.cs | 2 - HIL/Vector3.cs | 6 + HIL/XPlane.cs | 8 +- Joystick.cs | 8 +- Log/Log.Designer.cs | 42 +- Log/Log.cs | 2 +- Log/Log.resx | 45 +- Log/LogBrowse.cs | 1 + Log/MavlinkLog.cs | 10 +- MainV2.Designer.cs | 1 + Maps/MyImageCache.cs | 3 - Mavlink/MAVLink.cs | 34 +- MissionPlanner.csproj | 2 + Msi/installer.wxs | 140 +-- Msi/wix.exe | Bin 28160 -> 28160 bytes OSDVideo.cs | 4 +- Program.cs | 42 +- Properties/AssemblyInfo.cs | 2 +- RAW_Sensor.Designer.cs | 2 + Radio/3DRradio.Designer.cs | 28 +- Radio/3DRradio.cs | 32 +- Radio/3DRradio.resx | 91 +- Radio/Uploader.cs | 78 +- Resources/Hframe.png | Bin 10516 -> 12707 bytes Resources/Hframelight.png | Bin 10933 -> 13317 bytes Utilities/Firmware.cs | 12 +- Utilities/GMapMarkerRallyPt.cs | 2 + Utilities/ParameterMetaDataParser.cs | 9 - Utilities/Update.cs | 408 ++++---- Utilities/httpserver.cs | 22 +- Wizard/3ConnectAP.Designer.cs | 7 +- Wizard/3ConnectAP.cs | 24 +- Wizard/3ConnectAP.resx | 4 +- Wizard/6CompassCalib.Designer.cs | 41 +- Wizard/6CompassCalib.resx | 6 +- georefimage.cs | 24 +- 65 files changed, 1966 insertions(+), 1253 deletions(-) create mode 100644 Controls/Waypoints/Spline.cs diff --git a/3DRRadio/ChangeLog.txt b/3DRRadio/ChangeLog.txt index 4a9f34cc3f..35fa072712 100644 --- a/3DRRadio/ChangeLog.txt +++ b/3DRRadio/ChangeLog.txt @@ -1,11 +1,12 @@ -1.0a - fix 868 freq range -1.0 - added rf freeq for 868 -0.9 - added rfd900a -0.8 - fix settings saving. -0.7 - fix typos - log rssi screen to log as well -0.6 - add terminal logging to file, fix remote radio config -0.5 - add terminal -0.4 - adjust erase timeout - to prevent lost bootloader sync error. -0.3 - add RFD900 support -0.2 - change packet size to 32 bytes -0.1 - Initial Release - Based off code by Mike Smith +1.02 - fix frequency display and add device id +1.0a - fix 868 freq range +1.0 - added rf freeq for 868 +0.9 - added rfd900a +0.8 - fix settings saving. +0.7 - fix typos - log rssi screen to log as well +0.6 - add terminal logging to file, fix remote radio config +0.5 - add terminal +0.4 - adjust erase timeout - to prevent lost bootloader sync error. +0.3 - add RFD900 support +0.2 - change packet size to 32 bytes +0.1 - Initial Release - Based off code by Mike Smith diff --git a/3DRRadio/Config.resx b/3DRRadio/Config.resx index fb7244e7a0..71a1f3f567 100644 --- a/3DRRadio/Config.resx +++ b/3DRRadio/Config.resx @@ -1591,7 +1591,7 @@ - 3DRRadio Config 1.01 + 3DRRadio Config 1.02 settingsToolStripMenuItem diff --git a/ChangeLog.txt b/ChangeLog.txt index 4e26373a91..ddcbf8d717 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,4 +1,28 @@ -* Mission Planner 1.2.85 +* Mission Planner 1.2.86 +spline display support +doublebuffer quick view +move hud message text to bottom of hud & always ontop +fix processreporterdialog size on mono +add iris defaults to full param list +fix rally point alt +close comport on log download close +close logbrowse on no file picked +add internal plla to vector3 +make mavlink log selection form close on new log load +increase multiple timeouts on mavlink interface - ms +- setparam 500 > 700 +- get wp count 500 > 700 +- set wp 150 > 700 +- get fence point 500 > 700 +- get rally point 500 > 700 +add better high prio severity message parsing. +fix 3dr radio config device id +update H frame icons to I +tweak wizard connect +increase connect time - other boards compatability +remove no rc receiver temp + +* 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 diff --git a/Controls/ConnectionStats.Designer.cs b/Controls/ConnectionStats.Designer.cs index a764f12b21..3827137056 100644 --- a/Controls/ConnectionStats.Designer.cs +++ b/Controls/ConnectionStats.Designer.cs @@ -13,6 +13,9 @@ partial class ConnectionStats /// true if managed resources should be disposed; otherwise, false. protected override void Dispose(bool disposing) { + if (_subscriptionsDisposable != null) + _subscriptionsDisposable.Dispose(); + if (disposing && (components != null)) { components.Dispose(); diff --git a/Controls/Waypoints/Spline.cs b/Controls/Waypoints/Spline.cs new file mode 100644 index 0000000000..c64160e654 --- /dev/null +++ b/Controls/Waypoints/Spline.cs @@ -0,0 +1,121 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using MissionPlanner.HIL; +using MissionPlanner.Utilities; + +namespace MissionPlanner.Controls.Waypoints +{ + public class Spline: MissionPlanner.HIL.Utils + { + float spline_t; + Vector3 current_position; + Vector3 spline_start_point; + Vector3 spline_target; + Vector3 spline_p0; + Vector3 spline_p0_prime; + Vector3 spline_p1; + Vector3 spline_p1_prime; + Vector3 spline_p2; + Vector3 spline_a; + Vector3 spline_b; + private float SPLINE_TENSION = 1.6f; + private float spline_t_sq; + + List wplist; + int wpindex = 0; + + public List doit(List wplist, int steps) + { + SPLINE_TENSION = 1.6f; + this.wplist = wplist; + + List answer = new List(); + + spline_t = spline_t_sq = 0.0f; + + current_position = wplist[0]; + + // set spline p0, p1, p2, and p0 prime + spline_p0 = spline_start_point = current_position; + spline_p1 = next_spline_waypoint(); + spline_p2 = next_spline_waypoint(); + spline_p0_prime = new Vector3(); + spline_p0_prime.x = 0;// cosf(heading_in_radians); + spline_p0_prime.y = 0;// sinf(heading_in_radians); + spline_p0_prime.z = spline_p1.z - spline_p0.z; + + initialize_spline_segment(); + + foreach (int p in range(wplist.Count-1)) { + foreach (var step in range(steps)) + { + spline_t = (1f / steps) * step; + spline_t_sq = spline_t * spline_t; + evaluate_spline(); + answer.Add(new PointLatLngAlt(spline_target.x,spline_target.y,spline_target.z,"")); + } + next_spline_segment(); + } + + + answer.Add(wplist[wplist.Count - 1]); + + + + return answer; + } + + // perform initialization in preparation for the new spline segment + void initialize_spline_segment() + { + // derivative of spline at p1 is based on difference of previous and next points + spline_p1_prime = (spline_p2 - spline_p0) / SPLINE_TENSION; + + + // compute a and b vectors used in spline formula + spline_a = spline_p0 * 2.0f - spline_p1 * 2.0f + spline_p0_prime + spline_p1_prime; + spline_b = spline_p1 * 3.0f - spline_p0 * 3.0f - spline_p0_prime * 2.0f - spline_p1_prime; + } + + // continue to the next spline segment + void next_spline_segment() + { + // start t back at near the beginning of the new segment + spline_t -= 1.0f; + + + // p1 becomes the next p01, p2 the next p1, etc. + spline_p0 = spline_p1; + spline_p1 = spline_p2; + spline_p0_prime = spline_p1_prime; + spline_p2 = next_spline_waypoint(); + + + initialize_spline_segment(); + } + + private Vector3 next_spline_waypoint() + { + wpindex++; + + if (wpindex >= wplist.Count) + { + return wplist[wplist.Count - 1]; + } + + return wplist[wpindex]; + } + + + //evaluate spline formula at point t + void evaluate_spline() + { + // evaluate spline t cubed + float t_cu = spline_t_sq * spline_t; + + spline_target = spline_a * t_cu + spline_b * spline_t_sq + spline_p0_prime * spline_t + spline_p0; + } + } +} \ No newline at end of file diff --git a/CurrentState.cs b/CurrentState.cs index ab979040e7..87bb2f5c9f 100644 --- a/CurrentState.cs +++ b/CurrentState.cs @@ -826,8 +826,9 @@ enum gcs_severity { } else if (sensors_present.rc_receiver != sensors_enabled.rc_receiver) { - messageHigh = "NO RC Receiver"; - messageHighTime = DateTime.Now; + int fixme; + //messageHigh = "NO RC Receiver"; + //messageHighTime = DateTime.Now; } diff --git a/ExtLibs/Controls/BackstageView/BackstageView.cs b/ExtLibs/Controls/BackstageView/BackstageView.cs index fc979f9b40..96db9c0122 100644 --- a/ExtLibs/Controls/BackstageView/BackstageView.cs +++ b/ExtLibs/Controls/BackstageView/BackstageView.cs @@ -171,9 +171,10 @@ public BackstageViewPage AddPage(UserControl userControl, string headerText, Bac { Page = { - Anchor = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top, - Location = new Point(pnlMenu.Width, 0), - Dock = DockStyle.Fill + //Anchor = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top, + Location = new Point(0, 0), + Dock = DockStyle.Fill, + Visible = false, } }; @@ -423,6 +424,7 @@ public void ActivatePage(BackstageViewPage associatedPage) MissionPlanner.Utilities.Tracking.AddPage(associatedPage.Page.GetType().ToString(), associatedPage.LinkText); this.SuspendLayout(); + associatedPage.Page.SuspendLayout(); DrawMenu(associatedPage , false); @@ -458,6 +460,10 @@ public void ActivatePage(BackstageViewPage associatedPage) ((IActivate)(associatedPage.Page)).Activate(); } + //this.PerformLayout(); + + associatedPage.Page.ResumeLayout(); + this.ResumeLayout(); // show it associatedPage.Page.Visible = true; @@ -469,8 +475,6 @@ public void ActivatePage(BackstageViewPage associatedPage) catch { } _activePage = associatedPage; - - this.ResumeLayout(); } public void Close() diff --git a/ExtLibs/Controls/HUD.cs b/ExtLibs/Controls/HUD.cs index 7264cd615d..cd4a3bd109 100644 --- a/ExtLibs/Controls/HUD.cs +++ b/ExtLibs/Controls/HUD.cs @@ -917,45 +917,8 @@ void doPaint(PaintEventArgs e) graphicsObject.SetClip(new Rectangle(0, this.Height / 14, this.Width, this.Height - this.Height / 14)); graphicsObject.TranslateTransform(this.Width / 2, this.Height / 2); - - graphicsObject.RotateTransform(-_roll); - - - // draw armed - - if (status != statuslast) - { - armedtimer = DateTime.Now; - } - - if (status == false) // not armed - { - //if ((armedtimer.AddSeconds(8) > DateTime.Now)) - { - drawstring(graphicsObject, "DISARMED", font, fontsize + 10, (SolidBrush)Brushes.Red, -85, halfheight / -3); - statuslast = status; - } - } - else if (status == true) // armed - { - if ((armedtimer.AddSeconds(8) > DateTime.Now)) - { - drawstring(graphicsObject, "ARMED", font, fontsize + 20, (SolidBrush)Brushes.Red, -70, halfheight / -3); - statuslast = status; - } - } - - if (failsafe == true) - { - drawstring(graphicsObject, "FAILSAFE", font, fontsize + 20, (SolidBrush)Brushes.Red, -85, halfheight / -5); - statuslast = status; - } - - if (message != "" && messagetime.AddSeconds(20) > DateTime.Now) - { - drawstring(graphicsObject, message, font, fontsize + 10, (SolidBrush)Brushes.Red, -halfwidth + 50, halfheight / -2); - } + graphicsObject.RotateTransform(-_roll); //draw pitch @@ -1542,6 +1505,53 @@ void doPaint(PaintEventArgs e) catch { } } + + + + + graphicsObject.TranslateTransform(this.Width / 2, this.Height / 2); + + // draw armed + + if (status != statuslast) + { + armedtimer = DateTime.Now; + } + + if (status == false) // not armed + { + //if ((armedtimer.AddSeconds(8) > DateTime.Now)) + { + drawstring(graphicsObject, "DISARMED", font, fontsize + 10, (SolidBrush)Brushes.Red, -85, halfheight / -3); + statuslast = status; + } + } + else if (status == true) // armed + { + if ((armedtimer.AddSeconds(8) > DateTime.Now)) + { + drawstring(graphicsObject, "ARMED", font, fontsize + 20, (SolidBrush)Brushes.Red, -70, halfheight / -3); + statuslast = status; + } + } + + if (failsafe == true) + { + drawstring(graphicsObject, "FAILSAFE", font, fontsize + 20, (SolidBrush)Brushes.Red, -85, halfheight / -5); + statuslast = status; + } + + if (message != "" && messagetime.AddSeconds(20) > DateTime.Now) + { + drawstring(graphicsObject, message, font, fontsize + 10, (SolidBrush)Brushes.Red, -halfwidth + 50, halfheight / 3); + } + + + + graphicsObject.ResetTransform(); + + + if (!opengl) diff --git a/ExtLibs/Controls/MainSwitcher.cs b/ExtLibs/Controls/MainSwitcher.cs index 965cf75eff..5c86a189cd 100644 --- a/ExtLibs/Controls/MainSwitcher.cs +++ b/ExtLibs/Controls/MainSwitcher.cs @@ -79,6 +79,9 @@ public void ShowScreen(string name) // find next screen Screen nextscreen = screens.Single(s => s.Name == name); + MainControl.SuspendLayout(); + nextscreen.Control.SuspendLayout(); + nextscreen.Control.Location = new Point(0, 0); nextscreen.Control.AutoScaleMode = AutoScaleMode.None; @@ -87,13 +90,8 @@ public void ShowScreen(string name) nextscreen.Control.Dock = DockStyle.Fill; - nextscreen.Control.PerformLayout(); - MissionPlanner.Utilities.Tracking.AddPage(nextscreen.Control.GetType().ToString(), name); - MainControl.SuspendLayout(); - nextscreen.Control.SuspendLayout(); - if (nextscreen.Control is IActivate) { ((IActivate)(nextscreen.Control)).Activate(); @@ -104,8 +102,8 @@ public void ShowScreen(string name) MainControl.Controls.Add(nextscreen.Control); + nextscreen.Control.ResumeLayout(); MainControl.ResumeLayout(); - nextscreen.Control.ResumeLayout(); nextscreen.Visible = true; diff --git a/ExtLibs/Controls/MyUserControl.cs b/ExtLibs/Controls/MyUserControl.cs index 27fb8df739..42aa318d0f 100644 --- a/ExtLibs/Controls/MyUserControl.cs +++ b/ExtLibs/Controls/MyUserControl.cs @@ -6,12 +6,14 @@ using System.ComponentModel; using log4net; using System.Reflection; +using System.Runtime.InteropServices; namespace System.Windows.Forms { /// /// This is a mono fix, windows handles this error, mono crashs /// + //[assembly: ComVisible(true)] public class MyUserControl : System.Windows.Forms.UserControl { /// diff --git a/ExtLibs/Controls/ProgressReporterDialogue.cs b/ExtLibs/Controls/ProgressReporterDialogue.cs index 4c83612eef..b98b377bf1 100644 --- a/ExtLibs/Controls/ProgressReporterDialogue.cs +++ b/ExtLibs/Controls/ProgressReporterDialogue.cs @@ -47,6 +47,11 @@ public ProgressReporterDialogue() public void RunBackgroundOperationAsync() { ThreadPool.QueueUserWorkItem(RunBackgroundOperation); + + var t = Type.GetType("Mono.Runtime"); + if ((t != null)) + this.Height += 25; + this.ShowDialog(); } diff --git a/ExtLibs/Controls/ProgressReporterDialogue.designer.cs b/ExtLibs/Controls/ProgressReporterDialogue.designer.cs index 78e541eacc..0c631e34e1 100644 --- a/ExtLibs/Controls/ProgressReporterDialogue.designer.cs +++ b/ExtLibs/Controls/ProgressReporterDialogue.designer.cs @@ -131,14 +131,13 @@ private void InitializeComponent() this.Controls.Add(this.btnCancel); this.Controls.Add(this.lblProgressMessage); this.Controls.Add(this.progressBar1); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "ProgressReporterDialogue"; this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.Text = "Progress"; - this.TopMost = true; this.Load += new System.EventHandler(this.ProgressReporterDialogue_Load); ((System.ComponentModel.ISupportInitialize)(this.imgWarning)).EndInit(); this.ResumeLayout(false); diff --git a/ExtLibs/Controls/QuickView.Designer.cs b/ExtLibs/Controls/QuickView.Designer.cs index 69ec525f45..12ed4ae574 100644 --- a/ExtLibs/Controls/QuickView.Designer.cs +++ b/ExtLibs/Controls/QuickView.Designer.cs @@ -29,9 +29,9 @@ protected override void Dispose(bool disposing) private void InitializeComponent() { this.components = new System.ComponentModel.Container(); - this.labelWithPseudoOpacity1 = new Controls.LabelWithPseudoOpacity(); + this.labelWithPseudoOpacity1 = new MissionPlanner.Controls.LabelWithPseudoOpacity(); this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); - this.labelWithPseudoOpacity2 = new Controls.LabelWithPseudoOpacity(); + this.labelWithPseudoOpacity2 = new MissionPlanner.Controls.LabelWithPseudoOpacity(); this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); this.tableLayoutPanel1.SuspendLayout(); this.SuspendLayout(); @@ -68,7 +68,7 @@ private void InitializeComponent() // labelWithPseudoOpacity2 // this.labelWithPseudoOpacity2.Dock = System.Windows.Forms.DockStyle.Fill; - this.labelWithPseudoOpacity2.DoubleBuffered = false; + this.labelWithPseudoOpacity2.DoubleBuffered = true; this.labelWithPseudoOpacity2.Font = new System.Drawing.Font("Microsoft Sans Serif", 21.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.labelWithPseudoOpacity2.Location = new System.Drawing.Point(3, 20); this.labelWithPseudoOpacity2.Name = "labelWithPseudoOpacity2"; diff --git a/GCSViews/ConfigurationView/ConfigFailSafe.Designer.cs b/GCSViews/ConfigurationView/ConfigFailSafe.Designer.cs index dfcc1684e3..80c5c16040 100644 --- a/GCSViews/ConfigurationView/ConfigFailSafe.Designer.cs +++ b/GCSViews/ConfigurationView/ConfigFailSafe.Designer.cs @@ -47,14 +47,14 @@ private void InitializeComponent() this.mavlinkCheckBoxthr_fs = new MissionPlanner.Controls.MavlinkCheckBox(); this.mavlinkComboBox_fs_thr_enable = new MissionPlanner.Controls.MavlinkComboBox(); this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.mavlinkCheckBoxFS_GCS_ENABLE = new MissionPlanner.Controls.MavlinkCheckBox(); + this.mavlinkCheckBoxfs_gps_enable = new MissionPlanner.Controls.MavlinkCheckBox(); + this.mavlinkCheckBoxfs_batt_enable = new MissionPlanner.Controls.MavlinkCheckBox(); this.pnlmah = new System.Windows.Forms.Panel(); this.label5 = new System.Windows.Forms.Label(); this.mavlinkNumericUpDownFS_BATT_MAH = new MissionPlanner.Controls.MavlinkNumericUpDown(); - this.mavlinkCheckBoxFS_GCS_ENABLE = new MissionPlanner.Controls.MavlinkCheckBox(); - this.mavlinkCheckBoxfs_gps_enable = new MissionPlanner.Controls.MavlinkCheckBox(); this.PNL_low_bat = new System.Windows.Forms.Panel(); this.label4 = new System.Windows.Forms.Label(); - this.mavlinkCheckBoxfs_batt_enable = new MissionPlanner.Controls.MavlinkCheckBox(); this.PNL_thr_fs_value = new System.Windows.Forms.Panel(); this.label3 = new System.Windows.Forms.Label(); this.lbl_armed = new MissionPlanner.Controls.MyLabel(); @@ -232,20 +232,50 @@ private void InitializeComponent() // this.groupBox1.Controls.Add(this.mavlinkCheckBoxFS_GCS_ENABLE); this.groupBox1.Controls.Add(this.mavlinkCheckBoxfs_gps_enable); - this.groupBox1.Controls.Add(this.mavlinkCheckBoxfs_batt_enable); this.groupBox1.Controls.Add(this.pnlmah); this.groupBox1.Controls.Add(this.PNL_low_bat); + this.groupBox1.Controls.Add(this.PNL_thr_fs_value); + this.groupBox1.Controls.Add(this.mavlinkCheckBoxfs_batt_enable); this.groupBox1.Controls.Add(this.mavlinkCheckBoxlong_fs); this.groupBox1.Controls.Add(this.mavlinkCheckBoxshort_fs); this.groupBox1.Controls.Add(this.mavlinkCheckBoxgcs_fs); this.groupBox1.Controls.Add(this.mavlinkCheckBoxthr_fs_action); - this.groupBox1.Controls.Add(this.PNL_thr_fs_value); this.groupBox1.Controls.Add(this.mavlinkCheckBoxthr_fs); this.groupBox1.Controls.Add(this.mavlinkComboBox_fs_thr_enable); resources.ApplyResources(this.groupBox1, "groupBox1"); this.groupBox1.Name = "groupBox1"; this.groupBox1.TabStop = false; // + // mavlinkCheckBoxFS_GCS_ENABLE + // + resources.ApplyResources(this.mavlinkCheckBoxFS_GCS_ENABLE, "mavlinkCheckBoxFS_GCS_ENABLE"); + this.mavlinkCheckBoxFS_GCS_ENABLE.Name = "mavlinkCheckBoxFS_GCS_ENABLE"; + this.mavlinkCheckBoxFS_GCS_ENABLE.OffValue = 0F; + this.mavlinkCheckBoxFS_GCS_ENABLE.OnValue = 1F; + this.mavlinkCheckBoxFS_GCS_ENABLE.param = null; + this.mavlinkCheckBoxFS_GCS_ENABLE.ParamName = null; + this.mavlinkCheckBoxFS_GCS_ENABLE.UseVisualStyleBackColor = true; + // + // mavlinkCheckBoxfs_gps_enable + // + resources.ApplyResources(this.mavlinkCheckBoxfs_gps_enable, "mavlinkCheckBoxfs_gps_enable"); + this.mavlinkCheckBoxfs_gps_enable.Name = "mavlinkCheckBoxfs_gps_enable"; + this.mavlinkCheckBoxfs_gps_enable.OffValue = 0F; + this.mavlinkCheckBoxfs_gps_enable.OnValue = 1F; + this.mavlinkCheckBoxfs_gps_enable.param = null; + this.mavlinkCheckBoxfs_gps_enable.ParamName = null; + this.mavlinkCheckBoxfs_gps_enable.UseVisualStyleBackColor = true; + // + // mavlinkCheckBoxfs_batt_enable + // + resources.ApplyResources(this.mavlinkCheckBoxfs_batt_enable, "mavlinkCheckBoxfs_batt_enable"); + this.mavlinkCheckBoxfs_batt_enable.Name = "mavlinkCheckBoxfs_batt_enable"; + this.mavlinkCheckBoxfs_batt_enable.OffValue = 0F; + this.mavlinkCheckBoxfs_batt_enable.OnValue = 1F; + this.mavlinkCheckBoxfs_batt_enable.param = null; + this.mavlinkCheckBoxfs_batt_enable.ParamName = null; + this.mavlinkCheckBoxfs_batt_enable.UseVisualStyleBackColor = true; + // // pnlmah // this.pnlmah.Controls.Add(this.label5); @@ -278,26 +308,6 @@ private void InitializeComponent() 0, 65536}); // - // mavlinkCheckBoxFS_GCS_ENABLE - // - resources.ApplyResources(this.mavlinkCheckBoxFS_GCS_ENABLE, "mavlinkCheckBoxFS_GCS_ENABLE"); - this.mavlinkCheckBoxFS_GCS_ENABLE.Name = "mavlinkCheckBoxFS_GCS_ENABLE"; - this.mavlinkCheckBoxFS_GCS_ENABLE.OffValue = 0F; - this.mavlinkCheckBoxFS_GCS_ENABLE.OnValue = 1F; - this.mavlinkCheckBoxFS_GCS_ENABLE.param = null; - this.mavlinkCheckBoxFS_GCS_ENABLE.ParamName = null; - this.mavlinkCheckBoxFS_GCS_ENABLE.UseVisualStyleBackColor = true; - // - // mavlinkCheckBoxfs_gps_enable - // - resources.ApplyResources(this.mavlinkCheckBoxfs_gps_enable, "mavlinkCheckBoxfs_gps_enable"); - this.mavlinkCheckBoxfs_gps_enable.Name = "mavlinkCheckBoxfs_gps_enable"; - this.mavlinkCheckBoxfs_gps_enable.OffValue = 0F; - this.mavlinkCheckBoxfs_gps_enable.OnValue = 1F; - this.mavlinkCheckBoxfs_gps_enable.param = null; - this.mavlinkCheckBoxfs_gps_enable.ParamName = null; - this.mavlinkCheckBoxfs_gps_enable.UseVisualStyleBackColor = true; - // // PNL_low_bat // this.PNL_low_bat.Controls.Add(this.label4); @@ -310,21 +320,11 @@ private void InitializeComponent() resources.ApplyResources(this.label4, "label4"); this.label4.Name = "label4"; // - // mavlinkCheckBoxfs_batt_enable - // - resources.ApplyResources(this.mavlinkCheckBoxfs_batt_enable, "mavlinkCheckBoxfs_batt_enable"); - this.mavlinkCheckBoxfs_batt_enable.Name = "mavlinkCheckBoxfs_batt_enable"; - this.mavlinkCheckBoxfs_batt_enable.OffValue = 0F; - this.mavlinkCheckBoxfs_batt_enable.OnValue = 1F; - this.mavlinkCheckBoxfs_batt_enable.param = null; - this.mavlinkCheckBoxfs_batt_enable.ParamName = null; - this.mavlinkCheckBoxfs_batt_enable.UseVisualStyleBackColor = true; - // // PNL_thr_fs_value // + this.PNL_thr_fs_value.Controls.Add(this.label3); this.PNL_thr_fs_value.Controls.Add(this.mavlinkNumericUpDownfs_thr_value); this.PNL_thr_fs_value.Controls.Add(this.mavlinkNumericUpDownthr_fs_value); - this.PNL_thr_fs_value.Controls.Add(this.label3); resources.ApplyResources(this.PNL_thr_fs_value, "PNL_thr_fs_value"); this.PNL_thr_fs_value.Name = "PNL_thr_fs_value"; // diff --git a/GCSViews/ConfigurationView/ConfigFailSafe.cs b/GCSViews/ConfigurationView/ConfigFailSafe.cs index d9b45a057e..2057a456a2 100644 --- a/GCSViews/ConfigurationView/ConfigFailSafe.cs +++ b/GCSViews/ConfigurationView/ConfigFailSafe.cs @@ -53,8 +53,14 @@ public void Activate() mavlinkNumericUpDownfs_thr_value.setup(800, 1200, 1, 1, "FS_THR_VALUE", MainV2.comPort.MAV.param); // low battery - mavlinkNumericUpDownlow_voltage.setup(6, 99, 1, 0.1f, "LOW_VOLT", MainV2.comPort.MAV.param, PNL_low_bat); - mavlinkNumericUpDownlow_voltage.setup(6, 99, 1, 0.1f, "FS_BATT_VOLTAGE", MainV2.comPort.MAV.param, PNL_low_bat); + if (MainV2.comPort.MAV.param.ContainsKey("LOW_VOLT")) + { + mavlinkNumericUpDownlow_voltage.setup(6, 99, 1, 0.1f, "LOW_VOLT", MainV2.comPort.MAV.param, PNL_low_bat); + } + else + { + mavlinkNumericUpDownlow_voltage.setup(6, 99, 1, 0.1f, "FS_BATT_VOLTAGE", MainV2.comPort.MAV.param, PNL_low_bat); + } mavlinkNumericUpDownFS_BATT_MAH.setup(1000, 99999, 1, 1, "FS_BATT_MAH", MainV2.comPort.MAV.param, pnlmah); mavlinkCheckBoxfs_gps_enable.setup(1, 0, "FS_GPS_ENABLE", MainV2.comPort.MAV.param); diff --git a/GCSViews/ConfigurationView/ConfigFailSafe.resx b/GCSViews/ConfigurationView/ConfigFailSafe.resx index 042e795665..4c74c46cd8 100644 --- a/GCSViews/ConfigurationView/ConfigFailSafe.resx +++ b/GCSViews/ConfigurationView/ConfigFailSafe.resx @@ -274,7 +274,7 @@ mavlinkNumericUpDownlow_voltage - MissionPlanner.Controls.MavlinkNumericUpDown, MissionPlanner, Version=1.1.5033.14547, Culture=neutral, PublicKeyToken=null + MissionPlanner.Controls.MavlinkNumericUpDown, MissionPlanner, Version=1.1.5051.38332, Culture=neutral, PublicKeyToken=null PNL_low_bat @@ -295,7 +295,7 @@ NoControl - 3, 130 + 3, 105 199, 17 @@ -316,13 +316,13 @@ mavlinkCheckBoxlong_fs - MissionPlanner.Controls.MavlinkCheckBox, MissionPlanner, Version=1.1.5033.14547, Culture=neutral, PublicKeyToken=null + MissionPlanner.Controls.MavlinkCheckBox, MissionPlanner, Version=1.1.5051.38332, Culture=neutral, PublicKeyToken=null groupBox1 - 5 + 6 True @@ -337,7 +337,7 @@ NoControl - 3, 113 + 3, 88 199, 17 @@ -358,13 +358,13 @@ mavlinkCheckBoxshort_fs - MissionPlanner.Controls.MavlinkCheckBox, MissionPlanner, Version=1.1.5033.14547, Culture=neutral, PublicKeyToken=null + MissionPlanner.Controls.MavlinkCheckBox, MissionPlanner, Version=1.1.5051.38332, Culture=neutral, PublicKeyToken=null groupBox1 - 6 + 7 True @@ -379,7 +379,7 @@ NoControl - 3, 96 + 3, 71 199, 17 @@ -400,13 +400,13 @@ mavlinkCheckBoxgcs_fs - MissionPlanner.Controls.MavlinkCheckBox, MissionPlanner, Version=1.1.5033.14547, Culture=neutral, PublicKeyToken=null + MissionPlanner.Controls.MavlinkCheckBox, MissionPlanner, Version=1.1.5051.38332, Culture=neutral, PublicKeyToken=null groupBox1 - 7 + 8 True @@ -421,7 +421,7 @@ NoControl - 3, 79 + 3, 54 199, 17 @@ -443,13 +443,13 @@ Arducopter Other: if have gps, RTL, Otherwise Land mavlinkCheckBoxthr_fs_action - MissionPlanner.Controls.MavlinkCheckBox, MissionPlanner, Version=1.1.5033.14547, Culture=neutral, PublicKeyToken=null + MissionPlanner.Controls.MavlinkCheckBox, MissionPlanner, Version=1.1.5051.38332, Culture=neutral, PublicKeyToken=null groupBox1 - 8 + 9 Right @@ -476,13 +476,13 @@ Arducopter Other: if have gps, RTL, Otherwise Land mavlinkNumericUpDownfs_thr_value - MissionPlanner.Controls.MavlinkNumericUpDown, MissionPlanner, Version=1.1.5033.14547, Culture=neutral, PublicKeyToken=null + MissionPlanner.Controls.MavlinkNumericUpDown, MissionPlanner, Version=1.1.5051.38332, Culture=neutral, PublicKeyToken=null PNL_thr_fs_value - 0 + 1 Right @@ -509,13 +509,13 @@ Arducopter Other: if have gps, RTL, Otherwise Land mavlinkNumericUpDownthr_fs_value - MissionPlanner.Controls.MavlinkNumericUpDown, MissionPlanner, Version=1.1.5033.14547, Culture=neutral, PublicKeyToken=null + MissionPlanner.Controls.MavlinkNumericUpDown, MissionPlanner, Version=1.1.5051.38332, Culture=neutral, PublicKeyToken=null PNL_thr_fs_value - 1 + 2 True @@ -551,7 +551,7 @@ Arducopter Other: if have gps, RTL, Otherwise Land mavlinkCheckBoxthr_fs - MissionPlanner.Controls.MavlinkCheckBox, MissionPlanner, Version=1.1.5033.14547, Culture=neutral, PublicKeyToken=null + MissionPlanner.Controls.MavlinkCheckBox, MissionPlanner, Version=1.1.5051.38332, Culture=neutral, PublicKeyToken=null groupBox1 @@ -587,7 +587,7 @@ Arducopter Other: if have gps, RTL, Otherwise Land mavlinkComboBox_fs_thr_enable - MissionPlanner.Controls.MavlinkComboBox, MissionPlanner, Version=1.1.5033.14547, Culture=neutral, PublicKeyToken=null + MissionPlanner.Controls.MavlinkComboBox, MissionPlanner, Version=1.1.5051.38332, Culture=neutral, PublicKeyToken=null groupBox1 @@ -626,7 +626,7 @@ Arducopter Other: if have gps, RTL, Otherwise Land mavlinkCheckBoxFS_GCS_ENABLE - MissionPlanner.Controls.MavlinkCheckBox, MissionPlanner, Version=1.1.5033.14547, Culture=neutral, PublicKeyToken=null + MissionPlanner.Controls.MavlinkCheckBox, MissionPlanner, Version=1.1.5051.38332, Culture=neutral, PublicKeyToken=null groupBox1 @@ -665,7 +665,7 @@ Arducopter Other: if have gps, RTL, Otherwise Land mavlinkCheckBoxfs_gps_enable - MissionPlanner.Controls.MavlinkCheckBox, MissionPlanner, Version=1.1.5033.14547, Culture=neutral, PublicKeyToken=null + MissionPlanner.Controls.MavlinkCheckBox, MissionPlanner, Version=1.1.5051.38332, Culture=neutral, PublicKeyToken=null groupBox1 @@ -673,45 +673,6 @@ Arducopter Other: if have gps, RTL, Otherwise Land 1 - - True - - - Top - - - False - - - NoControl - - - 3, 193 - - - 199, 17 - - - 150 - - - Battery Failsafe - - - False - - - mavlinkCheckBoxfs_batt_enable - - - MissionPlanner.Controls.MavlinkCheckBox, MissionPlanner, Version=1.1.5033.14547, Culture=neutral, PublicKeyToken=null - - - groupBox1 - - - 2 - True @@ -722,13 +683,13 @@ Arducopter Other: if have gps, RTL, Otherwise Land 4, 3 - 67, 13 + 80, 13 154 - Battery MAH + Reserved MAH label5 @@ -758,7 +719,7 @@ Arducopter Other: if have gps, RTL, Otherwise Land mavlinkNumericUpDownFS_BATT_MAH - MissionPlanner.Controls.MavlinkNumericUpDown, MissionPlanner, Version=1.1.5033.14547, Culture=neutral, PublicKeyToken=null + MissionPlanner.Controls.MavlinkNumericUpDown, MissionPlanner, Version=1.1.5051.38332, Culture=neutral, PublicKeyToken=null pnlmah @@ -770,7 +731,7 @@ Arducopter Other: if have gps, RTL, Otherwise Land Top - 3, 170 + 3, 187 199, 23 @@ -791,7 +752,7 @@ Arducopter Other: if have gps, RTL, Otherwise Land groupBox1 - 3 + 2 True @@ -827,7 +788,7 @@ Arducopter Other: if have gps, RTL, Otherwise Land Top - 3, 147 + 3, 164 199, 23 @@ -848,7 +809,7 @@ Arducopter Other: if have gps, RTL, Otherwise Land groupBox1 - 4 + 3 True @@ -881,13 +842,13 @@ Arducopter Other: if have gps, RTL, Otherwise Land PNL_thr_fs_value - 2 + 0 Top - 3, 54 + 3, 139 199, 25 @@ -905,7 +866,46 @@ Arducopter Other: if have gps, RTL, Otherwise Land groupBox1 - 9 + 4 + + + True + + + Top + + + False + + + NoControl + + + 3, 122 + + + 199, 17 + + + 150 + + + Battery Failsafe + + + False + + + mavlinkCheckBoxfs_batt_enable + + + MissionPlanner.Controls.MavlinkCheckBox, MissionPlanner, Version=1.1.5051.38332, Culture=neutral, PublicKeyToken=null + + + groupBox1 + + + 5 480, 174 diff --git a/GCSViews/ConfigurationView/ConfigFirmware.resx b/GCSViews/ConfigurationView/ConfigFirmware.resx index c83bc4736f..e1630e3ff7 100644 --- a/GCSViews/ConfigurationView/ConfigFirmware.resx +++ b/GCSViews/ConfigurationView/ConfigFirmware.resx @@ -123,10 +123,10 @@ - 187, 0 + 186, 0 - 170, 170 + 150, 150 @@ -148,10 +148,10 @@ NoControl - 363, 0 + 342, 0 - 170, 170 + 150, 150 2 @@ -172,10 +172,10 @@ NoControl - 539, 0 + 498, 0 - 170, 170 + 150, 150 3 @@ -196,10 +196,10 @@ NoControl - 363, 176 + 342, 176 - 170, 170 + 150, 150 4 @@ -220,10 +220,10 @@ NoControl - 539, 176 + 498, 176 - 170, 170 + 150, 150 5 @@ -247,7 +247,7 @@ NoControl - 8, 443 + 3, 443 37, 13 @@ -274,10 +274,10 @@ NoControl - 11, 417 + 3, 417 - 874, 23 + 821, 23 6 @@ -301,7 +301,7 @@ NoControl - 763, 443 + 711, 443 113, 13 @@ -328,10 +328,10 @@ NoControl - 187, 176 + 186, 176 - 170, 170 + 150, 150 17 @@ -352,7 +352,7 @@ NoControl - 327, 379 + 297, 381 190, 32 @@ -382,7 +382,7 @@ - 10, 362 + 3, 364 0, 0, 0, 0 @@ -409,7 +409,7 @@ NoControl - 149, 362 + 142, 364 0, 0, 0, 0 @@ -436,7 +436,7 @@ NoControl - 202, 362 + 195, 364 0, 0, 0, 0 @@ -463,7 +463,7 @@ NoControl - 251, 362 + 244, 364 0, 0, 0, 0 @@ -487,10 +487,10 @@ 13 - 715, 176 + 654, 176 - 170, 170 + 150, 150 24 @@ -508,10 +508,10 @@ 18 - 715, 0 + 654, 0 - 170, 170 + 150, 150 25 @@ -529,10 +529,10 @@ 17 - 11, 0 + 30, 0 - 170, 170 + 150, 150 0 @@ -553,7 +553,7 @@ True - 304, 349 + 274, 351 246, 13 @@ -577,7 +577,7 @@ 8 - 757, 387 + 684, 389 121, 21 @@ -604,7 +604,7 @@ True - 763, 391 + 690, 393 113, 13 @@ -634,7 +634,7 @@ NoControl - 763, 371 + 690, 373 110, 13 @@ -664,7 +664,7 @@ NoControl - 650, 392 + 601, 393 76, 13 @@ -694,7 +694,7 @@ NoControl - 650, 371 + 601, 373 83, 13 @@ -724,7 +724,7 @@ NoControl - 536, 371 + 493, 373 102, 13 @@ -754,7 +754,7 @@ NoControl - 536, 392 + 493, 394 81, 13 @@ -784,7 +784,7 @@ 6, 13 - 899, 461 + 827, 461 ConfigFirmware diff --git a/GCSViews/ConfigurationView/ConfigFlightModes.Designer.cs b/GCSViews/ConfigurationView/ConfigFlightModes.Designer.cs index 6ad71cc3ec..d9790b724d 100644 --- a/GCSViews/ConfigurationView/ConfigFlightModes.Designer.cs +++ b/GCSViews/ConfigurationView/ConfigFlightModes.Designer.cs @@ -250,12 +250,14 @@ private void InitializeComponent() // labelfm6 // this.labelfm6.AutoSize = true; + this.labelfm6.Dock = System.Windows.Forms.DockStyle.Fill; this.labelfm6.ImeMode = System.Windows.Forms.ImeMode.NoControl; this.labelfm6.Location = new System.Drawing.Point(3, 140); this.labelfm6.Name = "labelfm6"; - this.labelfm6.Size = new System.Drawing.Size(71, 13); + this.labelfm6.Size = new System.Drawing.Size(88, 28); this.labelfm6.TabIndex = 131; this.labelfm6.Text = "Flight Mode 6"; + this.labelfm6.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // CMB_fmode6 // @@ -271,12 +273,14 @@ private void InitializeComponent() // labelfm5 // this.labelfm5.AutoSize = true; + this.labelfm5.Dock = System.Windows.Forms.DockStyle.Fill; this.labelfm5.ImeMode = System.Windows.Forms.ImeMode.NoControl; this.labelfm5.Location = new System.Drawing.Point(3, 112); this.labelfm5.Name = "labelfm5"; - this.labelfm5.Size = new System.Drawing.Size(71, 13); + this.labelfm5.Size = new System.Drawing.Size(88, 28); this.labelfm5.TabIndex = 129; this.labelfm5.Text = "Flight Mode 5"; + this.labelfm5.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // CMB_fmode5 // @@ -292,12 +296,14 @@ private void InitializeComponent() // labelfm4 // this.labelfm4.AutoSize = true; + this.labelfm4.Dock = System.Windows.Forms.DockStyle.Fill; this.labelfm4.ImeMode = System.Windows.Forms.ImeMode.NoControl; this.labelfm4.Location = new System.Drawing.Point(3, 84); this.labelfm4.Name = "labelfm4"; - this.labelfm4.Size = new System.Drawing.Size(71, 13); + this.labelfm4.Size = new System.Drawing.Size(88, 28); this.labelfm4.TabIndex = 127; this.labelfm4.Text = "Flight Mode 4"; + this.labelfm4.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // CMB_fmode4 // @@ -313,12 +319,14 @@ private void InitializeComponent() // labelfm3 // this.labelfm3.AutoSize = true; + this.labelfm3.Dock = System.Windows.Forms.DockStyle.Fill; this.labelfm3.ImeMode = System.Windows.Forms.ImeMode.NoControl; this.labelfm3.Location = new System.Drawing.Point(3, 56); this.labelfm3.Name = "labelfm3"; - this.labelfm3.Size = new System.Drawing.Size(71, 13); + this.labelfm3.Size = new System.Drawing.Size(88, 28); this.labelfm3.TabIndex = 125; this.labelfm3.Text = "Flight Mode 3"; + this.labelfm3.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // CMB_fmode3 // @@ -334,12 +342,14 @@ private void InitializeComponent() // labelfm2 // this.labelfm2.AutoSize = true; + this.labelfm2.Dock = System.Windows.Forms.DockStyle.Fill; this.labelfm2.ImeMode = System.Windows.Forms.ImeMode.NoControl; this.labelfm2.Location = new System.Drawing.Point(3, 28); this.labelfm2.Name = "labelfm2"; - this.labelfm2.Size = new System.Drawing.Size(71, 13); + this.labelfm2.Size = new System.Drawing.Size(88, 28); this.labelfm2.TabIndex = 123; this.labelfm2.Text = "Flight Mode 2"; + this.labelfm2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // CMB_fmode2 // @@ -355,12 +365,14 @@ private void InitializeComponent() // labelfm1 // this.labelfm1.AutoSize = true; + this.labelfm1.Dock = System.Windows.Forms.DockStyle.Fill; this.labelfm1.ImeMode = System.Windows.Forms.ImeMode.NoControl; this.labelfm1.Location = new System.Drawing.Point(3, 0); this.labelfm1.Name = "labelfm1"; - this.labelfm1.Size = new System.Drawing.Size(71, 13); + this.labelfm1.Size = new System.Drawing.Size(88, 28); this.labelfm1.TabIndex = 121; this.labelfm1.Text = "Flight Mode 1"; + this.labelfm1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // CMB_fmode1 // diff --git a/GCSViews/ConfigurationView/ConfigRawParams.Designer.cs b/GCSViews/ConfigurationView/ConfigRawParams.Designer.cs index 75e783a172..c0c934e628 100644 --- a/GCSViews/ConfigurationView/ConfigRawParams.Designer.cs +++ b/GCSViews/ConfigurationView/ConfigRawParams.Designer.cs @@ -30,14 +30,14 @@ private void InitializeComponent() { this.components = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ConfigRawParams)); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); - this.BUT_compare = new Controls.MyButton(); - this.BUT_rerequestparams = new Controls.MyButton(); - this.BUT_writePIDS = new Controls.MyButton(); - this.BUT_save = new Controls.MyButton(); - this.BUT_load = new Controls.MyButton(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); + this.BUT_compare = new MissionPlanner.Controls.MyButton(); + this.BUT_rerequestparams = new MissionPlanner.Controls.MyButton(); + this.BUT_writePIDS = new MissionPlanner.Controls.MyButton(); + this.BUT_save = new MissionPlanner.Controls.MyButton(); + this.BUT_load = new MissionPlanner.Controls.MyButton(); this.Params = new System.Windows.Forms.DataGridView(); this.Command = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.Value = new System.Windows.Forms.DataGridViewTextBoxColumn(); @@ -46,62 +46,43 @@ private void InitializeComponent() this.Desc = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); this.label1 = new System.Windows.Forms.Label(); - this.BUT_find = new Controls.MyButton(); + this.BUT_find = new MissionPlanner.Controls.MyButton(); + this.but_iris = new MissionPlanner.Controls.MyButton(); ((System.ComponentModel.ISupportInitialize)(this.Params)).BeginInit(); this.SuspendLayout(); // // BUT_compare // resources.ApplyResources(this.BUT_compare, "BUT_compare"); - this.BUT_compare.BGGradBot = System.Drawing.Color.FromArgb(((int)(((byte)(205)))), ((int)(((byte)(226)))), ((int)(((byte)(150))))); - this.BUT_compare.BGGradTop = System.Drawing.Color.FromArgb(((int)(((byte)(148)))), ((int)(((byte)(193)))), ((int)(((byte)(31))))); this.BUT_compare.Name = "BUT_compare"; - this.BUT_compare.Outline = System.Drawing.Color.FromArgb(((int)(((byte)(121)))), ((int)(((byte)(148)))), ((int)(((byte)(41))))); - this.BUT_compare.TextColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(87)))), ((int)(((byte)(4))))); this.BUT_compare.UseVisualStyleBackColor = true; this.BUT_compare.Click += new System.EventHandler(this.BUT_compare_Click); // // BUT_rerequestparams // resources.ApplyResources(this.BUT_rerequestparams, "BUT_rerequestparams"); - this.BUT_rerequestparams.BGGradBot = System.Drawing.Color.FromArgb(((int)(((byte)(205)))), ((int)(((byte)(226)))), ((int)(((byte)(150))))); - this.BUT_rerequestparams.BGGradTop = System.Drawing.Color.FromArgb(((int)(((byte)(148)))), ((int)(((byte)(193)))), ((int)(((byte)(31))))); this.BUT_rerequestparams.Name = "BUT_rerequestparams"; - this.BUT_rerequestparams.Outline = System.Drawing.Color.FromArgb(((int)(((byte)(121)))), ((int)(((byte)(148)))), ((int)(((byte)(41))))); - this.BUT_rerequestparams.TextColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(87)))), ((int)(((byte)(4))))); this.BUT_rerequestparams.UseVisualStyleBackColor = true; this.BUT_rerequestparams.Click += new System.EventHandler(this.BUT_rerequestparams_Click); // // BUT_writePIDS // resources.ApplyResources(this.BUT_writePIDS, "BUT_writePIDS"); - this.BUT_writePIDS.BGGradBot = System.Drawing.Color.FromArgb(((int)(((byte)(205)))), ((int)(((byte)(226)))), ((int)(((byte)(150))))); - this.BUT_writePIDS.BGGradTop = System.Drawing.Color.FromArgb(((int)(((byte)(148)))), ((int)(((byte)(193)))), ((int)(((byte)(31))))); this.BUT_writePIDS.Name = "BUT_writePIDS"; - this.BUT_writePIDS.Outline = System.Drawing.Color.FromArgb(((int)(((byte)(121)))), ((int)(((byte)(148)))), ((int)(((byte)(41))))); - this.BUT_writePIDS.TextColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(87)))), ((int)(((byte)(4))))); this.BUT_writePIDS.UseVisualStyleBackColor = true; this.BUT_writePIDS.Click += new System.EventHandler(this.BUT_writePIDS_Click); // // BUT_save // resources.ApplyResources(this.BUT_save, "BUT_save"); - this.BUT_save.BGGradBot = System.Drawing.Color.FromArgb(((int)(((byte)(205)))), ((int)(((byte)(226)))), ((int)(((byte)(150))))); - this.BUT_save.BGGradTop = System.Drawing.Color.FromArgb(((int)(((byte)(148)))), ((int)(((byte)(193)))), ((int)(((byte)(31))))); this.BUT_save.Name = "BUT_save"; - this.BUT_save.Outline = System.Drawing.Color.FromArgb(((int)(((byte)(121)))), ((int)(((byte)(148)))), ((int)(((byte)(41))))); - this.BUT_save.TextColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(87)))), ((int)(((byte)(4))))); this.BUT_save.UseVisualStyleBackColor = true; this.BUT_save.Click += new System.EventHandler(this.BUT_save_Click); // // BUT_load // resources.ApplyResources(this.BUT_load, "BUT_load"); - this.BUT_load.BGGradBot = System.Drawing.Color.FromArgb(((int)(((byte)(205)))), ((int)(((byte)(226)))), ((int)(((byte)(150))))); - this.BUT_load.BGGradTop = System.Drawing.Color.FromArgb(((int)(((byte)(148)))), ((int)(((byte)(193)))), ((int)(((byte)(31))))); this.BUT_load.Name = "BUT_load"; - this.BUT_load.Outline = System.Drawing.Color.FromArgb(((int)(((byte)(121)))), ((int)(((byte)(148)))), ((int)(((byte)(41))))); - this.BUT_load.TextColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(87)))), ((int)(((byte)(4))))); this.BUT_load.UseVisualStyleBackColor = true; this.BUT_load.Click += new System.EventHandler(this.BUT_load_Click); // @@ -111,14 +92,14 @@ private void InitializeComponent() this.Params.AllowUserToDeleteRows = false; resources.ApplyResources(this.Params, "Params"); this.Params.AutoSizeRowsMode = System.Windows.Forms.DataGridViewAutoSizeRowsMode.AllCells; - dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle1.BackColor = System.Drawing.Color.Maroon; - dataGridViewCellStyle1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - dataGridViewCellStyle1.ForeColor = System.Drawing.Color.White; - dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.Params.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1; + dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle4.BackColor = System.Drawing.Color.Maroon; + dataGridViewCellStyle4.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + dataGridViewCellStyle4.ForeColor = System.Drawing.Color.White; + dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.Params.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle4; this.Params.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.Params.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.Command, @@ -127,14 +108,14 @@ private void InitializeComponent() this.Options, this.Desc}); this.Params.Name = "Params"; - dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.ActiveCaption; - dataGridViewCellStyle3.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - dataGridViewCellStyle3.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.Params.RowHeadersDefaultCellStyle = dataGridViewCellStyle3; + dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle6.BackColor = System.Drawing.SystemColors.ActiveCaption; + dataGridViewCellStyle6.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + dataGridViewCellStyle6.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle6.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle6.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.Params.RowHeadersDefaultCellStyle = dataGridViewCellStyle6; this.Params.RowHeadersVisible = false; this.Params.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.AutoSizeToDisplayedHeaders; this.Params.CellValueChanged += new System.Windows.Forms.DataGridViewCellEventHandler(this.Params_CellValueChanged); @@ -165,8 +146,8 @@ private void InitializeComponent() // Desc // this.Desc.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; - dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.Desc.DefaultCellStyle = dataGridViewCellStyle2; + dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.Desc.DefaultCellStyle = dataGridViewCellStyle5; resources.ApplyResources(this.Desc, "Desc"); this.Desc.Name = "Desc"; this.Desc.ReadOnly = true; @@ -185,17 +166,21 @@ private void InitializeComponent() // BUT_find // resources.ApplyResources(this.BUT_find, "BUT_find"); - this.BUT_find.BGGradBot = System.Drawing.Color.FromArgb(((int)(((byte)(205)))), ((int)(((byte)(226)))), ((int)(((byte)(150))))); - this.BUT_find.BGGradTop = System.Drawing.Color.FromArgb(((int)(((byte)(148)))), ((int)(((byte)(193)))), ((int)(((byte)(31))))); this.BUT_find.Name = "BUT_find"; - this.BUT_find.Outline = System.Drawing.Color.FromArgb(((int)(((byte)(121)))), ((int)(((byte)(148)))), ((int)(((byte)(41))))); - this.BUT_find.TextColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(87)))), ((int)(((byte)(4))))); this.BUT_find.UseVisualStyleBackColor = true; this.BUT_find.Click += new System.EventHandler(this.BUT_find_Click); // + // but_iris + // + resources.ApplyResources(this.but_iris, "but_iris"); + this.but_iris.Name = "but_iris"; + this.but_iris.UseVisualStyleBackColor = true; + this.but_iris.Click += new System.EventHandler(this.but_iris_Click); + // // ConfigRawParams // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; + this.Controls.Add(this.but_iris); this.Controls.Add(this.BUT_find); this.Controls.Add(this.label1); this.Controls.Add(this.BUT_compare); @@ -228,5 +213,6 @@ private void InitializeComponent() private System.Windows.Forms.DataGridViewTextBoxColumn Options; private System.Windows.Forms.DataGridViewTextBoxColumn Desc; private Controls.MyButton BUT_find; + private Controls.MyButton but_iris; } } diff --git a/GCSViews/ConfigurationView/ConfigRawParams.cs b/GCSViews/ConfigurationView/ConfigRawParams.cs index b383f3f2e0..1aee821c71 100644 --- a/GCSViews/ConfigurationView/ConfigRawParams.cs +++ b/GCSViews/ConfigurationView/ConfigRawParams.cs @@ -9,6 +9,7 @@ using log4net; using MissionPlanner.Controls; using System.Collections.Generic; +using System.Net; namespace MissionPlanner.GCSViews.ConfigurationView { @@ -126,42 +127,47 @@ private void BUT_load_Click(object sender, EventArgs e) if (dr == DialogResult.OK) { - Hashtable param2 = loadParamFile(ofd.FileName); + loadparamsfromfile(ofd.FileName); + } + } + + void loadparamsfromfile(string fn) + { + Hashtable param2 = loadParamFile(fn); - foreach (string name in param2.Keys) + foreach (string name in param2.Keys) + { + string value = param2[name].ToString(); + // set param table as well + foreach (DataGridViewRow row in Params.Rows) { - string value = param2[name].ToString(); - // set param table as well - foreach (DataGridViewRow row in Params.Rows) + if (name == "SYSID_SW_MREV") + continue; + if (name == "WP_TOTAL") + continue; + if (name == "CMD_TOTAL") + continue; + if (name == "FENCE_TOTAL") + continue; + if (name == "SYS_NUM_RESETS") + continue; + if (name == "ARSPD_OFFSET") + continue; + if (name == "GND_ABS_PRESS") + continue; + if (name == "GND_TEMP") + continue; + if (name == "CMD_INDEX") + continue; + if (name == "LOG_LASTFILE") + continue; + if (name == "FORMAT_VERSION") + continue; + if (row.Cells[0].Value.ToString() == name) { - if (name == "SYSID_SW_MREV") - continue; - if (name == "WP_TOTAL") - continue; - if (name == "CMD_TOTAL") - continue; - if (name == "FENCE_TOTAL") - continue; - if (name == "SYS_NUM_RESETS") - continue; - if (name == "ARSPD_OFFSET") - continue; - if (name == "GND_ABS_PRESS") - continue; - if (name == "GND_TEMP") - continue; - if (name == "CMD_INDEX") - continue; - if (name == "LOG_LASTFILE") - continue; - if (name == "FORMAT_VERSION") - continue; - if (row.Cells[0].Value.ToString() == name) - { - if (row.Cells[1].Value.ToString() != value.ToString()) - row.Cells[1].Value = value; - break; - } + if (row.Cells[1].Value.ToString() != value.ToString()) + row.Cells[1].Value = value; + break; } } } @@ -488,5 +494,25 @@ private void BUT_find_Click(object sender, EventArgs e) } } } + + private void but_iris_Click(object sender, EventArgs e) + { + try + { + string filepath = Application.StartupPath + Path.DirectorySeparatorChar + "Iris.param"; + + if (Common.getFilefromNet("https://github.com/diydrones/ardupilot/raw/master/Tools/Frame_params/Iris.param", filepath)) + { + loadparamsfromfile(filepath); + + CustomMessageBox.Show("Loaded parameters, please make sure you write them!","Loaded"); + } + else + { + CustomMessageBox.Show("Error getting Iris param file"); + } + } + catch (Exception ex) { CustomMessageBox.Show("Error getting Iris param file" + ex.ToString()); } + } } } diff --git a/GCSViews/ConfigurationView/ConfigRawParams.resx b/GCSViews/ConfigurationView/ConfigRawParams.resx index e27e23afc0..07f4092fa9 100644 --- a/GCSViews/ConfigurationView/ConfigRawParams.resx +++ b/GCSViews/ConfigurationView/ConfigRawParams.resx @@ -112,26 +112,26 @@ 2.0 - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + Top, Right NoControl - + 631, 119 103, 19 - + 72 @@ -142,13 +142,13 @@ BUT_compare - Controls.MyButton, MissionPlanner.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + MissionPlanner.Controls.MyButton, MissionPlanner.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null $this - 2 + 3 Top, Right @@ -172,13 +172,13 @@ BUT_rerequestparams - Controls.MyButton, MissionPlanner.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + MissionPlanner.Controls.MyButton, MissionPlanner.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null $this - 3 + 4 Top, Right @@ -202,13 +202,13 @@ BUT_writePIDS - Controls.MyButton, MissionPlanner.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + MissionPlanner.Controls.MyButton, MissionPlanner.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null $this - 4 + 5 Top, Right @@ -235,13 +235,13 @@ BUT_save - Controls.MyButton, MissionPlanner.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + MissionPlanner.Controls.MyButton, MissionPlanner.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null $this - 5 + 6 Top, Right @@ -268,18 +268,18 @@ BUT_load - Controls.MyButton, MissionPlanner.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + MissionPlanner.Controls.MyButton, MissionPlanner.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null $this - 6 + 7 Top, Bottom, Left, Right - + True @@ -288,7 +288,7 @@ 150 - + True @@ -297,7 +297,7 @@ 80 - + True @@ -306,13 +306,13 @@ 60 - + True Options - + True @@ -331,15 +331,15 @@ Params - System.Windows.Forms.DataGridView, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.DataGridView, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 $this - 7 + 8 - + 17, 17 @@ -368,13 +368,13 @@ format with no scaling label1 - System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 $this - 1 + 2 Top, Right @@ -398,15 +398,48 @@ format with no scaling BUT_find - Controls.MyButton, MissionPlanner.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + MissionPlanner.Controls.MyButton, MissionPlanner.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null $this + 1 + + + Top, Right + + + NoControl + + + 631, 276 + + + 0, 0, 0, 0 + + + 104, 19 + + + 75 + + + Load Iris Defaults + + + but_iris + + + MissionPlanner.Controls.MyButton, MissionPlanner.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + $this + + 0 - + True @@ -416,42 +449,42 @@ format with no scaling Command - System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Value - System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Units - System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Options - System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Desc - System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 toolTip1 - System.Windows.Forms.ToolTip, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.ToolTip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 ConfigRawParams - System.Windows.Forms.UserControl, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.UserControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 \ No newline at end of file diff --git a/GCSViews/ConfigurationView/ConfigSimplePids.cs b/GCSViews/ConfigurationView/ConfigSimplePids.cs index 31676fb4cc..e97fc312a0 100644 --- a/GCSViews/ConfigurationView/ConfigSimplePids.cs +++ b/GCSViews/ConfigurationView/ConfigSimplePids.cs @@ -24,7 +24,7 @@ public partial class ConfigSimplePids: MyUserControl, IActivate int y = 10; - class configitem + class configitem: IDisposable { public string title; public string desc; @@ -39,6 +39,12 @@ class configitem public Label lbl_max = new Label(); // use increments + + public void Dispose() + { + lbl_max.Dispose(); + lbl_min.Dispose(); + } } class relationitem diff --git a/GCSViews/FlightData.cs b/GCSViews/FlightData.cs index aeae3d80da..634923c6b5 100644 --- a/GCSViews/FlightData.cs +++ b/GCSViews/FlightData.cs @@ -119,6 +119,19 @@ protected override void Dispose(bool disposing) } catch { } + if (polygons != null) + polygons.Dispose(); + if (routes != null) + routes.Dispose(); + if (route != null) + route.Dispose(); + if (polygon != null) + polygon.Dispose(); + if (marker != null) + marker.Dispose(); + if (aviwriter != null) + aviwriter.Dispose(); + if (disposing && (components != null)) { components.Dispose(); diff --git a/GCSViews/FlightPlanner.Designer.cs b/GCSViews/FlightPlanner.Designer.cs index 0e6f301b1c..cd89ac8eda 100644 --- a/GCSViews/FlightPlanner.Designer.cs +++ b/GCSViews/FlightPlanner.Designer.cs @@ -31,14 +31,14 @@ private void InitializeComponent() { this.components = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FlightPlanner)); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle13 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle14 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle15 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle16 = new System.Windows.Forms.DataGridViewCellStyle(); this.CHK_altmode = new System.Windows.Forms.CheckBox(); this.Commands = new System.Windows.Forms.DataGridView(); this.Command = new System.Windows.Forms.DataGridViewComboBoxColumn(); @@ -96,6 +96,7 @@ private void InitializeComponent() this.splitter1 = new BSE.Windows.Forms.Splitter(); this.BUT_Add = new MissionPlanner.Controls.MyButton(); this.panelAction = new BSE.Windows.Forms.Panel(); + this.lnk_kml = new System.Windows.Forms.LinkLabel(); this.chk_grid = new System.Windows.Forms.CheckBox(); this.comboBoxMapType = new System.Windows.Forms.ComboBox(); this.panelMap = new System.Windows.Forms.Panel(); @@ -160,7 +161,7 @@ private void InitializeComponent() this.panelBASE = new System.Windows.Forms.Panel(); this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); this.timer1 = new System.Windows.Forms.Timer(this.components); - this.lnk_kml = new System.Windows.Forms.LinkLabel(); + this.splineToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); ((System.ComponentModel.ISupportInitialize)(this.Commands)).BeginInit(); this.panel5.SuspendLayout(); this.panel1.SuspendLayout(); @@ -184,14 +185,14 @@ private void InitializeComponent() // this.Commands.AllowUserToAddRows = false; resources.ApplyResources(this.Commands, "Commands"); - dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.Commands.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1; + dataGridViewCellStyle9.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle9.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle9.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + dataGridViewCellStyle9.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle9.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle9.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle9.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.Commands.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle9; this.Commands.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.Command, this.Param1, @@ -206,17 +207,17 @@ private void InitializeComponent() this.Down, this.Grad}); this.Commands.Name = "Commands"; - dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle5.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle5.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - dataGridViewCellStyle5.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle5.Format = "N0"; - dataGridViewCellStyle5.NullValue = "0"; - dataGridViewCellStyle5.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle5.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - this.Commands.RowHeadersDefaultCellStyle = dataGridViewCellStyle5; - dataGridViewCellStyle6.ForeColor = System.Drawing.Color.Black; - this.Commands.RowsDefaultCellStyle = dataGridViewCellStyle6; + dataGridViewCellStyle13.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle13.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle13.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + dataGridViewCellStyle13.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle13.Format = "N0"; + dataGridViewCellStyle13.NullValue = "0"; + dataGridViewCellStyle13.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle13.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + this.Commands.RowHeadersDefaultCellStyle = dataGridViewCellStyle13; + dataGridViewCellStyle14.ForeColor = System.Drawing.Color.Black; + this.Commands.RowsDefaultCellStyle = dataGridViewCellStyle14; this.Commands.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.Commands_CellContentClick); this.Commands.CellEndEdit += new System.Windows.Forms.DataGridViewCellEventHandler(this.Commands_CellEndEdit); this.Commands.DataError += new System.Windows.Forms.DataGridViewDataErrorEventHandler(this.Commands_DataError); @@ -228,9 +229,9 @@ private void InitializeComponent() // // Command // - dataGridViewCellStyle2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(67)))), ((int)(((byte)(68)))), ((int)(((byte)(69))))); - dataGridViewCellStyle2.ForeColor = System.Drawing.Color.White; - this.Command.DefaultCellStyle = dataGridViewCellStyle2; + dataGridViewCellStyle10.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(67)))), ((int)(((byte)(68)))), ((int)(((byte)(69))))); + dataGridViewCellStyle10.ForeColor = System.Drawing.Color.White; + this.Command.DefaultCellStyle = dataGridViewCellStyle10; this.Command.DisplayStyle = System.Windows.Forms.DataGridViewComboBoxDisplayStyle.ComboBox; resources.ApplyResources(this.Command, "Command"); this.Command.Name = "Command"; @@ -296,7 +297,7 @@ private void InitializeComponent() // // Up // - this.Up.DefaultCellStyle = dataGridViewCellStyle3; + this.Up.DefaultCellStyle = dataGridViewCellStyle11; resources.ApplyResources(this.Up, "Up"); this.Up.Image = global::MissionPlanner.Properties.Resources.up; this.Up.ImageLayout = System.Windows.Forms.DataGridViewImageCellLayout.Stretch; @@ -304,8 +305,8 @@ private void InitializeComponent() // // Down // - dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - this.Down.DefaultCellStyle = dataGridViewCellStyle4; + dataGridViewCellStyle12.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + this.Down.DefaultCellStyle = dataGridViewCellStyle12; resources.ApplyResources(this.Down, "Down"); this.Down.Image = global::MissionPlanner.Properties.Resources.down; this.Down.ImageLayout = System.Windows.Forms.DataGridViewImageCellLayout.Stretch; @@ -435,8 +436,8 @@ private void InitializeComponent() // // dataGridViewImageColumn1 // - dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - this.dataGridViewImageColumn1.DefaultCellStyle = dataGridViewCellStyle7; + dataGridViewCellStyle15.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + this.dataGridViewImageColumn1.DefaultCellStyle = dataGridViewCellStyle15; resources.ApplyResources(this.dataGridViewImageColumn1, "dataGridViewImageColumn1"); this.dataGridViewImageColumn1.Image = global::MissionPlanner.Properties.Resources.up; this.dataGridViewImageColumn1.ImageLayout = System.Windows.Forms.DataGridViewImageCellLayout.Stretch; @@ -444,8 +445,8 @@ private void InitializeComponent() // // dataGridViewImageColumn2 // - dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - this.dataGridViewImageColumn2.DefaultCellStyle = dataGridViewCellStyle8; + dataGridViewCellStyle16.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + this.dataGridViewImageColumn2.DefaultCellStyle = dataGridViewCellStyle16; resources.ApplyResources(this.dataGridViewImageColumn2, "dataGridViewImageColumn2"); this.dataGridViewImageColumn2.Image = global::MissionPlanner.Properties.Resources.down; this.dataGridViewImageColumn2.ImageLayout = System.Windows.Forms.DataGridViewImageCellLayout.Stretch; @@ -652,6 +653,13 @@ private void InitializeComponent() this.panelAction.ToolTipTextExpandIconPanelCollapsed = null; this.panelAction.ToolTipTextExpandIconPanelExpanded = null; // + // lnk_kml + // + resources.ApplyResources(this.lnk_kml, "lnk_kml"); + this.lnk_kml.Name = "lnk_kml"; + this.lnk_kml.TabStop = true; + this.lnk_kml.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.lnk_kml_LinkClicked); + // // chk_grid // resources.ApplyResources(this.chk_grid, "chk_grid"); @@ -741,7 +749,8 @@ private void InitializeComponent() this.mapToolToolStripMenuItem, this.fileLoadSaveToolStripMenuItem, this.trackerHomeToolStripMenuItem, - this.flyToHereToolStripMenuItem}); + this.flyToHereToolStripMenuItem, + this.splineToolStripMenuItem}); this.contextMenuStrip1.Name = "contextMenuStrip1"; resources.ApplyResources(this.contextMenuStrip1, "contextMenuStrip1"); this.contextMenuStrip1.Opening += new System.ComponentModel.CancelEventHandler(this.contextMenuStrip1_Opening); @@ -1114,12 +1123,11 @@ private void InitializeComponent() this.timer1.Interval = 1200; this.timer1.Tick += new System.EventHandler(this.timer1_Tick); // - // lnk_kml + // splineToolStripMenuItem // - resources.ApplyResources(this.lnk_kml, "lnk_kml"); - this.lnk_kml.Name = "lnk_kml"; - this.lnk_kml.TabStop = true; - this.lnk_kml.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.lnk_kml_LinkClicked); + this.splineToolStripMenuItem.Name = "splineToolStripMenuItem"; + resources.ApplyResources(this.splineToolStripMenuItem, "splineToolStripMenuItem"); + this.splineToolStripMenuItem.Click += new System.EventHandler(this.splineToolStripMenuItem_Click); // // FlightPlanner // @@ -1274,5 +1282,6 @@ private void InitializeComponent() private System.Windows.Forms.DataGridViewTextBoxColumn Grad; private System.Windows.Forms.ToolStripMenuItem loadKMLFileToolStripMenuItem; private System.Windows.Forms.LinkLabel lnk_kml; + private System.Windows.Forms.ToolStripMenuItem splineToolStripMenuItem; } } \ No newline at end of file diff --git a/GCSViews/FlightPlanner.cs b/GCSViews/FlightPlanner.cs index fa5fea22ee..f90c91d1c9 100644 --- a/GCSViews/FlightPlanner.cs +++ b/GCSViews/FlightPlanner.cs @@ -43,6 +43,7 @@ public partial class FlightPlanner : MyUserControl, IDeactivate, IActivate bool isonline = true; bool sethome = false; bool polygongridmode = false; + bool splinemode = false; Hashtable param = new Hashtable(); bool grid = false; @@ -299,6 +300,7 @@ public FlightPlanner() InitializeComponent(); // config map + MainMap.MapProvider = GoogleSatelliteMapProvider.Instance; MainMap.CacheLocation = Path.GetDirectoryName(Application.ExecutablePath) + "/gmapcache/"; // map events @@ -393,7 +395,10 @@ public FlightPlanner() { try { - comboBoxMapType.SelectedIndex = GMapProviders.List.FindIndex(x => (x.Name == MainV2.getConfig("MapType")) ); + var index = GMapProviders.List.FindIndex(x => (x.Name == MainV2.getConfig("MapType")) ); + + if (index != -1) + comboBoxMapType.SelectedIndex = index; } catch { } } @@ -1023,6 +1028,9 @@ private void writeKML() RegeneratePolygon(); + if (splinemode) + dospline(); + if (wppolygon != null && wppolygon.Points.Count > 0) { double homedist = 0; @@ -2431,7 +2439,7 @@ private void comboBoxMapType_SelectedValueChanged(object sender, EventArgs e) FlightData.mymap.MapProvider = (GMapProvider)comboBoxMapType.SelectedItem; MainV2.config["MapType"] = comboBoxMapType.Text; } - catch { CustomMessageBox.Show("Map change failed. try zomming out first."); } + catch { CustomMessageBox.Show("Map change failed. try zooming out first."); } } private void Commands_EditingControlShowing(object sender, DataGridViewEditingControlShowingEventArgs e) @@ -4768,7 +4776,7 @@ private void getRallyPointsToolStripMenuItem_Click(object sender, EventArgs e) try { PointLatLngAlt plla = MainV2.comPort.getRallyPoint(a, ref count); - rallypointoverlay.Markers.Add(new GMapMarkerRallyPt(new PointLatLng(plla.Lat, plla.Lng)) { ToolTipMode = MarkerTooltipMode.OnMouseOver, ToolTipText = "Rally Point" }); + rallypointoverlay.Markers.Add(new GMapMarkerRallyPt(new PointLatLng(plla.Lat, plla.Lng)) { Alt = (int)plla.Alt, ToolTipMode = MarkerTooltipMode.OnMouseOver, ToolTipText = "Rally Point" }); } catch { CustomMessageBox.Show("Failed to get rally point", "Error"); return; } } @@ -4784,11 +4792,11 @@ private void saveRallyPointsToolStripMenuItem_Click(object sender, EventArgs e) MainV2.comPort.setParam("RALLY_TOTAL", rallypointoverlay.Markers.Count ); - foreach (var pnt in rallypointoverlay.Markers) + foreach (GMapMarkerRallyPt pnt in rallypointoverlay.Markers) { try { - MainV2.comPort.setRallyPoint(count, new PointLatLngAlt(pnt.Position) { Alt = int.Parse(TXT_DefaultAlt.Text) }, (short)int.Parse(TXT_DefaultAlt.Text), 0, 0, (byte)(float)MainV2.comPort.MAV.param["RALLY_TOTAL"]); + MainV2.comPort.setRallyPoint(count, new PointLatLngAlt(pnt.Position) { Alt = pnt.Alt }, (short)pnt.Alt, 0, 0, (byte)(float)MainV2.comPort.MAV.param["RALLY_TOTAL"]); count++; } catch { CustomMessageBox.Show("Failed to save rally point", "Error"); return; } @@ -4797,15 +4805,29 @@ private void saveRallyPointsToolStripMenuItem_Click(object sender, EventArgs e) private void setRallyPointToolStripMenuItem_Click(object sender, EventArgs e) { - PointLatLngAlt rallypt = new PointLatLngAlt(MouseDownStart.Lat, MouseDownStart.Lng, int.Parse(TXT_DefaultAlt.Text), "Rally Point"); - rallypointoverlay.Markers.Add( - new GMapMarkerRallyPt(rallypt) - { - ToolTipMode = MarkerTooltipMode.OnMouseOver, - ToolTipText = "Rally Point", - Tag = rallypointoverlay.Markers.Count, - } - ); + string altstring = TXT_DefaultAlt.Text; + + InputBox.Show("Altitude", "Altitude", ref altstring); + + int alt = 0; + + if (int.TryParse(altstring, out alt)) + { + PointLatLngAlt rallypt = new PointLatLngAlt(MouseDownStart.Lat, MouseDownStart.Lng, alt * MainV2.comPort.MAV.cs.multiplierdist, "Rally Point"); + rallypointoverlay.Markers.Add( + new GMapMarkerRallyPt(rallypt) + { + ToolTipMode = MarkerTooltipMode.OnMouseOver, + ToolTipText = "Rally Point" + "\nAlt: " + alt, + Tag = rallypointoverlay.Markers.Count, + Alt = alt, + } + ); + } + else + { + CustomMessageBox.Show("Bad Altitude","error"); + } } private void clearRallyPointsToolStripMenuItem_Click(object sender, EventArgs e) @@ -4925,5 +4947,31 @@ private void lnk_kml_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) System.Diagnostics.Process.Start("http://127.0.0.1:56781/network.kml"); } + private void splineToolStripMenuItem_Click(object sender, EventArgs e) + { + splinemode = !splinemode; + + dospline(); + } + + void dospline() + { + if (pointlist.Count > 3 && pointlist[0] != pointlist[pointlist.Count - 1]) + pointlist.Add(pointlist[0]); + + MissionPlanner.Controls.Waypoints.Spline sp = new Controls.Waypoints.Spline(); + + List spline = sp.doit(pointlist, 10); + + List list = new List(); + spline.ForEach(x => { list.Add(x); }); + + polygonsoverlay.Routes.Clear(); + + polygonsoverlay.Routes.Add(new GMapRoute(list, "spline") { Stroke = Pens.Yellow }); + + polygonsoverlay.Polygons.Clear(); + } + } } diff --git a/GCSViews/FlightPlanner.resx b/GCSViews/FlightPlanner.resx index bb26de56ac..f74fd0f39e 100644 --- a/GCSViews/FlightPlanner.resx +++ b/GCSViews/FlightPlanner.resx @@ -513,6 +513,51 @@ Bottom, Right + + BUT_write + + + MissionPlanner.Controls.MyButton, MissionPlanner.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + panel5 + + + 0 + + + BUT_read + + + MissionPlanner.Controls.MyButton, MissionPlanner.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + panel5 + + + 1 + + + 8, 301 + + + 117, 63 + + + 29 + + + panel5 + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panelAction + + + 2 + NoControl @@ -567,29 +612,113 @@ 1 - - 8, 301 + + Bottom, Right - - 117, 63 + + label4 - - 29 + + System.Windows.Forms.LinkLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - panel5 + + panel1 - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 0 - - panelAction + + label3 - + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel1 + + + 1 + + + label2 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel1 + + 2 - - Bottom, Right + + Label1 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel1 + + + 3 + + + TXT_homealt + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel1 + + + 4 + + + TXT_homelng + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel1 + + + 5 + + + TXT_homelat + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel1 + + + 6 + + + 8, 365 + + + 117, 89 + + + 31 + + + panel1 + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panelAction + + + 3 True @@ -774,66 +903,258 @@ 6 - - 8, 365 + + Up - - 117, 89 + + 20 - - 31 + + Down - - panel1 + + 20 - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + NoControl - - panelAction + + 0, 0 - + + 100, 23 + + + 47 + + + label6 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panelBASE + + + 4 + + + Bottom, Right + + + label16 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel2 + + + 0 + + + txt_mouse_mgrs + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel2 + + + 1 + + + label15 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel2 + + + 2 + + + txt_mouse_utmzone + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel2 + + 3 - - Up + + label14 - - 20 + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - Down + + panel2 + + + 4 + + + label12 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel2 + + + 5 + + + label13 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel2 + + + 6 + + + txt_mouse_utmy + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel2 + + + 7 + + + txt_mouse_utmx + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel2 + + + 8 + + + label7 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel2 + + + 9 + + + label8 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel2 + + + 10 + + + label9 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel2 + + + 11 + + + label10 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel2 + + + 12 + + + TXT_mousealt + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel2 + + + 13 + + + TXT_mouselong + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel2 + + + 14 + + + TXT_mouselat + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 20 + + panel2 - - NoControl + + 15 - - 0, 0 + + 4, 25 - - 100, 23 + + 123, 212 - - 47 + + 38 - - label6 + + panel2 - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - panelBASE + + panelAction - + 4 - - Bottom, Right - True @@ -1251,27 +1572,6 @@ 15 - - 4, 25 - - - 123, 212 - - - 38 - - - panel2 - - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - panelAction - - - 4 - Bottom, Right @@ -1332,6 +1632,9 @@ 0 + + 172, 17 + NoControl @@ -1347,9 +1650,6 @@ Add Below - - 172, 17 - Add a line to the grid bellow @@ -1593,35 +1893,260 @@ Prev - - lbl_prevdist + + lbl_prevdist + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panelMap + + + 2 + + + Top, Bottom, Left, Right + + + 17, 17 + + + 152, 22 + + + Delete WP + + + 152, 22 + + + Insert Wp + + + 152, 22 + + + Loiter + + + 152, 22 + + + Jump + + + 152, 22 + + + RTL + + + 152, 22 + + + Land + + + 152, 22 + + + Takeoff + + + 152, 22 + + + Set ROI + + + 152, 22 + + + Clear Mission + + + 149, 6 + + + 152, 22 + + + Draw Polygon + + + 152, 22 + + + Rally Points + + + 152, 22 + + + Geo-Fence + + + 152, 22 + + + Auto WP + + + 152, 22 + + + Map Tool + + + 152, 22 + + + File Load/Save + + + 152, 22 + + + Tracker Home + + + 152, 22 + + + Fly To Here + + + False + + + 152, 22 + + + View As Spline + + + 153, 428 + + + contextMenuStrip1 + + + System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 0, 0 + + + 577, 320 + + + 45 + + + MainMap + + + MissionPlanner.Controls.myGMAP, MissionPlanner.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + panelMap + + + 3 + + + Top, Bottom, Right + + + NoControl + + + 586, 21 + + + Vertical + + + 45, 300 + + + 46 + + + trackBar1 + + + MissionPlanner.Controls.MyTrackBar, MissionPlanner.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + panelMap + + + 4 + + + Top, Right + + + True + + + NoControl + + + 583, 5 + + + 34, 13 + + + 47 + + + Zoom + + + label11 - + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + panelMap - - 2 + + 5 - - Top, Bottom, Left, Right + + Fill - - 17, 17 - - - 150, 22 + + 0, 0 - - Delete WP + + 27, 27 - - 150, 22 + + 617, 327 - - Insert Wp + + 51 + + + panel6 + + + panelMap + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panelBASE + + + 1 113, 22 @@ -1641,12 +2166,6 @@ Circles - - 150, 22 - - - Loiter - 102, 22 @@ -1659,45 +2178,6 @@ WP # - - 150, 22 - - - Jump - - - 150, 22 - - - RTL - - - 150, 22 - - - Land - - - 150, 22 - - - Takeoff - - - 150, 22 - - - Set ROI - - - 150, 22 - - - Clear Mission - - - 147, 6 - 174, 22 @@ -1722,12 +2202,6 @@ Load Polygon - - 150, 22 - - - Draw Polygon - 165, 22 @@ -1752,12 +2226,6 @@ Clear Rally Points - - 150, 22 - - - Rally Points - 177, 22 @@ -1797,12 +2265,6 @@ Save to File - - 150, 22 - - - Geo-Fence - 162, 22 @@ -1815,12 +2277,6 @@ Area - - 150, 22 - - - Auto WP - 167, 22 @@ -1863,12 +2319,6 @@ Reverse WPs - - 150, 22 - - - Map Tool - 168, 22 @@ -1893,150 +2343,6 @@ Load KML File - - 150, 22 - - - File Load/Save - - - 150, 22 - - - Tracker Home - - - 150, 22 - - - Fly To Here - - - False - - - 151, 384 - - - contextMenuStrip1 - - - System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 0, 0 - - - 577, 320 - - - 45 - - - MainMap - - - MissionPlanner.Controls.myGMAP, MissionPlanner.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - panelMap - - - 3 - - - Top, Bottom, Right - - - NoControl - - - 586, 21 - - - Vertical - - - 45, 300 - - - 46 - - - trackBar1 - - - MissionPlanner.Controls.MyTrackBar, MissionPlanner.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - panelMap - - - 4 - - - Top, Right - - - True - - - NoControl - - - 583, 5 - - - 34, 13 - - - 47 - - - Zoom - - - label11 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - panelMap - - - 5 - - - Fill - - - 0, 0 - - - 27, 27 - - - 617, 327 - - - 51 - - - panel6 - - - panelMap - - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - panelBASE - - - 1 - Fill @@ -2061,6 +2367,9 @@ 1 + + 172, 17 + 269, 17 @@ -2478,6 +2787,12 @@ System.Windows.Forms.Timer, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + splineToolStripMenuItem + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + FlightPlanner diff --git a/GCSViews/Simple.cs b/GCSViews/Simple.cs index 3b33df4166..4fdbf4b397 100644 --- a/GCSViews/Simple.cs +++ b/GCSViews/Simple.cs @@ -94,8 +94,25 @@ protected override void Dispose(bool disposing) { threadrun = 0; MainV2.comPort.logreadmode = false; - + System.Threading.Thread.Sleep(100); + + if (routes != null) + route.Dispose(); + if (routes != null) + routes.Dispose(); + if (swlog != null) + swlog.Dispose(); + if (polygon != null) + polygon.Dispose(); + if (polygons != null) + polygons.Dispose(); + if (marker != null) + marker.Dispose(); + + if (components != null) + components.Dispose(); + base.Dispose(disposing); } diff --git a/GCSViews/Simulation.cs b/GCSViews/Simulation.cs index 8685916210..54163cab95 100644 --- a/GCSViews/Simulation.cs +++ b/GCSViews/Simulation.cs @@ -20,7 +20,7 @@ // Written by Michael Oborne namespace MissionPlanner.GCSViews { - public partial class Simulation : MyUserControl, IActivate + public partial class Simulation : MyUserControl { private static readonly ILog log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); MAVLinkInterface comPort = MainV2.comPort; @@ -242,9 +242,12 @@ public struct TDataFromAeroSimRC if (threadrun == 1) ConnectComPort_Click(new object(), new EventArgs()); + this.Dispose(false); + MavLink = null; XplanesSEND = null; SimulatorRECV = null; + SITLSEND = null; } public Simulation() @@ -252,10 +255,6 @@ public Simulation() InitializeComponent(); } - public void Activate() - { - } - private void Simulation_Load(object sender, EventArgs e) { timer_servo_graph.Stop(); diff --git a/GCSViews/Terminal.cs b/GCSViews/Terminal.cs index b9a9d06667..3b8471192c 100644 --- a/GCSViews/Terminal.cs +++ b/GCSViews/Terminal.cs @@ -591,6 +591,9 @@ private void BUT_logbrowse_Click(object sender, EventArgs e) private void BUT_RebootAPM_Click(object sender, EventArgs e) { + if (MainV2.comPort.BaseStream.IsOpen) + MainV2.comPort.BaseStream.Close(); + if (comPort.IsOpen) { BUT_disconnect.Enabled = true; diff --git a/GenOTP.cs b/GenOTP.cs index 354cc52ae4..f01e27a465 100644 --- a/GenOTP.cs +++ b/GenOTP.cs @@ -76,8 +76,6 @@ private void BUT_makeotp_Click(object sender, EventArgs e) // bw.Seek(32, SeekOrigin.Begin); bw.Write(signedhash); - - bw.Close(); } CustomMessageBox.Show("Done"); diff --git a/HIL/Vector3.cs b/HIL/Vector3.cs index 35a57421ad..db84d970ba 100644 --- a/HIL/Vector3.cs +++ b/HIL/Vector3.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; +using MissionPlanner.Utilities; namespace MissionPlanner.HIL { @@ -35,6 +36,11 @@ public Vector3(Vector3 copyme) self.z); } + public static implicit operator Vector3(PointLatLngAlt a) + { + return new Vector3(a.Lat,a.Lng,a.Alt); + } + public static Vector3 operator +(Vector3 self, Vector3 v) { diff --git a/HIL/XPlane.cs b/HIL/XPlane.cs index 94812f699a..b5ea9f55a0 100644 --- a/HIL/XPlane.cs +++ b/HIL/XPlane.cs @@ -7,7 +7,7 @@ namespace MissionPlanner.HIL { - public class XPlane : Hil + public class XPlane : Hil, IDisposable { Socket SimulatorRECV; UdpClient XplanesSEND; @@ -401,5 +401,11 @@ void setupXplane() catch (Exception e) { log.Info("Xplanes udp send error " + e.Message); } } + + public void Dispose() + { + if (SimulatorRECV != null) + SimulatorRECV.Dispose(); + } } } \ No newline at end of file diff --git a/Joystick.cs b/Joystick.cs index 0f64613d06..0bb92c59d3 100644 --- a/Joystick.cs +++ b/Joystick.cs @@ -9,7 +9,7 @@ namespace MissionPlanner { - public class Joystick + public class Joystick: IDisposable { private static readonly ILog log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); Device joystick; @@ -697,5 +697,11 @@ ushort pickchannel(int chan, joystickaxis axis, bool rev, int expo) return (ushort)working; } + + public void Dispose() + { + if (joystick != null) + joystick.Dispose(); + } } } diff --git a/Log/Log.Designer.cs b/Log/Log.Designer.cs index b0975c1e37..a6eab47d28 100644 --- a/Log/Log.Designer.cs +++ b/Log/Log.Designer.cs @@ -30,15 +30,15 @@ private void InitializeComponent() { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Log)); this.TXT_seriallog = new System.Windows.Forms.TextBox(); - this.BUT_DLall = new Controls.MyButton(); - this.BUT_DLthese = new Controls.MyButton(); - this.BUT_clearlogs = new Controls.MyButton(); + this.BUT_DLall = new MissionPlanner.Controls.MyButton(); + this.BUT_DLthese = new MissionPlanner.Controls.MyButton(); + this.BUT_clearlogs = new MissionPlanner.Controls.MyButton(); this.CHK_logs = new System.Windows.Forms.CheckedListBox(); this.TXT_status = new System.Windows.Forms.TextBox(); - this.BUT_redokml = new Controls.MyButton(); - this.BUT_firstperson = new Controls.MyButton(); - this.BUT_dumpdf = new Controls.MyButton(); - this.BUT_bintolog = new Controls.MyButton(); + this.BUT_redokml = new MissionPlanner.Controls.MyButton(); + this.BUT_firstperson = new MissionPlanner.Controls.MyButton(); + this.BUT_dumpdf = new MissionPlanner.Controls.MyButton(); + this.BUT_bintolog = new MissionPlanner.Controls.MyButton(); this.CHK_arducopter = new System.Windows.Forms.RadioButton(); this.CHK_arduplane = new System.Windows.Forms.RadioButton(); this.CHK_ardurover = new System.Windows.Forms.RadioButton(); @@ -52,34 +52,22 @@ private void InitializeComponent() // // BUT_DLall // - this.BUT_DLall.BGGradBot = System.Drawing.Color.FromArgb(((int)(((byte)(205)))), ((int)(((byte)(226)))), ((int)(((byte)(150))))); - this.BUT_DLall.BGGradTop = System.Drawing.Color.FromArgb(((int)(((byte)(148)))), ((int)(((byte)(193)))), ((int)(((byte)(31))))); resources.ApplyResources(this.BUT_DLall, "BUT_DLall"); this.BUT_DLall.Name = "BUT_DLall"; - this.BUT_DLall.Outline = System.Drawing.Color.FromArgb(((int)(((byte)(121)))), ((int)(((byte)(148)))), ((int)(((byte)(41))))); - this.BUT_DLall.TextColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(87)))), ((int)(((byte)(4))))); this.BUT_DLall.UseVisualStyleBackColor = true; this.BUT_DLall.Click += new System.EventHandler(this.BUT_DLall_Click); // // BUT_DLthese // - this.BUT_DLthese.BGGradBot = System.Drawing.Color.FromArgb(((int)(((byte)(205)))), ((int)(((byte)(226)))), ((int)(((byte)(150))))); - this.BUT_DLthese.BGGradTop = System.Drawing.Color.FromArgb(((int)(((byte)(148)))), ((int)(((byte)(193)))), ((int)(((byte)(31))))); resources.ApplyResources(this.BUT_DLthese, "BUT_DLthese"); this.BUT_DLthese.Name = "BUT_DLthese"; - this.BUT_DLthese.Outline = System.Drawing.Color.FromArgb(((int)(((byte)(121)))), ((int)(((byte)(148)))), ((int)(((byte)(41))))); - this.BUT_DLthese.TextColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(87)))), ((int)(((byte)(4))))); this.BUT_DLthese.UseVisualStyleBackColor = true; this.BUT_DLthese.Click += new System.EventHandler(this.BUT_DLthese_Click); // // BUT_clearlogs // - this.BUT_clearlogs.BGGradBot = System.Drawing.Color.FromArgb(((int)(((byte)(205)))), ((int)(((byte)(226)))), ((int)(((byte)(150))))); - this.BUT_clearlogs.BGGradTop = System.Drawing.Color.FromArgb(((int)(((byte)(148)))), ((int)(((byte)(193)))), ((int)(((byte)(31))))); resources.ApplyResources(this.BUT_clearlogs, "BUT_clearlogs"); this.BUT_clearlogs.Name = "BUT_clearlogs"; - this.BUT_clearlogs.Outline = System.Drawing.Color.FromArgb(((int)(((byte)(121)))), ((int)(((byte)(148)))), ((int)(((byte)(41))))); - this.BUT_clearlogs.TextColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(87)))), ((int)(((byte)(4))))); this.BUT_clearlogs.UseVisualStyleBackColor = true; this.BUT_clearlogs.Click += new System.EventHandler(this.BUT_clearlogs_Click); // @@ -99,45 +87,29 @@ private void InitializeComponent() // // BUT_redokml // - this.BUT_redokml.BGGradBot = System.Drawing.Color.FromArgb(((int)(((byte)(205)))), ((int)(((byte)(226)))), ((int)(((byte)(150))))); - this.BUT_redokml.BGGradTop = System.Drawing.Color.FromArgb(((int)(((byte)(148)))), ((int)(((byte)(193)))), ((int)(((byte)(31))))); resources.ApplyResources(this.BUT_redokml, "BUT_redokml"); this.BUT_redokml.Name = "BUT_redokml"; - this.BUT_redokml.Outline = System.Drawing.Color.FromArgb(((int)(((byte)(121)))), ((int)(((byte)(148)))), ((int)(((byte)(41))))); - this.BUT_redokml.TextColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(87)))), ((int)(((byte)(4))))); this.BUT_redokml.UseVisualStyleBackColor = true; this.BUT_redokml.Click += new System.EventHandler(this.BUT_redokml_Click); // // BUT_firstperson // - this.BUT_firstperson.BGGradBot = System.Drawing.Color.FromArgb(((int)(((byte)(205)))), ((int)(((byte)(226)))), ((int)(((byte)(150))))); - this.BUT_firstperson.BGGradTop = System.Drawing.Color.FromArgb(((int)(((byte)(148)))), ((int)(((byte)(193)))), ((int)(((byte)(31))))); resources.ApplyResources(this.BUT_firstperson, "BUT_firstperson"); this.BUT_firstperson.Name = "BUT_firstperson"; - this.BUT_firstperson.Outline = System.Drawing.Color.FromArgb(((int)(((byte)(121)))), ((int)(((byte)(148)))), ((int)(((byte)(41))))); - this.BUT_firstperson.TextColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(87)))), ((int)(((byte)(4))))); this.BUT_firstperson.UseVisualStyleBackColor = true; this.BUT_firstperson.Click += new System.EventHandler(this.BUT_firstperson_Click); // // BUT_dumpdf // - this.BUT_dumpdf.BGGradBot = System.Drawing.Color.FromArgb(((int)(((byte)(205)))), ((int)(((byte)(226)))), ((int)(((byte)(150))))); - this.BUT_dumpdf.BGGradTop = System.Drawing.Color.FromArgb(((int)(((byte)(148)))), ((int)(((byte)(193)))), ((int)(((byte)(31))))); resources.ApplyResources(this.BUT_dumpdf, "BUT_dumpdf"); this.BUT_dumpdf.Name = "BUT_dumpdf"; - this.BUT_dumpdf.Outline = System.Drawing.Color.FromArgb(((int)(((byte)(121)))), ((int)(((byte)(148)))), ((int)(((byte)(41))))); - this.BUT_dumpdf.TextColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(87)))), ((int)(((byte)(4))))); this.BUT_dumpdf.UseVisualStyleBackColor = true; this.BUT_dumpdf.Click += new System.EventHandler(this.BUT_dumpdf_Click); // // BUT_bintolog // - this.BUT_bintolog.BGGradBot = System.Drawing.Color.FromArgb(((int)(((byte)(205)))), ((int)(((byte)(226)))), ((int)(((byte)(150))))); - this.BUT_bintolog.BGGradTop = System.Drawing.Color.FromArgb(((int)(((byte)(148)))), ((int)(((byte)(193)))), ((int)(((byte)(31))))); resources.ApplyResources(this.BUT_bintolog, "BUT_bintolog"); this.BUT_bintolog.Name = "BUT_bintolog"; - this.BUT_bintolog.Outline = System.Drawing.Color.FromArgb(((int)(((byte)(121)))), ((int)(((byte)(148)))), ((int)(((byte)(41))))); - this.BUT_bintolog.TextColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(87)))), ((int)(((byte)(4))))); this.BUT_bintolog.UseVisualStyleBackColor = true; this.BUT_bintolog.Click += new System.EventHandler(this.BUT_bintolog_Click); // diff --git a/Log/Log.cs b/Log/Log.cs index a27f5330d8..ebf9a6837f 100644 --- a/Log/Log.cs +++ b/Log/Log.cs @@ -849,7 +849,7 @@ private void Log_FormClosing(object sender, FormClosingEventArgs e) System.Threading.Thread.Sleep(500); if (comPort.IsOpen) { - //comPort.Close(); + comPort.Close(); } } diff --git a/Log/Log.resx b/Log/Log.resx index dbc62ebe04..f97d772a96 100644 --- a/Log/Log.resx +++ b/Log/Log.resx @@ -112,16 +112,20 @@ 2.0 - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + + + Top, Bottom, Left, Right + + 135, 43 - + True @@ -135,7 +139,7 @@ TXT_seriallog - System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 $this @@ -159,7 +163,7 @@ BUT_DLall - Controls.MyButton, MissionPlanner.lanner10, Version=1.1.4932.13202, Culture=neutral, PublicKeyToken=null + MissionPlanner.Controls.MyButton, MissionPlanner.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null $this @@ -183,7 +187,7 @@ BUT_DLthese - Controls.MyButton, MissionPlanner.lanner10, Version=1.1.4932.13202, Culture=neutral, PublicKeyToken=null + MissionPlanner.Controls.MyButton, MissionPlanner.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null $this @@ -207,7 +211,7 @@ BUT_clearlogs - Controls.MyButton, MissionPlanner.lanner10, Version=1.1.4932.13202, Culture=neutral, PublicKeyToken=null + MissionPlanner.Controls.MyButton, MissionPlanner.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null $this @@ -228,7 +232,7 @@ CHK_logs - System.Windows.Forms.CheckedListBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.CheckedListBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 $this @@ -252,7 +256,7 @@ TXT_status - System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 $this @@ -276,7 +280,7 @@ BUT_redokml - Controls.MyButton, MissionPlanner.lanner10, Version=1.1.4932.13202, Culture=neutral, PublicKeyToken=null + MissionPlanner.Controls.MyButton, MissionPlanner.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null $this @@ -300,7 +304,7 @@ BUT_firstperson - Controls.MyButton, MissionPlanner.lanner10, Version=1.1.4932.13202, Culture=neutral, PublicKeyToken=null + MissionPlanner.Controls.MyButton, MissionPlanner.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null $this @@ -308,7 +312,6 @@ 6 - NoControl @@ -328,7 +331,7 @@ BUT_dumpdf - Controls.MyButton, MissionPlanner.lanner10, Version=1.1.4932.13202, Culture=neutral, PublicKeyToken=null + MissionPlanner.Controls.MyButton, MissionPlanner.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null $this @@ -355,7 +358,7 @@ BUT_bintolog - Controls.MyButton, MissionPlanner.lanner10, Version=1.1.4932.13202, Culture=neutral, PublicKeyToken=null + MissionPlanner.Controls.MyButton, MissionPlanner.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null $this @@ -385,7 +388,7 @@ CHK_arducopter - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 $this @@ -415,7 +418,7 @@ CHK_arduplane - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 $this @@ -445,7 +448,7 @@ CHK_ardurover - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 $this @@ -472,7 +475,7 @@ label1 - System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 $this @@ -480,7 +483,7 @@ 0 - + True @@ -572,6 +575,6 @@ Log - System.Windows.Forms.Form, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 \ No newline at end of file diff --git a/Log/LogBrowse.cs b/Log/LogBrowse.cs index 5e73fbdbd5..4c3952b501 100644 --- a/Log/LogBrowse.cs +++ b/Log/LogBrowse.cs @@ -147,6 +147,7 @@ private void Form1_Load(object sender, EventArgs e) } else { + this.Close(); return; } } diff --git a/Log/MavlinkLog.cs b/Log/MavlinkLog.cs index ad8ec3e5ef..c2dd4433de 100644 --- a/Log/MavlinkLog.cs +++ b/Log/MavlinkLog.cs @@ -651,11 +651,15 @@ private void BUT_graphmavlog_Click(object sender, EventArgs e) 0x600000,0x006000,0x000060,0x606000,0x600060,0x006060, 0xA00000,0x00A000,0x0000A0,0xA0A000,0xA000A0,0x00A0A0, 0xE00000,0x00E000,0x0000E0,0xE0E000,0xE000E0,0x00E0E0, */ - }; + }; + Form selectform; private List GetLogFileValidFields(string logfile) { - Form selectform = SelectDataToGraphForm(); + if (selectform != null && !selectform.IsDisposed) + selectform.Close(); + + selectform = SelectDataToGraphForm(); Hashtable seenIt = new Hashtable(); @@ -967,7 +971,7 @@ public MethodInfo RunCode(CompilerResults results) } catch (Exception ex) { - Console.WriteLine("Error: An exception occurred while executing the script", ex); + Console.WriteLine("Error: An exception occurred while executing the script\n{0}", ex); } return null; } diff --git a/MainV2.Designer.cs b/MainV2.Designer.cs index 9125d439c8..2069ce207b 100644 --- a/MainV2.Designer.cs +++ b/MainV2.Designer.cs @@ -15,6 +15,7 @@ partial class MainV2 protected override void Dispose(bool disposing) { Console.WriteLine("mainv2_Dispose"); + PluginThreadrunner.Dispose(); if (disposing && (components != null)) { components.Dispose(); diff --git a/Maps/MyImageCache.cs b/Maps/MyImageCache.cs index 2d41abab51..6617e00a42 100644 --- a/Maps/MyImageCache.cs +++ b/Maps/MyImageCache.cs @@ -68,8 +68,6 @@ bool PureImageCache.PutImageToCache(byte[] tile, int type, GPoint pos, int zoom) using (BinaryWriter sw = new BinaryWriter(File.OpenWrite(file))) { sw.Write(tile.ToArray()); - - sw.Close(); } } catch (Exception ex) @@ -103,7 +101,6 @@ PureImage PureImageCache.GetImageFromCache(int type, GPoint pos, int zoom) { ret.Data = stm; } - sr.Close(); } } } diff --git a/Mavlink/MAVLink.cs b/Mavlink/MAVLink.cs index d48c4b3f37..a6fade9605 100644 --- a/Mavlink/MAVLink.cs +++ b/Mavlink/MAVLink.cs @@ -19,7 +19,7 @@ namespace MissionPlanner { - public class MAVLinkInterface: MAVLink, IDisposable + public class MAVLinkInterface: MAVLink, IDisposable { private static readonly ILog log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); public ICommsSerial BaseStream { get; set; } @@ -325,7 +325,8 @@ private void OpenBg(object PRsender, bool getparams, ProgressWorkerEventArgs pro BaseStream.DiscardInBuffer(); - Thread.Sleep(500); + // other boards seem to have issues if there is no delay? posible bootloader timeout issue + Thread.Sleep(1000); } byte[] buffer = new byte[0]; @@ -673,7 +674,7 @@ public bool setParam(string paramname, float value) while (true) { - if (!(start.AddMilliseconds(500) > DateTime.Now)) + if (!(start.AddMilliseconds(700) > DateTime.Now)) { if (retrys > 0) { @@ -1457,7 +1458,7 @@ public byte getWPCount() while (true) { - if (!(start.AddMilliseconds(500) > DateTime.Now)) + if (!(start.AddMilliseconds(700) > DateTime.Now)) { if (retrys > 0) { @@ -1858,7 +1859,7 @@ public MAV_MISSION_RESULT setWP(Locationwp loc, ushort index, MAV_FRAME frame, b while (true) { - if (!(start.AddMilliseconds(150) > DateTime.Now)) + if (!(start.AddMilliseconds(700) > DateTime.Now)) { if (retrys > 0) { @@ -2441,17 +2442,26 @@ public byte[] readPacket() if (buffer[5] == (byte)MAVLink.MAVLINK_MSG_ID.STATUSTEXT) // status text { + var msg = MAV.packets[(byte)MAVLink.MAVLINK_MSG_ID.STATUSTEXT].ByteArrayToStructure(6); + + byte sev = msg.severity; + string logdata = Encoding.ASCII.GetString(buffer, 7, buffer.Length - 7); int ind = logdata.IndexOf('\0'); if (ind != -1) logdata = logdata.Substring(0, ind); log.Info(DateTime.Now + " " + logdata); - if (MainV2.speechEngine != null && MainV2.config["speechenable"] != null && MainV2.config["speechenable"].ToString() == "True") + if (sev >= 3) { - //MainV2.talk.SpeakAsync(logdata); - } + MAV.cs.messageHigh = logdata; + MAV.cs.messageHighTime = DateTime.Now; + if (MainV2.speechEngine != null && MainV2.speechEngine.State == System.Speech.Synthesis.SynthesizerState.Ready && MainV2.config["speechenable"] != null && MainV2.config["speechenable"].ToString() == "True") + { + MainV2.speechEngine.SpeakAsync(logdata); + } + } } // set ap type @@ -2597,7 +2607,7 @@ public PointLatLngAlt getFencePoint(int no, ref int total) while (true) { - if (!(start.AddMilliseconds(500) > DateTime.Now)) + if (!(start.AddMilliseconds(700) > DateTime.Now)) { if (retrys > 0) { @@ -2675,7 +2685,7 @@ public PointLatLngAlt getRallyPoint(int no, ref int total) while (true) { - if (!(start.AddMilliseconds(500) > DateTime.Now)) + if (!(start.AddMilliseconds(700) > DateTime.Now)) { if (retrys > 0) { @@ -2981,6 +2991,10 @@ public override string ToString() public void Dispose() { + if (_bytesReceivedSubj != null) + _bytesReceivedSubj.Dispose(); + if (_bytesSentSubj != null) + _bytesSentSubj.Dispose(); this.Close(); } } diff --git a/MissionPlanner.csproj b/MissionPlanner.csproj index e7f2aed607..6c464e18bc 100644 --- a/MissionPlanner.csproj +++ b/MissionPlanner.csproj @@ -322,6 +322,8 @@ Command.cs + + diff --git a/Msi/installer.wxs b/Msi/installer.wxs index c9f2089d3b..503c227517 100644 --- a/Msi/installer.wxs +++ b/Msi/installer.wxs @@ -2,14 +2,14 @@ - + - - + + @@ -32,7 +32,7 @@ - + @@ -68,52 +68,52 @@ - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + @@ -138,11 +138,11 @@ - + - + @@ -153,20 +153,20 @@ - + - + - + @@ -180,7 +180,7 @@ - + @@ -192,13 +192,13 @@ - + - + @@ -209,7 +209,7 @@ - + @@ -220,12 +220,12 @@ - + - + @@ -239,28 +239,28 @@ - + - + - + - + - + @@ -269,17 +269,17 @@ - + - + - + @@ -289,22 +289,22 @@ - + - + - + - + @@ -411,7 +411,7 @@ - + 0NMY5+yQ{x0g#9Tk?eS}ixF86!>^yx(ZxqXtxw|Xu#MOYv#eQE6nKOai~s-t delta 38 wcmV+>0NMY5+yQ{x0g#9TlxAwNixF86>cisL|5gJ{zLbRIIpV`9v#eQE6lwqx-2eap diff --git a/OSDVideo.cs b/OSDVideo.cs index e2d85e2b6a..3c8007987a 100644 --- a/OSDVideo.cs +++ b/OSDVideo.cs @@ -54,7 +54,7 @@ public partial class OSDVideo : Form, ISampleGrabberCB private bool m_bRunning = false; /// Dimensions of the image, calculated once in constructor. - public IntPtr m_handle = IntPtr.Zero; + private IntPtr m_handle = IntPtr.Zero; private int m_videoWidth; private int m_videoHeight; private int m_stride; @@ -95,7 +95,6 @@ private void saveconfig() sw.WriteLine(txtAviFileName.Text); sw.WriteLine(txt_tlog.Text); sw.WriteLine(trackBar1.Value); - sw.Close(); } } catch { } @@ -110,7 +109,6 @@ private void loadconfig() txtAviFileName.Text = sr.ReadLine(); txt_tlog.Text = sr.ReadLine(); trackBar1.Value = int.Parse(sr.ReadLine()); - sr.Close(); } } catch { } diff --git a/Program.cs b/Program.cs index 4c460fc771..b18fef082f 100644 --- a/Program.cs +++ b/Program.cs @@ -336,27 +336,29 @@ static void handleException(Exception ex) // Set the ContentLength property of the WebRequest. request.ContentLength = byteArray.Length; // Get the request stream. - Stream dataStream = request.GetRequestStream(); - // Write the data to the request stream. - dataStream.Write(byteArray, 0, byteArray.Length); - // Close the Stream object. - dataStream.Close(); + using (Stream dataStream = request.GetRequestStream()) + { + // Write the data to the request stream. + dataStream.Write(byteArray, 0, byteArray.Length); + } // Get the response. - WebResponse response = request.GetResponse(); - // Display the status. - Console.WriteLine(((HttpWebResponse)response).StatusDescription); - // Get the stream containing content returned by the server. - dataStream = response.GetResponseStream(); - // Open the stream using a StreamReader for easy access. - StreamReader reader = new StreamReader(dataStream); - // Read the content. - string responseFromServer = reader.ReadToEnd(); - // Display the content. - Console.WriteLine(responseFromServer); - // Clean up the streams. - reader.Close(); - dataStream.Close(); - response.Close(); + using (WebResponse response = request.GetResponse()) + { + // Display the status. + Console.WriteLine(((HttpWebResponse)response).StatusDescription); + // Get the stream containing content returned by the server. + using (Stream dataStream = response.GetResponseStream()) + { + // Open the stream using a StreamReader for easy access. + using (StreamReader reader = new StreamReader(dataStream)) + { + // Read the content. + string responseFromServer = reader.ReadToEnd(); + // Display the content. + Console.WriteLine(responseFromServer); + } + } + } } catch { diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs index 62b9cfb10d..0a3cc84592 100644 --- a/Properties/AssemblyInfo.cs +++ b/Properties/AssemblyInfo.cs @@ -34,5 +34,5 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.1.*")] -[assembly: AssemblyFileVersion("1.2.85")] +[assembly: AssemblyFileVersion("1.2.86")] [assembly: NeutralResourcesLanguageAttribute("")] diff --git a/RAW_Sensor.Designer.cs b/RAW_Sensor.Designer.cs index d2a48d6f5d..91c25daeec 100644 --- a/RAW_Sensor.Designer.cs +++ b/RAW_Sensor.Designer.cs @@ -14,6 +14,8 @@ partial class RAW_Sensor /// true if managed resources should be disposed; otherwise, false. protected override void Dispose(bool disposing) { + if (sw != null) + sw.Dispose(); if (disposing && (components != null)) { components.Dispose(); diff --git a/Radio/3DRradio.Designer.cs b/Radio/3DRradio.Designer.cs index 852a8bcd5f..ad5bc60302 100644 --- a/Radio/3DRradio.Designer.cs +++ b/Radio/3DRradio.Designer.cs @@ -75,10 +75,10 @@ private void InitializeComponent() this.ATI = new System.Windows.Forms.TextBox(); this.label11 = new System.Windows.Forms.Label(); this.label12 = new System.Windows.Forms.Label(); - this.BUT_savesettings = new Controls.MyButton(); - this.BUT_getcurrent = new Controls.MyButton(); + this.BUT_savesettings = new MissionPlanner.Controls.MyButton(); + this.BUT_getcurrent = new MissionPlanner.Controls.MyButton(); this.lbl_status = new System.Windows.Forms.Label(); - this.BUT_upload = new Controls.MyButton(); + this.BUT_upload = new MissionPlanner.Controls.MyButton(); this.label13 = new System.Windows.Forms.Label(); this.label14 = new System.Windows.Forms.Label(); this.label15 = new System.Windows.Forms.Label(); @@ -103,13 +103,15 @@ private void InitializeComponent() this.label18 = new System.Windows.Forms.Label(); this.SPLIT_remote = new System.Windows.Forms.SplitContainer(); this.CHK_advanced = new System.Windows.Forms.CheckBox(); - this.BUT_Syncoptions = new Controls.MyButton(); + this.BUT_Syncoptions = new MissionPlanner.Controls.MyButton(); this.ATI3 = new System.Windows.Forms.TextBox(); this.groupBox1 = new System.Windows.Forms.GroupBox(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.label9 = new System.Windows.Forms.Label(); this.label10 = new System.Windows.Forms.Label(); - this.BUT_resettodefault = new Controls.MyButton(); + this.BUT_resettodefault = new MissionPlanner.Controls.MyButton(); + this.ATI2 = new System.Windows.Forms.TextBox(); + this.RTI2 = new System.Windows.Forms.TextBox(); this.SPLIT_local.Panel1.SuspendLayout(); this.SPLIT_local.Panel2.SuspendLayout(); this.SPLIT_local.SuspendLayout(); @@ -934,6 +936,7 @@ private void InitializeComponent() // // groupBox1 // + this.groupBox1.Controls.Add(this.ATI2); this.groupBox1.Controls.Add(this.SPLIT_local); this.groupBox1.Controls.Add(this.ATI3); this.groupBox1.Controls.Add(this.label11); @@ -946,6 +949,7 @@ private void InitializeComponent() // // groupBox2 // + this.groupBox2.Controls.Add(this.RTI2); this.groupBox2.Controls.Add(this.label9); this.groupBox2.Controls.Add(this.SPLIT_remote); this.groupBox2.Controls.Add(this.RTI); @@ -970,6 +974,18 @@ private void InitializeComponent() this.BUT_resettodefault.UseVisualStyleBackColor = true; this.BUT_resettodefault.Click += new System.EventHandler(this.BUT_resettodefault_Click); // + // ATI2 + // + resources.ApplyResources(this.ATI2, "ATI2"); + this.ATI2.Name = "ATI2"; + this.ATI2.ReadOnly = true; + // + // RTI2 + // + resources.ApplyResources(this.RTI2, "RTI2"); + this.RTI2.Name = "RTI2"; + this.RTI2.ReadOnly = true; + // // _3DRradio // resources.ApplyResources(this, "$this"); @@ -1089,5 +1105,7 @@ private void InitializeComponent() private System.Windows.Forms.ComboBox S16; private System.Windows.Forms.Label label18; private System.Windows.Forms.ComboBox S15; + private System.Windows.Forms.TextBox ATI2; + private System.Windows.Forms.TextBox RTI2; } } \ No newline at end of file diff --git a/Radio/3DRradio.cs b/Radio/3DRradio.cs index 9bc6fbfb8b..50585375c4 100644 --- a/Radio/3DRradio.cs +++ b/Radio/3DRradio.cs @@ -40,20 +40,20 @@ public _3DRradio() RS3.DataSource = Enumerable.Range(0, 500).ToArray(); } - bool getFirmware(uploader.Uploader.Code device) + bool getFirmware(uploader.Uploader.Board device) { // was https://raw.github.com/tridge/SiK/master/Firmware/dst/radio.hm_trp.hex // now http://www.samba.org/tridge/UAV/3DR/radio.hm_trp.hex - if (device == uploader.Uploader.Code.DEVICE_ID_HM_TRP) + if (device == uploader.Uploader.Board.DEVICE_ID_HM_TRP) { return Common.getFilefromNet("http://www.samba.org/tridge/UAV/3DR/radio.hm_trp.hex", firmwarefile); } - else if (device == uploader.Uploader.Code.DEVICE_ID_RFD900) + else if (device == uploader.Uploader.Board.DEVICE_ID_RFD900) { return Common.getFilefromNet("http://rfdesign.com.au/firmware/radio.rfd900.hex", firmwarefile); } - else if (device == uploader.Uploader.Code.DEVICE_ID_RFD900A) + else if (device == uploader.Uploader.Board.DEVICE_ID_RFD900A) { int fixme; int fixme23; @@ -149,8 +149,8 @@ private void BUT_upload_Click(object sender, EventArgs e) catch { } } - global::uploader.Uploader.Code device = global::uploader.Uploader.Code.FAILED; - global::uploader.Uploader.Code freq = global::uploader.Uploader.Code.FAILED; + global::uploader.Uploader.Board device = global::uploader.Uploader.Board.FAILED; + global::uploader.Uploader.Frequency freq = global::uploader.Uploader.Frequency.FAILED; // get the device type and frequency in the bootloader uploader.getDevice(ref device, ref freq); @@ -466,19 +466,27 @@ private void BUT_getcurrent_Click(object sender, EventArgs e) RTI.Text = doCommand(comPort, "RTI"); - uploader.Uploader.Code freq = (uploader.Uploader.Code)Enum.Parse(typeof(uploader.Uploader.Code), doCommand(comPort, "ATI3")); - uploader.Uploader.Code board = (uploader.Uploader.Code)Enum.Parse(typeof(uploader.Uploader.Code), doCommand(comPort, "ATI2")); + uploader.Uploader.Frequency freq = (uploader.Uploader.Frequency)Enum.Parse(typeof(uploader.Uploader.Frequency), doCommand(comPort, "ATI3")); + uploader.Uploader.Board board = (uploader.Uploader.Board)Enum.Parse(typeof(uploader.Uploader.Board), doCommand(comPort, "ATI2")); ATI3.Text = freq.ToString(); + + ATI2.Text = board.ToString(); + try + { + RTI2.Text = ((uploader.Uploader.Board)Enum.Parse(typeof(uploader.Uploader.Board), doCommand(comPort, "RTI2"))).ToString(); + } + catch { } // 8 and 9 - if (freq == uploader.Uploader.Code.FREQ_915) { + if (freq == uploader.Uploader.Frequency.FREQ_915) + { S8.DataSource = Range(895000, 1000, 935000); RS8.DataSource = Range(895000, 1000, 935000); S9.DataSource = Range(895000, 1000, 935000); RS9.DataSource = Range(895000, 1000, 935000); } - else if (freq == uploader.Uploader.Code.FREQ_433) + else if (freq == uploader.Uploader.Frequency.FREQ_433) { S8.DataSource = Range(414000, 100, 454000); RS8.DataSource = Range(414000, 100, 454000); @@ -486,7 +494,7 @@ private void BUT_getcurrent_Click(object sender, EventArgs e) S9.DataSource = Range(414000, 100, 454000); RS9.DataSource = Range(414000, 100, 454000); } - else if (freq == uploader.Uploader.Code.FREQ_868) + else if (freq == uploader.Uploader.Frequency.FREQ_868) { S8.DataSource = Range(849000, 1000, 889000); RS8.DataSource = Range(849000, 1000, 889000); @@ -495,7 +503,7 @@ private void BUT_getcurrent_Click(object sender, EventArgs e) RS9.DataSource = Range(849000, 1000, 889000); } - if (board == uploader.Uploader.Code.DEVICE_ID_RFD900 || board == uploader.Uploader.Code.DEVICE_ID_RFD900A) + if (board == uploader.Uploader.Board.DEVICE_ID_RFD900 || board == uploader.Uploader.Board.DEVICE_ID_RFD900A) { S4.DataSource = Range(1, 1, 30); RS4.DataSource = Range(1, 1, 30); diff --git a/Radio/3DRradio.resx b/Radio/3DRradio.resx index 847db5b908..7b6f4a7a9f 100644 --- a/Radio/3DRradio.resx +++ b/Radio/3DRradio.resx @@ -140,6 +140,9 @@ 10 + + 17, 17 + False @@ -179,9 +182,6 @@ 4 - - 17, 17 - Serial baud rate in rounded kbps. So 57 means 57600. @@ -754,6 +754,9 @@ 14 + + 17, 17 + False @@ -1129,7 +1132,7 @@ 1 - 82, 38 + 59, 38 True @@ -1160,7 +1163,7 @@ which result in a valid packet CRC groupBox1 - 4 + 5 False @@ -2073,10 +2076,10 @@ red LED solid - in firmware update mode groupBox2 - 2 + 3 - 82, 12 + 59, 12 147, 20 @@ -2094,7 +2097,7 @@ red LED solid - in firmware update mode groupBox1 - 3 + 4 True @@ -2121,7 +2124,7 @@ red LED solid - in firmware update mode groupBox1 - 2 + 3 True @@ -2148,7 +2151,7 @@ red LED solid - in firmware update mode groupBox1 - 5 + 6 False @@ -2169,7 +2172,7 @@ red LED solid - in firmware update mode BUT_savesettings - Controls.MyButton, 3DRRadio, Version=0.0.4897.38272, Culture=neutral, PublicKeyToken=null + MissionPlanner.Controls.MyButton, MissionPlanner.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null $this @@ -2193,7 +2196,7 @@ red LED solid - in firmware update mode BUT_getcurrent - Controls.MyButton, 3DRRadio, Version=0.0.4897.38272, Culture=neutral, PublicKeyToken=null + MissionPlanner.Controls.MyButton, MissionPlanner.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null $this @@ -2238,7 +2241,7 @@ red LED solid - in firmware update mode BUT_upload - Controls.MyButton, 3DRRadio, Version=0.0.4897.38272, Culture=neutral, PublicKeyToken=null + MissionPlanner.Controls.MyButton, MissionPlanner.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null $this @@ -2929,7 +2932,7 @@ red LED solid - in firmware update mode groupBox1 - 0 + 1 True @@ -2983,7 +2986,7 @@ red LED solid - in firmware update mode groupBox2 - 1 + 2 True @@ -3037,7 +3040,7 @@ red LED solid - in firmware update mode BUT_Syncoptions - Controls.MyButton, 3DRRadio, Version=0.0.4897.38272, Culture=neutral, PublicKeyToken=null + MissionPlanner.Controls.MyButton, MissionPlanner.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null $this @@ -3046,7 +3049,7 @@ red LED solid - in firmware update mode 5 - 230, 12 + 207, 12 102, 20 @@ -3064,7 +3067,31 @@ red LED solid - in firmware update mode groupBox1 - 1 + 2 + + + 315, 12 + + + True + + + 61, 65 + + + 80 + + + ATI2 + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox1 + + + 0 12, 48 @@ -3090,6 +3117,30 @@ red LED solid - in firmware update mode 4 + + 246, 12 + + + True + + + 61, 65 + + + 81 + + + RTI2 + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox2 + + + 0 + True @@ -3118,7 +3169,7 @@ red LED solid - in firmware update mode groupBox2 - 0 + 1 400, 48 @@ -3190,7 +3241,7 @@ red LED solid - in firmware update mode BUT_resettodefault - Controls.MyButton, 3DRRadio, Version=0.0.4897.38272, Culture=neutral, PublicKeyToken=null + MissionPlanner.Controls.MyButton, MissionPlanner.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null $this diff --git a/Radio/Uploader.cs b/Radio/Uploader.cs index 57e5ae475c..218f22b561 100644 --- a/Radio/Uploader.cs +++ b/Radio/Uploader.cs @@ -37,19 +37,32 @@ public enum Code : byte PROG_MULTI_MAX = 32, // maximum number of bytes in a PROG_MULTI command READ_MULTI_MAX = 255, // largest read that can be requested - // device IDs XXX should come with the firmware image... - DEVICE_ID_RF50 = 0x4d, - DEVICE_ID_HM_TRP= 0x4e, + + }; + + public enum Board : byte + { + // device IDs XXX should come with the firmware image... + DEVICE_ID_RF50 = 0x4d, + DEVICE_ID_HM_TRP = 0x4e, DEVICE_ID_RFD900 = 0X42, DEVICE_ID_RFD900A = 0X43, - - // frequency code bytes XXX should come with the firmware image... - FREQ_NONE = 0xf0, - FREQ_433 = 0x43, - FREQ_470 = 0x47, - FREQ_868 = 0x86, - FREQ_915 = 0x91, - }; + + FAILED = 0x11, + } + + public enum Frequency : byte + { + // frequency code bytes XXX should come with the firmware image... + FREQ_NONE = 0xf0, + FREQ_433 = 0x43, + FREQ_470 = 0x47, + FREQ_868 = 0x86, + FREQ_915 = 0x91, + + FAILED = 0x11, + } + public Uploader () { @@ -75,7 +88,7 @@ public void upload (SerialPort on_port, IHex image_data) } catch (Exception e) { if (port.IsOpen) port.Close (); - throw e; + throw; } } @@ -312,33 +325,34 @@ private void cmdReboot () { send (Code.REBOOT); } - - private void checkDevice () - { - Code id, freq; - - send (Code.GET_DEVICE); - send (Code.EOC); - - id = (Code)recv (); - freq = (Code)recv (); - - // XXX should be getting valid board/frequency data from firmware file - if ((id != Code.DEVICE_ID_HM_TRP) && (id != Code.DEVICE_ID_RF50) && (id != Code.DEVICE_ID_RFD900) && (id != Code.DEVICE_ID_RFD900A)) - throw new Exception ("bootloader device ID mismatch - device:" + id.ToString()); - - getSync (); - } - public void getDevice(ref Code device, ref Code freq) + private void checkDevice() + { + Board id; + Frequency freq; + + send(Code.GET_DEVICE); + send(Code.EOC); + + id = (Board)recv(); + freq = (Frequency)recv(); + + // XXX should be getting valid board/frequency data from firmware file + if ((id != Board.DEVICE_ID_HM_TRP) && (id != Board.DEVICE_ID_RF50) && (id != Board.DEVICE_ID_RFD900) && (id != Board.DEVICE_ID_RFD900A)) + throw new Exception("bootloader device ID mismatch - device:" + id.ToString()); + + getSync(); + } + + public void getDevice(ref Board device, ref Frequency freq) { connect_and_sync(); send(Code.GET_DEVICE); send(Code.EOC); - device = (Code)recv(); - freq = (Code)recv(); + device = (Board)recv(); + freq = (Frequency)recv(); getSync(); } diff --git a/Resources/Hframe.png b/Resources/Hframe.png index eef7b02d0343f7471bf26c0dab07c29968f157a3..8578a42d379e01d4bd6c50ea61aa7f4a28bf0b93 100644 GIT binary patch literal 12707 zcmX|HWmFtpkR5`%1_|zj;O_1c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<^lMD9i-U3@RL0)$}g8Nl%Q73XJ%`sW9-Szjw4-TTCm@HBF(y z#pQ>Ks|yMd=~!~}l*JMeX9nf>UUA3Pdh-9+O{ UAxB!|KO0G9BoskqVnzY~3*SfGMgRZ+ diff --git a/Utilities/Firmware.cs b/Utilities/Firmware.cs index 31db1f8f5d..5df3c48fe9 100644 --- a/Utilities/Firmware.cs +++ b/Utilities/Firmware.cs @@ -553,21 +553,17 @@ public bool UploadFlash(string comport, string filename, BoardDetect.boards boar } byte[] FLASH = new byte[1]; - StreamReader sr = null; try { updateProgress(0, "Reading Hex File"); - sr = new StreamReader(filename); - FLASH = readIntelHEXv2(sr); - sr.Close(); + using (StreamReader sr = new StreamReader(filename)) + { + FLASH = readIntelHEXv2(sr); + } log.InfoFormat("\n\nSize: {0}\n\n", FLASH.Length); } catch (Exception ex) { - if (sr != null) - { - sr.Dispose(); - } updateProgress(0, "Failed read HEX"); CustomMessageBox.Show("Failed to read firmware.hex : " + ex.Message); return false; diff --git a/Utilities/GMapMarkerRallyPt.cs b/Utilities/GMapMarkerRallyPt.cs index 4cfd73d570..f6536c9d84 100644 --- a/Utilities/GMapMarkerRallyPt.cs +++ b/Utilities/GMapMarkerRallyPt.cs @@ -18,6 +18,8 @@ public class GMapMarkerRallyPt : GMapMarker //static Bitmap localcache1 = Resources.shadow50; static Bitmap localcache2 = Resources.marker_02; + public int Alt { get; set; } + public GMapMarkerRallyPt(PointLatLng p) : base(p) { diff --git a/Utilities/ParameterMetaDataParser.cs b/Utilities/ParameterMetaDataParser.cs index 8d737be9d5..093f4de591 100644 --- a/Utilities/ParameterMetaDataParser.cs +++ b/Utilities/ParameterMetaDataParser.cs @@ -333,18 +333,9 @@ private static string ReadDataFromAddress(string address) { // Store the data to return data = reader.ReadToEnd(); - - // Close the reader - reader.Close(); } - - // Close the datastream - dataStream.Close(); } } - - // Close the response - response.Close(); } cache[address] = data; diff --git a/Utilities/Update.cs b/Utilities/Update.cs index e9918d6052..d17f6b749d 100644 --- a/Utilities/Update.cs +++ b/Utilities/Update.cs @@ -72,7 +72,9 @@ public static void updateCheckMain(ProgressReporterDialogue frmProgressReporter) process.Start(); log.Info("Quitting existing process"); + frmProgressReporter.BeginInvoke((Action) delegate { Application.Exit(); + }); } catch (Exception ex) { @@ -108,56 +110,52 @@ public static void CheckForUpdate() // ((HttpWebRequest)webRequest).IfModifiedSince = File.GetLastWriteTimeUtc(path); - // Get the response. - var response = webRequest.GetResponse(); - // Display the status. - log.Debug("Response status: " + ((HttpWebResponse)response).StatusDescription); - // Get the stream containing content returned by the server. - bool updateFound = false; - if (File.Exists(path)) + // Get the response. + using (var response = webRequest.GetResponse()) { - var fi = new FileInfo(path); - - Version LocalVersion = new Version(); - Version WebVersion = new Version(); + // Display the status. + log.Debug("Response status: " + ((HttpWebResponse)response).StatusDescription); + // Get the stream containing content returned by the server. if (File.Exists(path)) { - using (Stream fs = File.OpenRead(path)) + var fi = new FileInfo(path); + + Version LocalVersion = new Version(); + Version WebVersion = new Version(); + + if (File.Exists(path)) { - using (StreamReader sr = new StreamReader(fs)) + using (Stream fs = File.OpenRead(path)) { - LocalVersion = new Version(sr.ReadLine()); - sr.Close(); + using (StreamReader sr = new StreamReader(fs)) + { + LocalVersion = new Version(sr.ReadLine()); + } } - fs.Close(); } - } - using (StreamReader sr = new StreamReader(response.GetResponseStream())) - { - WebVersion = new Version(sr.ReadLine()); - - sr.Close(); - } + using (StreamReader sr = new StreamReader(response.GetResponseStream())) + { + WebVersion = new Version(sr.ReadLine()); + } - log.Info("New file Check: local " + LocalVersion + " vs Remote " + WebVersion); + log.Info("New file Check: local " + LocalVersion + " vs Remote " + WebVersion); - if (LocalVersion < WebVersion) + if (LocalVersion < WebVersion) + { + updateFound = true; + } + } + else { updateFound = true; + log.Info("File does not exist: Getting " + path); + // get it } } - else - { - updateFound = true; - log.Info("File does not exist: Getting " + path); - // get it - } - - response.Close(); if (updateFound) { @@ -321,58 +319,56 @@ static void GetNewFile(ProgressReporterDialogue frmProgressReporter, string base // tell server we allow compress content request.Headers.Add("Accept-Encoding", "gzip,deflate"); // Get the response. - WebResponse response = request.GetResponse(); - // Display the status. - log.Info(((HttpWebResponse)response).StatusDescription); - // Get the stream containing content returned by the server. - Stream dataStream = response.GetResponseStream(); + using (WebResponse response = request.GetResponse()) + { + // Display the status. + log.Info(((HttpWebResponse)response).StatusDescription); + // Get the stream containing content returned by the server. + Stream dataStream = response.GetResponseStream(); - // update status - if (frmProgressReporter != null) - frmProgressReporter.UpdateProgressAndStatus(-1, "Getting " + file); + // update status + if (frmProgressReporter != null) + frmProgressReporter.UpdateProgressAndStatus(-1, "Getting " + file); - // from head - long bytes = response.ContentLength; + // from head + long bytes = response.ContentLength; - long contlen = bytes; + long contlen = bytes; - byte[] buf1 = new byte[4096]; + byte[] buf1 = new byte[4096]; - // if the file doesnt exist. just save it inplace - string fn = path + ".new"; + // if the file doesnt exist. just save it inplace + string fn = path + ".new"; - if (!File.Exists(path)) - fn = path; + if (!File.Exists(path)) + fn = path; - using (FileStream fs = new FileStream(fn, FileMode.Create)) - { + using (FileStream fs = new FileStream(fn, FileMode.Create)) + { - DateTime dt = DateTime.Now; + DateTime dt = DateTime.Now; - while (dataStream.CanRead) - { - try + while (dataStream.CanRead) { - if (dt.Second != DateTime.Now.Second) + try { - if (frmProgressReporter != null) - frmProgressReporter.UpdateProgressAndStatus((int)(((double)(contlen - bytes) / (double)contlen) * 100), "Getting " + file + ": " + (((double)(contlen - bytes) / (double)contlen) * 100).ToString("0.0") + "%"); //+ Math.Abs(bytes) + " bytes"); - dt = DateTime.Now; + if (dt.Second != DateTime.Now.Second) + { + if (frmProgressReporter != null) + frmProgressReporter.UpdateProgressAndStatus((int)(((double)(contlen - bytes) / (double)contlen) * 100), "Getting " + file + ": " + (((double)(contlen - bytes) / (double)contlen) * 100).ToString("0.0") + "%"); //+ Math.Abs(bytes) + " bytes"); + dt = DateTime.Now; + } } + catch { } + log.Debug(file + " " + bytes); + int len = dataStream.Read(buf1, 0, buf1.Length); + if (len == 0) + break; + bytes -= len; + fs.Write(buf1, 0, len); } - catch { } - log.Debug(file + " " + bytes); - int len = dataStream.Read(buf1, 0, buf1.Length); - if (len == 0) - break; - bytes -= len; - fs.Write(buf1, 0, len); } - fs.Close(); } - - response.Close(); - } catch (Exception ex) { fail = ex; attempt++; continue; } @@ -429,66 +425,69 @@ private static bool updateCheck(ProgressReporterDialogue frmProgressReporter, st // Get the request stream. Stream dataStream; //= request.GetRequestStream(); // Get the response. - WebResponse response = request.GetResponse(); - // Display the status. - log.Info(((HttpWebResponse)response).StatusDescription); - // Get the stream containing content returned by the server. - dataStream = response.GetResponseStream(); - // Open the stream using a StreamReader for easy access. - StreamReader reader = new StreamReader(dataStream); - // Read the content. - string responseFromServer = reader.ReadToEnd(); - // Display the content. - Regex regex = new Regex("href=\"([^\"]+)\"", RegexOptions.IgnoreCase); - - Uri baseuri = new Uri(baseurl, UriKind.Absolute); - - if (regex.IsMatch(responseFromServer)) + using (WebResponse response = request.GetResponse()) { - MatchCollection matchs = regex.Matches(responseFromServer); - for (int i = 0; i < matchs.Count; i++) + // Display the status. + log.Info(((HttpWebResponse)response).StatusDescription); + // Get the stream containing content returned by the server. + using (dataStream = response.GetResponseStream()) { - if (matchs[i].Groups[1].Value.ToString().Contains("..")) - continue; - if (matchs[i].Groups[1].Value.ToString().Contains("http")) - continue; - if (matchs[i].Groups[1].Value.ToString().StartsWith("?")) - continue; - if (matchs[i].Groups[1].Value.ToString().ToLower().Contains(".etag")) - continue; - - // + // Open the stream using a StreamReader for easy access. + using (StreamReader reader = new StreamReader(dataStream)) { - string url = System.Web.HttpUtility.UrlDecode(matchs[i].Groups[1].Value.ToString()); - Uri newuri = new Uri(baseuri, url); - files.Add(baseuri.MakeRelativeUri(newuri).ToString()); - } + // Read the content. + string responseFromServer = reader.ReadToEnd(); + // Display the content. + Regex regex = new Regex("href=\"([^\"]+)\"", RegexOptions.IgnoreCase); + Uri baseuri = new Uri(baseurl, UriKind.Absolute); - // dirs - if (matchs[i].Groups[1].Value.ToString().Contains("tree/master/")) - { - string url = System.Web.HttpUtility.UrlDecode(matchs[i].Groups[1].Value.ToString()) + "/"; - Uri newuri = new Uri(baseuri, url); - files.Add(baseuri.MakeRelativeUri(newuri).ToString()); + if (regex.IsMatch(responseFromServer)) + { + MatchCollection matchs = regex.Matches(responseFromServer); + for (int i = 0; i < matchs.Count; i++) + { + if (matchs[i].Groups[1].Value.ToString().Contains("..")) + continue; + if (matchs[i].Groups[1].Value.ToString().Contains("http")) + continue; + if (matchs[i].Groups[1].Value.ToString().StartsWith("?")) + continue; + if (matchs[i].Groups[1].Value.ToString().ToLower().Contains(".etag")) + continue; + + // + { + string url = System.Web.HttpUtility.UrlDecode(matchs[i].Groups[1].Value.ToString()); + Uri newuri = new Uri(baseuri, url); + files.Add(baseuri.MakeRelativeUri(newuri).ToString()); + } - } - // files - if (matchs[i].Groups[1].Value.ToString().Contains("blob/master/")) - { - string url = System.Web.HttpUtility.UrlDecode(matchs[i].Groups[1].Value.ToString()); - Uri newuri = new Uri(baseuri, url); - files.Add(System.Web.HttpUtility.UrlDecode(newuri.Segments[newuri.Segments.Length - 1])); + + // dirs + if (matchs[i].Groups[1].Value.ToString().Contains("tree/master/")) + { + string url = System.Web.HttpUtility.UrlDecode(matchs[i].Groups[1].Value.ToString()) + "/"; + Uri newuri = new Uri(baseuri, url); + files.Add(baseuri.MakeRelativeUri(newuri).ToString()); + + } + // files + if (matchs[i].Groups[1].Value.ToString().Contains("blob/master/")) + { + string url = System.Web.HttpUtility.UrlDecode(matchs[i].Groups[1].Value.ToString()); + Uri newuri = new Uri(baseuri, url); + files.Add(System.Web.HttpUtility.UrlDecode(newuri.Segments[newuri.Segments.Length - 1])); + } + } + } + + //Console.WriteLine(responseFromServer); + // Clean up the streams. } } } - //Console.WriteLine(responseFromServer); - // Clean up the streams. - reader.Close(); - dataStream.Close(); - response.Close(); - string dir = Path.GetDirectoryName(Application.ExecutablePath) + Path.DirectorySeparatorChar + subdir; if (!Directory.Exists(dir)) Directory.CreateDirectory(dir); @@ -538,119 +537,112 @@ private static bool updateCheck(ProgressReporterDialogue frmProgressReporter, st request.Headers.Add("Accept-Encoding", "gzip,deflate"); // Get the response. - response = request.GetResponse(); - // Display the status. - log.Info(((HttpWebResponse)response).StatusDescription); - // Get the stream containing content returned by the server. - dataStream = response.GetResponseStream(); - // Open the stream using a StreamReader for easy access. - - bool updateThisFile = false; - - if (File.Exists(path)) + using (WebResponse response = request.GetResponse()) { - FileInfo fi = new FileInfo(path); + // Display the status. + log.Info(((HttpWebResponse)response).StatusDescription); + // Get the stream containing content returned by the server. + using (dataStream = response.GetResponseStream()) + { + // Open the stream using a StreamReader for easy access. - //log.Info(response.Headers[HttpResponseHeader.ETag]); - string CurrentEtag = ""; + bool updateThisFile = false; - if (File.Exists(path + ".etag")) - { - using (Stream fs = File.OpenRead(path + ".etag")) + if (File.Exists(path)) { - using (StreamReader sr = new StreamReader(fs)) + FileInfo fi = new FileInfo(path); + + //log.Info(response.Headers[HttpResponseHeader.ETag]); + string CurrentEtag = ""; + + if (File.Exists(path + ".etag")) { - CurrentEtag = sr.ReadLine(); - sr.Close(); + using (Stream fs = File.OpenRead(path + ".etag")) + { + using (StreamReader sr = new StreamReader(fs)) + { + CurrentEtag = sr.ReadLine(); + } + } } - fs.Close(); - } - } - log.Debug("New file Check: " + fi.Length + " vs " + response.ContentLength + " " + response.Headers[HttpResponseHeader.ETag] + " vs " + CurrentEtag); + log.Debug("New file Check: " + fi.Length + " vs " + response.ContentLength + " " + response.Headers[HttpResponseHeader.ETag] + " vs " + CurrentEtag); - if (fi.Length != response.ContentLength || response.Headers[HttpResponseHeader.ETag] != CurrentEtag) - { - using (StreamWriter sw = new StreamWriter(path + ".etag.new")) - { - sw.WriteLine(response.Headers[HttpResponseHeader.ETag]); - sw.Close(); + if (fi.Length != response.ContentLength || response.Headers[HttpResponseHeader.ETag] != CurrentEtag) + { + using (StreamWriter sw = new StreamWriter(path + ".etag.new")) + { + sw.WriteLine(response.Headers[HttpResponseHeader.ETag]); + } + updateThisFile = true; + log.Info("NEW FILE " + file); + } } - updateThisFile = true; - log.Info("NEW FILE " + file); - } - } - else - { - updateThisFile = true; - log.Info("NEW FILE " + file); - using (StreamWriter sw = new StreamWriter(path + ".etag.new")) - { - sw.WriteLine(response.Headers[HttpResponseHeader.ETag]); - sw.Close(); - } - // get it - } - - if (updateThisFile) - { - if (!update) - { - //DialogResult dr = MessageBox.Show("Update Found\n\nDo you wish to update now?", "Update Now", MessageBoxButtons.YesNo); - //if (dr == DialogResult.Yes) + else { - update = true; + updateThisFile = true; + log.Info("NEW FILE " + file); + using (StreamWriter sw = new StreamWriter(path + ".etag.new")) + { + sw.WriteLine(response.Headers[HttpResponseHeader.ETag]); + } + // get it } - //else + + if (updateThisFile) { - // return; - } - } - if (frmProgressReporter != null) - frmProgressReporter.UpdateProgressAndStatus(-1, "Getting " + file); + if (!update) + { + //DialogResult dr = MessageBox.Show("Update Found\n\nDo you wish to update now?", "Update Now", MessageBoxButtons.YesNo); + //if (dr == DialogResult.Yes) + { + update = true; + } + //else + { + // return; + } + } + if (frmProgressReporter != null) + frmProgressReporter.UpdateProgressAndStatus(-1, "Getting " + file); - // from head - long bytes = response.ContentLength; + // from head + long bytes = response.ContentLength; - long contlen = bytes; + long contlen = bytes; - byte[] buf1 = new byte[4096]; + byte[] buf1 = new byte[4096]; - using (FileStream fs = new FileStream(path + ".new", FileMode.Create)) - { + using (FileStream fs = new FileStream(path + ".new", FileMode.Create)) + { - DateTime dt = DateTime.Now; + DateTime dt = DateTime.Now; - //dataStream.ReadTimeout = 30000; + //dataStream.ReadTimeout = 30000; - while (dataStream.CanRead) - { - try - { - if (dt.Second != DateTime.Now.Second) + while (dataStream.CanRead) { - if (frmProgressReporter != null) - frmProgressReporter.UpdateProgressAndStatus((int)(((double)(contlen - bytes) / (double)contlen) * 100), "Getting " + file + ": " + (((double)(contlen - bytes) / (double)contlen) * 100).ToString("0.0") + "%"); //+ Math.Abs(bytes) + " bytes"); - dt = DateTime.Now; + try + { + if (dt.Second != DateTime.Now.Second) + { + if (frmProgressReporter != null) + frmProgressReporter.UpdateProgressAndStatus((int)(((double)(contlen - bytes) / (double)contlen) * 100), "Getting " + file + ": " + (((double)(contlen - bytes) / (double)contlen) * 100).ToString("0.0") + "%"); //+ Math.Abs(bytes) + " bytes"); + dt = DateTime.Now; + } + } + catch { } + log.Debug(file + " " + bytes); + int len = dataStream.Read(buf1, 0, buf1.Length); + if (len == 0) + break; + bytes -= len; + fs.Write(buf1, 0, len); } } - catch { } - log.Debug(file + " " + bytes); - int len = dataStream.Read(buf1, 0, buf1.Length); - if (len == 0) - break; - bytes -= len; - fs.Write(buf1, 0, len); } - fs.Close(); } } - - - reader.Close(); - //dataStream.Close(); - response.Close(); - } catch (Exception ex) { fail = ex; attempt++; update = false; continue; } diff --git a/Utilities/httpserver.cs b/Utilities/httpserver.cs index 50f9d6f226..8c2a6719bd 100644 --- a/Utilities/httpserver.cs +++ b/Utilities/httpserver.cs @@ -438,18 +438,17 @@ public void DoAcceptTcpClientCallback(IAsyncResult ar) byte[] temp = asciiEncoding.GetBytes(header); stream.Write(temp, 0, temp.Length); - BinaryReader file = new BinaryReader(memstream); - byte[] buffer = new byte[1024]; - while (file.BaseStream.Position < file.BaseStream.Length) + using (BinaryReader file = new BinaryReader(memstream)) { + byte[] buffer = new byte[1024]; + while (file.BaseStream.Position < file.BaseStream.Length) + { - int leng = file.Read(buffer, 0, buffer.Length); + int leng = file.Read(buffer, 0, buffer.Length); - stream.Write(buffer, 0, leng); + stream.Write(buffer, 0, leng); + } } - file.Close(); - resi.Dispose(); - orig.Dispose(); } goto again; @@ -667,8 +666,6 @@ public void DoAcceptTcpClientCallback(IAsyncResult ar) "; temp = asciiEncoding.GetBytes(content); stream.Write(temp, 0, temp.Length); - - stream.Close(); } stream.Close(); @@ -676,11 +673,6 @@ public void DoAcceptTcpClientCallback(IAsyncResult ar) catch (Exception ee) { log.Error("Failed http ", ee); - try - { - client.Close(); - } - catch { } } } } diff --git a/Wizard/3ConnectAP.Designer.cs b/Wizard/3ConnectAP.Designer.cs index 9bf6393506..963c2c7b4b 100644 --- a/Wizard/3ConnectAP.Designer.cs +++ b/Wizard/3ConnectAP.Designer.cs @@ -33,7 +33,7 @@ private void InitializeComponent() this.pictureBox1 = new System.Windows.Forms.PictureBox(); this.label2 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label(); - this.radialGradientBG1 = new Controls.GradientBG(); + this.radialGradientBG1 = new MissionPlanner.Controls.GradientBG(); this.panel4 = new System.Windows.Forms.Panel(); this.CMB_port = new System.Windows.Forms.ComboBox(); this.label7 = new System.Windows.Forms.Label(); @@ -143,7 +143,7 @@ private void InitializeComponent() this.CMB_port.FormattingEnabled = true; this.CMB_port.Location = new System.Drawing.Point(338, 44); this.CMB_port.Name = "CMB_port"; - this.CMB_port.Size = new System.Drawing.Size(153, 21); + this.CMB_port.Size = new System.Drawing.Size(163, 21); this.CMB_port.TabIndex = 4; this.CMB_port.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.CMB_port_DrawItem); this.CMB_port.Click += new System.EventHandler(this.CMB_port_Click); @@ -159,7 +159,7 @@ private void InitializeComponent() this.label7.Size = new System.Drawing.Size(327, 123); this.label7.TabIndex = 3; this.label7.Text = "Please select your comport from the list.\r\n\r\nThe correct comport will apear as \"A" + - "rduino Mega 2560\"\r\n\r\n"; + "rduino Mega 2560\" or \"PX4 FMU\"\r\n\r\n"; // // label8 // @@ -170,6 +170,7 @@ private void InitializeComponent() this.label8.Size = new System.Drawing.Size(198, 22); this.label8.TabIndex = 1; this.label8.Text = "SELECT COM PORT"; + this.label8.Click += new System.EventHandler(this.label8_Click); // // _3ConnectAP // diff --git a/Wizard/3ConnectAP.cs b/Wizard/3ConnectAP.cs index 080da2a580..4c57306828 100644 --- a/Wizard/3ConnectAP.cs +++ b/Wizard/3ConnectAP.cs @@ -19,6 +19,7 @@ public partial class _3ConnectAP : MyUserControl, IWizard, IActivate List> fwmap = new List>(); ProgressReporterDialogue pdr; string comport = ""; + private bool usebeta; public _3ConnectAP() { @@ -97,7 +98,7 @@ public int WizardValidate() pdr.RunBackgroundOperationAsync(); - if (pdr.doWorkArgs.CancelRequested || pdr.doWorkArgs.ErrorMessage != "") + if (pdr.doWorkArgs.CancelRequested || !string.IsNullOrEmpty(pdr.doWorkArgs.ErrorMessage)) return 0; if (!MainV2.comPort.BaseStream.IsOpen) @@ -131,7 +132,11 @@ void pdr_DoWork(object sender, Controls.ProgressWorkerEventArgs e, object passda Utilities.Firmware fw = new Utilities.Firmware(); fw.Progress += fw_Progress; - List swlist = fw.getFWList(); + string firmwareurl = ""; + if (usebeta) + firmwareurl = "https://raw.github.com/diydrones/binary/master/dev/firmware2.xml"; + + List swlist = fw.getFWList(firmwareurl); if (swlist.Count == 0) { @@ -167,7 +172,8 @@ void pdr_DoWork(object sender, Controls.ProgressWorkerEventArgs e, object passda { try { - fwdone = fw.update(comport, sw); + //fwdone = fw.update(comport, sw); + fwdone = true; } catch { } if (fwdone == false) @@ -241,9 +247,21 @@ private void CMB_port_Click(object sender, EventArgs e) private void pictureBox1_Click(object sender, EventArgs e) { + if (MainV2.comPort.BaseStream.IsOpen) + MainV2.comPort.BaseStream.Close(); + + MainV2.comPort.BaseStream.PortName = CMB_port.Text; + MainV2.comPort.BaseStream.BaudRate = 115200; + if (!MainV2.comPort.BaseStream.IsOpen) MainV2.comPort.Open(true); Wizard.instance.GoNext(1); } + + private void label8_Click(object sender, EventArgs e) + { + usebeta = true; + CustomMessageBox.Show("Using beta FW"); + } } } diff --git a/Wizard/3ConnectAP.resx b/Wizard/3ConnectAP.resx index 5ea0895e32..29dcb1b3a3 100644 --- a/Wizard/3ConnectAP.resx +++ b/Wizard/3ConnectAP.resx @@ -112,9 +112,9 @@ 2.0 - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 \ No newline at end of file diff --git a/Wizard/6CompassCalib.Designer.cs b/Wizard/6CompassCalib.Designer.cs index bcee3f748d..1d5b4809b0 100644 --- a/Wizard/6CompassCalib.Designer.cs +++ b/Wizard/6CompassCalib.Designer.cs @@ -32,21 +32,21 @@ private void InitializeComponent() this.components = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(_6CompassCalib)); this.panel1 = new System.Windows.Forms.Panel(); - this.BUT_MagCalibrationLive = new Controls.MyButton(); + this.BUT_MagCalibrationLive = new MissionPlanner.Controls.MyButton(); this.linkLabel1 = new System.Windows.Forms.LinkLabel(); this.label2 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label(); - this.radialGradientBG1 = new Controls.GradientBG(); + this.radialGradientBG1 = new MissionPlanner.Controls.GradientBG(); this.panel2 = new System.Windows.Forms.Panel(); + this.label6 = new System.Windows.Forms.Label(); this.label5 = new System.Windows.Forms.Label(); - this.BUT_compassorient = new Controls.MyButton(); - this.pictureBoxMouseOver3 = new Controls.PictureBoxMouseOver(); - this.pictureBoxMouseOver2 = new Controls.PictureBoxMouseOver(); - this.pictureBoxMouseOver1 = new Controls.PictureBoxMouseOver(); + this.BUT_compassorient = new MissionPlanner.Controls.MyButton(); + this.pictureBoxMouseOver3 = new MissionPlanner.Controls.PictureBoxMouseOver(); + this.pictureBoxMouseOver2 = new MissionPlanner.Controls.PictureBoxMouseOver(); + this.pictureBoxMouseOver1 = new MissionPlanner.Controls.PictureBoxMouseOver(); this.label3 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label(); this.timer1 = new System.Windows.Forms.Timer(this.components); - this.label6 = new System.Windows.Forms.Label(); this.panel1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.radialGradientBG1.Image)).BeginInit(); this.panel2.SuspendLayout(); @@ -70,16 +70,12 @@ private void InitializeComponent() // // BUT_MagCalibrationLive // - this.BUT_MagCalibrationLive.BGGradBot = System.Drawing.Color.FromArgb(((int)(((byte)(205)))), ((int)(((byte)(226)))), ((int)(((byte)(150))))); - this.BUT_MagCalibrationLive.BGGradTop = System.Drawing.Color.FromArgb(((int)(((byte)(148)))), ((int)(((byte)(193)))), ((int)(((byte)(31))))); this.BUT_MagCalibrationLive.ImeMode = System.Windows.Forms.ImeMode.NoControl; this.BUT_MagCalibrationLive.Location = new System.Drawing.Point(115, 106); this.BUT_MagCalibrationLive.Name = "BUT_MagCalibrationLive"; - this.BUT_MagCalibrationLive.Outline = System.Drawing.Color.FromArgb(((int)(((byte)(121)))), ((int)(((byte)(148)))), ((int)(((byte)(41))))); this.BUT_MagCalibrationLive.Size = new System.Drawing.Size(66, 27); this.BUT_MagCalibrationLive.TabIndex = 86; this.BUT_MagCalibrationLive.Text = "Live Calibration"; - this.BUT_MagCalibrationLive.TextColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(87)))), ((int)(((byte)(4))))); this.BUT_MagCalibrationLive.UseVisualStyleBackColor = true; this.BUT_MagCalibrationLive.Click += new System.EventHandler(this.BUT_MagCalibration_Click); // @@ -165,6 +161,16 @@ private void InitializeComponent() this.panel2.Name = "panel2"; this.panel2.Size = new System.Drawing.Size(740, 219); this.panel2.TabIndex = 5; + this.panel2.Visible = false; + // + // label6 + // + this.label6.AutoSize = true; + this.label6.Location = new System.Drawing.Point(210, 170); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(10, 13); + this.label6.TabIndex = 9; + this.label6.Text = "."; // // label5 // @@ -177,15 +183,11 @@ private void InitializeComponent() // // BUT_compassorient // - this.BUT_compassorient.BGGradBot = System.Drawing.Color.FromArgb(((int)(((byte)(205)))), ((int)(((byte)(226)))), ((int)(((byte)(150))))); - this.BUT_compassorient.BGGradTop = System.Drawing.Color.FromArgb(((int)(((byte)(148)))), ((int)(((byte)(193)))), ((int)(((byte)(31))))); this.BUT_compassorient.Location = new System.Drawing.Point(115, 138); this.BUT_compassorient.Name = "BUT_compassorient"; - this.BUT_compassorient.Outline = System.Drawing.Color.FromArgb(((int)(((byte)(121)))), ((int)(((byte)(148)))), ((int)(((byte)(41))))); this.BUT_compassorient.Size = new System.Drawing.Size(75, 23); this.BUT_compassorient.TabIndex = 7; this.BUT_compassorient.Text = "Start"; - this.BUT_compassorient.TextColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(87)))), ((int)(((byte)(4))))); this.BUT_compassorient.UseVisualStyleBackColor = true; this.BUT_compassorient.Click += new System.EventHandler(this.BUT_compassorient_Click); // @@ -259,15 +261,6 @@ private void InitializeComponent() // this.timer1.Tick += new System.EventHandler(this.timer1_Tick); // - // label6 - // - this.label6.AutoSize = true; - this.label6.Location = new System.Drawing.Point(210, 170); - this.label6.Name = "label6"; - this.label6.Size = new System.Drawing.Size(10, 13); - this.label6.TabIndex = 9; - this.label6.Text = "."; - // // _6CompassCalib // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; diff --git a/Wizard/6CompassCalib.resx b/Wizard/6CompassCalib.resx index 9549e622a9..d2a09089f0 100644 --- a/Wizard/6CompassCalib.resx +++ b/Wizard/6CompassCalib.resx @@ -112,15 +112,15 @@ 2.0 - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Compass calibration is important, so your autopilot knows which direction it is pointing. Point every axis north (left,right,front,back,top,bottom) and rotate a full 360 around the left-right axis, for all 6 axis's - + 17, 17 \ No newline at end of file diff --git a/georefimage.cs b/georefimage.cs index 0d772dea0d..db09d63abb 100644 --- a/georefimage.cs +++ b/georefimage.cs @@ -480,10 +480,6 @@ public void dowork(string logFile, string dirWithImages, float offsetseconds, bo if (dooffset) { - swlockml.Close(); - swloctel.Close(); - swloctxt.Close(); - swlogloccsv.Close(); return; } @@ -518,9 +514,9 @@ public void dowork(string logFile, string dirWithImages, float offsetseconds, bo matchs++; - // int fixme; - // if (matchs < 150 || matchs > 170) - // break; ; + // int fixme; + // if (matchs < 150 || matchs > 170) + // break; ; SharpKml.Dom.Timestamp tstamp = new SharpKml.Dom.Timestamp(); @@ -623,24 +619,17 @@ public void dowork(string logFile, string dirWithImages, float offsetseconds, bo //Console.WriteLine(crap); } } - - - } - - + } Serializer serializer = new Serializer(); serializer.Serialize(kml); swlockml.Write(serializer.Xml); - swlockml.Close(); Utilities.httpserver.georefkml = serializer.Xml; Utilities.httpserver.georefimagepath = dirWithImages + Path.DirectorySeparatorChar; writeGPX(dirWithImages + Path.DirectorySeparatorChar + "location.gpx"); - swlogloccsv.Close(); - // flightmission GenFlightMission(swloctrim); @@ -648,9 +637,6 @@ public void dowork(string logFile, string dirWithImages, float offsetseconds, bo swloctrim.WriteEndElement(); // job swloctrim.WriteEndDocument(); - swloctxt.Close(); - swloctel.Close(); - TXT_outputlog.AppendText("Done " + matchs + " matchs"); } @@ -921,7 +907,6 @@ private void writeGPX(string filename) xw.WriteEndElement(); xw.WriteEndElement(); - xw.Close(); } } @@ -1300,7 +1285,6 @@ private void BUT_browsedir_Click(object sender, EventArgs e) { TXT_offsetseconds.Text = match.Groups[1].Value; } - sr.Close(); } } catch { }