Skip to content

Commit

Permalink
FlightData: add right click start camera option ArduPilot#1180
Browse files Browse the repository at this point in the history
  • Loading branch information
meee1 committed Mar 10, 2016
1 parent 4234d13 commit 5fd8250
Show file tree
Hide file tree
Showing 3 changed files with 130 additions and 68 deletions.
85 changes: 51 additions & 34 deletions GCSViews/FlightData.Designer.cs

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

21 changes: 21 additions & 0 deletions GCSViews/FlightData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
using System.Text;
using System.Threading;
using System.Windows.Forms;
using DirectShowLib;
using GMap.NET;
using GMap.NET.MapProviders;
using GMap.NET.WindowsForms;
Expand All @@ -21,6 +22,7 @@
using MissionPlanner.Utilities;
using MissionPlanner.Warnings;
using OpenTK;
using WebCamService;
using ZedGraph;
using LogAnalyzer = MissionPlanner.Utilities.LogAnalyzer;

Expand Down Expand Up @@ -3939,5 +3941,24 @@ private void but_disablejoystick_Click(object sender, EventArgs e)
but_disablejoystick.Visible = false;
}
}

private void startCameraToolStripMenuItem_Click(object sender, EventArgs e)
{
if (MainV2.MONO)
return;

try
{
MainV2.cam = new Capture(Settings.Instance.GetInt32("video_device"), new AMMediaType());

MainV2.cam.Start();

MainV2.cam.camimage += new CamImage(cam_camimage);
}
catch (Exception ex)
{
CustomMessageBox.Show("Camera Fail: " + ex.ToString(), Strings.ERROR);
}
}
}
}
Loading

0 comments on commit 5fd8250

Please sign in to comment.