APM Planner 1.1.84

3dr radio fix's + rfd900
other misc fixs
This commit is contained in:
Michael Oborne 2012-05-11 17:07:52 +08:00
parent fe742f1c23
commit f43f0bc102
20 changed files with 134 additions and 131 deletions

View File

@ -36,7 +36,7 @@
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG</DefineConstants>
<DefineConstants>TRACE;DEBUG</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
@ -45,8 +45,7 @@
<DebugType>none</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>
</DefineConstants>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
@ -198,6 +197,9 @@
</ItemGroup>
<ItemGroup>
<Content Include="3dr.ico" />
<Content Include="ChangeLog.txt">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<None Include="Resources\3dr3.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

View File

@ -0,0 +1,4 @@
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

View File

@ -1519,7 +1519,7 @@
</value>
</data>
<data name="$this.Text" xml:space="preserve">
<value>3DRRadio Config 0.2</value>
<value>3DRRadio Config 0.4</value>
</data>
<data name="&gt;&gt;$this.Name" xml:space="preserve">
<value>Config</value>

View File

@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.2.*")]
[assembly: AssemblyFileVersion("0.2.0.0")]
[assembly: AssemblyVersion("0.4.*")]
[assembly: AssemblyFileVersion("0.4.0.0")]

View File

@ -80,7 +80,7 @@
<ManifestKeyFile>ArdupilotMega_TemporaryKey.pfx</ManifestKeyFile>
</PropertyGroup>
<PropertyGroup>
<GenerateManifests>false</GenerateManifests>
<GenerateManifests>true</GenerateManifests>
</PropertyGroup>
<PropertyGroup>
<SignManifests>false</SignManifests>
@ -516,12 +516,6 @@
<Compile Include="MainV2.Designer.cs">
<DependentUpon>MainV2.cs</DependentUpon>
</Compile>
<Compile Include="GCSViews\Configuration.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="GCSViews\Configuration.Designer.cs">
<DependentUpon>Configuration.cs</DependentUpon>
</Compile>
<Compile Include="GCSViews\Firmware.cs">
<SubType>UserControl</SubType>
</Compile>
@ -811,9 +805,6 @@
<EmbeddedResource Include="Controls\ImageLabel.resx">
<DependentUpon>ImageLabel.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="GCSViews\Configuration.es-ES.resx">
<DependentUpon>Configuration.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="GCSViews\Firmware.es-ES.resx">
<DependentUpon>Firmware.cs</DependentUpon>
</EmbeddedResource>
@ -859,18 +850,6 @@
<EmbeddedResource Include="SerialInput.resx">
<DependentUpon>SerialInput.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="GCSViews\Configuration.fr.resx">
<DependentUpon>Configuration.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="GCSViews\Configuration.it-IT.resx">
<DependentUpon>Configuration.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="GCSViews\Configuration.pl.resx">
<DependentUpon>Configuration.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="GCSViews\Configuration.zh-TW.resx">
<DependentUpon>Configuration.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="GCSViews\Firmware.fr.resx">
<DependentUpon>Firmware.cs</DependentUpon>
</EmbeddedResource>
@ -1003,9 +982,6 @@
<EmbeddedResource Include="ResEdit.resx">
<DependentUpon>ResEdit.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="GCSViews\Configuration.ru-RU.resx">
<DependentUpon>Configuration.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="GCSViews\Firmware.ru-RU.resx">
<DependentUpon>Firmware.cs</DependentUpon>
</EmbeddedResource>
@ -1044,14 +1020,6 @@
<DependentUpon>MavlinkLog.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="GCSViews\Configuration.resx">
<DependentUpon>Configuration.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="GCSViews\Configuration.zh-Hans.resx">
<DependentUpon>Configuration.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="GCSViews\Firmware.zh-Hans.resx">
<DependentUpon>Firmware.cs</DependentUpon>
<SubType>Designer</SubType>

View File

@ -16,7 +16,7 @@ namespace ArdupilotMega.Controls
public partial class ConfigPanel : BackStageViewContentPanel
{
/// <summary>
/// store tempory pending changes
/// store temp pending changes
/// </summary>
Hashtable _changed = new Hashtable();
// store linked param options

View File

@ -79,14 +79,7 @@ namespace ArdupilotMega.GCSViews.ConfigurationView
void readToolTips()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Configuration));
string data = resources.GetString("MAVParam");
if (data == null)
{
data = global::ArdupilotMega.Properties.Resources.MAVParam;
}
string data = global::ArdupilotMega.Properties.Resources.MAVParam;
string[] tips = data.Split(new char[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries);

View File

@ -68,14 +68,8 @@ namespace ArdupilotMega.GCSViews.ConfigurationView
void readToolTips()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Configuration));
string data = resources.GetString("MAVParam");
if (data == null)
{
data = global::ArdupilotMega.Properties.Resources.MAVParam;
}
string data = global::ArdupilotMega.Properties.Resources.MAVParam;
string[] tips = data.Split(new char[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries);

View File

@ -21,6 +21,29 @@ namespace ArdupilotMega.GCSViews.ConfigurationView
private bool startup = false;
List<CultureInfo> languages = new List<CultureInfo>();
public class GCSBitmapInfo
{
public int Width { get; set; }
public int Height { get; set; }
public long Fps { get; set; }
public string Standard { get; set; }
public AMMediaType Media { get; set; }
public GCSBitmapInfo(int width, int height, long fps, string standard, AMMediaType media)
{
Width = width;
Height = height;
Fps = fps;
Standard = standard;
Media = media;
}
public override string ToString()
{
return Width.ToString() + " x " + Height.ToString() + String.Format(" {0:0.00} fps ", 10000000.0 / Fps) + Standard;
}
}
public ConfigPlanner()
{
InitializeComponent();
@ -32,14 +55,12 @@ namespace ArdupilotMega.GCSViews.ConfigurationView
// stop first
BUT_videostop_Click(sender, e);
var bmp = (GCSViews.Configuration.GCSBitmapInfo)CMB_videoresolutions.SelectedItem;
var bmp = (GCSBitmapInfo)CMB_videoresolutions.SelectedItem;
try
{
MainV2.cam = new WebCamService.Capture(CMB_videosources.SelectedIndex, bmp.Media);
MainV2.cam.showhud = CHK_hudshow.Checked;
MainV2.cam.Start();
MainV2.config["video_options"] = CMB_videoresolutions.SelectedIndex;
@ -83,7 +104,7 @@ namespace ArdupilotMega.GCSViews.ConfigurationView
AMMediaType media = null;
VideoInfoHeader v;
VideoStreamConfigCaps c;
List<GCSViews.Configuration.GCSBitmapInfo> modes = new List<GCSViews.Configuration.GCSBitmapInfo>();
List<GCSBitmapInfo> modes = new List<GCSBitmapInfo>();
// Get the ICaptureGraphBuilder2
capGraph = (ICaptureGraphBuilder2)new CaptureGraphBuilder2();
@ -124,7 +145,7 @@ namespace ArdupilotMega.GCSViews.ConfigurationView
hr = videoStreamConfig.GetStreamCaps(i, out media, TaskMemPointer);
v = (VideoInfoHeader)Marshal.PtrToStructure(media.formatPtr, typeof(VideoInfoHeader));
c = (VideoStreamConfigCaps)Marshal.PtrToStructure(TaskMemPointer, typeof(VideoStreamConfigCaps));
modes.Add(new GCSViews.Configuration.GCSBitmapInfo(v.BmiHeader.Width, v.BmiHeader.Height, c.MaxFrameInterval, c.VideoStandard.ToString(), media));
modes.Add(new GCSBitmapInfo(v.BmiHeader.Width, v.BmiHeader.Height, c.MaxFrameInterval, c.VideoStandard.ToString(), media));
}
Marshal.FreeCoTaskMem(TaskMemPointer);
DsUtils.FreeAMMediaType(media);

View File

@ -1268,7 +1268,7 @@
<value>BUT_Joystick</value>
</data>
<data name="&gt;&gt;BUT_Joystick.Type" xml:space="preserve">
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner, Version=1.1.4498.31567, Culture=neutral, PublicKeyToken=null</value>
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner, Version=1.1.4513.13745, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;BUT_Joystick.Parent" xml:space="preserve">
<value>$this</value>
@ -1295,7 +1295,7 @@
<value>BUT_videostop</value>
</data>
<data name="&gt;&gt;BUT_videostop.Type" xml:space="preserve">
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner, Version=1.1.4498.31567, Culture=neutral, PublicKeyToken=null</value>
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner, Version=1.1.4513.13745, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;BUT_videostop.Parent" xml:space="preserve">
<value>$this</value>
@ -1322,7 +1322,7 @@
<value>BUT_videostart</value>
</data>
<data name="&gt;&gt;BUT_videostart.Type" xml:space="preserve">
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner, Version=1.1.4498.31567, Culture=neutral, PublicKeyToken=null</value>
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner, Version=1.1.4513.13745, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;BUT_videostart.Parent" xml:space="preserve">
<value>$this</value>
@ -1397,6 +1397,6 @@
<value>ConfigPlanner</value>
</data>
<data name="&gt;&gt;$this.Type" xml:space="preserve">
<value>ArdupilotMega.Controls.BackstageView.BackStageViewContentPanel, ArdupilotMegaPlanner, Version=1.1.4498.31567, Culture=neutral, PublicKeyToken=null</value>
<value>ArdupilotMega.Controls.BackstageView.BackStageViewContentPanel, ArdupilotMegaPlanner, Version=1.1.4513.13745, Culture=neutral, PublicKeyToken=null</value>
</data>
</root>

View File

@ -310,14 +310,7 @@ namespace ArdupilotMega.GCSViews.ConfigurationView
void readToolTips()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Configuration));
string data = resources.GetString("MAVParam");
if (data == null)
{
data = global::ArdupilotMega.Properties.Resources.MAVParam;
}
string data = global::ArdupilotMega.Properties.Resources.MAVParam;
string[] tips = data.Split(new char[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries);

View File

@ -985,8 +985,8 @@ namespace ArdupilotMega.GCSViews
catch { }
}
}
private void FlightData_ParentChanged(object sender, EventArgs e)
private void FlightData_ParentChanged(object sender, EventArgs e)
{
if (MainV2.cam != null)
{

View File

@ -31,8 +31,6 @@ namespace ArdupilotMega
Application.Idle += Application_Idle;
//CodeGen.runCode("Sin(0.55)");
int wt = 0, ct = 0;
ThreadPool.GetMaxThreads(out wt, out ct);
log.Info("Max Threads: " + wt);

View File

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

View File

@ -13,6 +13,7 @@ using ArdupilotMega.Arduino;
using ArdupilotMega.Comms;
using log4net;
using System.Reflection;
using System.Text.RegularExpressions;
namespace ArdupilotMega
{
@ -22,7 +23,7 @@ namespace ArdupilotMega
public delegate void ProgressEventHandler(double completed);
string firmwarefile = Path.GetDirectoryName(Application.ExecutablePath) + Path.DirectorySeparatorChar + "radio.hm_trp.hex";
string firmwarefile = Path.GetDirectoryName(Application.ExecutablePath) + Path.DirectorySeparatorChar + "radio.hex";
private static readonly ILog log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
@ -34,12 +35,23 @@ namespace ArdupilotMega
RS3.DataSource = S3.DataSource;
}
bool getFirmware()
bool getFirmware(uploader.Uploader.Code 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
return Common.getFilefromNet("http://www.samba.org/tridge/UAV/3DR/radio.hm_trp.hex", firmwarefile);
if (device == uploader.Uploader.Code.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)
{
return Common.getFilefromNet("http://www.samba.org/tridge/UAV/3DR/radio.rfd900.hex", firmwarefile);
}
else
{
return false;
}
}
void Sleep(int mstimeout)
@ -71,8 +83,7 @@ namespace ArdupilotMega
bool bootloadermode = false;
// attempt bootloader mode
try
{
uploader_ProgressEvent(0);
@ -88,6 +99,7 @@ namespace ArdupilotMega
}
catch
{
// cleanup bootloader mode fail, and try firmware mode
comPort.Close();
comPort.BaudRate = MainV2.comPort.BaseStream.BaudRate;
comPort.Open();
@ -99,46 +111,59 @@ namespace ArdupilotMega
bootloadermode = false;
}
// check for either already bootloadermode, or if we can do a ATI to ID the firmware
if (bootloadermode || doConnect(comPort))
{
if (getFirmware())
uploader.IHex iHex = new uploader.IHex();
iHex.LogEvent += new LogEventHandler(iHex_LogEvent);
iHex.ProgressEvent += new ProgressEventHandler(iHex_ProgressEvent);
// put into bootloader mode/udpate mode
if (!bootloadermode)
{
uploader.IHex iHex = new uploader.IHex();
try
{
comPort.Write("AT&UPDATE\r\n");
string left = comPort.ReadExisting();
log.Info(left);
Sleep(700);
comPort.BaudRate = 115200;
}
catch { }
}
iHex.LogEvent += new LogEventHandler(iHex_LogEvent);
global::uploader.Uploader.Code device = global::uploader.Uploader.Code.FAILED;
global::uploader.Uploader.Code freq = global::uploader.Uploader.Code.FAILED;
iHex.ProgressEvent += new ProgressEventHandler(iHex_ProgressEvent);
// get the device type and frequency in the bootloader
uploader.getDevice(ref device, ref freq);
// get firmware for this device
if (getFirmware(device))
{
// load the hex
try
{
iHex.load(firmwarefile);
}
catch { CustomMessageBox.Show("Bad Firmware File"); goto exit; }
if (!bootloadermode)
{
try
{
comPort.Write("AT&UPDATE\r\n");
string left = comPort.ReadExisting();
log.Info(left);
Sleep(700);
comPort.BaudRate = 115200;
}
catch { }
}
// upload the hex and verify
try
{
uploader.upload(comPort, iHex);
}
catch (Exception ex) { CustomMessageBox.Show("Upload Failed " + ex.Message); }
}
else
{
CustomMessageBox.Show("Failed to download new firmware");
}
}
else
{
@ -148,7 +173,6 @@ namespace ArdupilotMega
exit:
if (comPort.IsOpen)
comPort.Close();
}
void iHex_ProgressEvent(double completed)
@ -406,9 +430,9 @@ namespace ArdupilotMega
lbl_status.Text = "Doing Command ATI & RTI";
ATI.Text = doCommand(comPort, "ATI1").Trim();
ATI.Text = doCommand(comPort, "ATI");
RTI.Text = doCommand(comPort, "RTI1").Trim();
RTI.Text = doCommand(comPort, "RTI");
RSSI.Text = doCommand(comPort, "ATI7").Trim();
@ -613,7 +637,9 @@ namespace ArdupilotMega
log.Info("Connect Version: " + version.Trim() + "\n");
if (version.Contains("SiK") && version.Contains("on")) // should use a regex....
Regex regex = new Regex(@"SiK\s+(.*)\s+on\s+(.*)");
if (regex.IsMatch(version))
{
return true;
}

View File

@ -140,9 +140,6 @@
<data name="&gt;&gt;Progressbar.ZOrder" xml:space="preserve">
<value>68</value>
</data>
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<data name="S1.Items" xml:space="preserve">
<value>115</value>
</data>
@ -179,6 +176,9 @@
<data name="S1.TabIndex" type="System.Int32, mscorlib">
<value>4</value>
</data>
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<data name="S1.ToolTip" xml:space="preserve">
<value>Serial baud rate in rounded kbps. So 57 means 57600.
</value>
@ -561,9 +561,6 @@
<data name="S4.TabIndex" type="System.Int32, mscorlib">
<value>13</value>
</data>
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<data name="S4.ToolTip" xml:space="preserve">
<value>TXPOWER is the transmit power in dBm. 20dBm is 100mW. It is useful to set this to lower levels for short range testing.
</value>
@ -1736,10 +1733,10 @@ which result in a valid packet CRC
<value>39</value>
</data>
<data name="RTI.Location" type="System.Drawing.Point, System.Drawing">
<value>543, 25</value>
<value>531, 25</value>
</data>
<data name="RTI.Size" type="System.Drawing.Size, System.Drawing">
<value>80, 20</value>
<value>102, 20</value>
</data>
<data name="RTI.TabIndex" type="System.Int32, mscorlib">
<value>33</value>
@ -1757,10 +1754,10 @@ which result in a valid packet CRC
<value>37</value>
</data>
<data name="ATI.Location" type="System.Drawing.Point, System.Drawing">
<value>157, 25</value>
<value>145, 25</value>
</data>
<data name="ATI.Size" type="System.Drawing.Size, System.Drawing">
<value>80, 20</value>
<value>102, 20</value>
</data>
<data name="ATI.TabIndex" type="System.Int32, mscorlib">
<value>32</value>
@ -1850,7 +1847,7 @@ which result in a valid packet CRC
<value>BUT_savesettings</value>
</data>
<data name="&gt;&gt;BUT_savesettings.Type" xml:space="preserve">
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner, Version=1.1.4499.32931, Culture=neutral, PublicKeyToken=null</value>
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner, Version=1.1.4512.32829, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;BUT_savesettings.Parent" xml:space="preserve">
<value>$this</value>
@ -1874,7 +1871,7 @@ which result in a valid packet CRC
<value>BUT_getcurrent</value>
</data>
<data name="&gt;&gt;BUT_getcurrent.Type" xml:space="preserve">
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner, Version=1.1.4499.32931, Culture=neutral, PublicKeyToken=null</value>
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner, Version=1.1.4512.32829, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;BUT_getcurrent.Parent" xml:space="preserve">
<value>$this</value>
@ -1919,7 +1916,7 @@ which result in a valid packet CRC
<value>BUT_upload</value>
</data>
<data name="&gt;&gt;BUT_upload.Type" xml:space="preserve">
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner, Version=1.1.4499.32931, Culture=neutral, PublicKeyToken=null</value>
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner, Version=1.1.4512.32829, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;BUT_upload.Parent" xml:space="preserve">
<value>$this</value>
@ -1943,7 +1940,7 @@ which result in a valid packet CRC
<value>BUT_syncS2</value>
</data>
<data name="&gt;&gt;BUT_syncS2.Type" xml:space="preserve">
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner, Version=1.1.4499.32931, Culture=neutral, PublicKeyToken=null</value>
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner, Version=1.1.4512.32829, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;BUT_syncS2.Parent" xml:space="preserve">
<value>$this</value>
@ -1967,7 +1964,7 @@ which result in a valid packet CRC
<value>BUT_syncS3</value>
</data>
<data name="&gt;&gt;BUT_syncS3.Type" xml:space="preserve">
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner, Version=1.1.4499.32931, Culture=neutral, PublicKeyToken=null</value>
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner, Version=1.1.4512.32829, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;BUT_syncS3.Parent" xml:space="preserve">
<value>$this</value>
@ -1991,7 +1988,7 @@ which result in a valid packet CRC
<value>BUT_syncS5</value>
</data>
<data name="&gt;&gt;BUT_syncS5.Type" xml:space="preserve">
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner, Version=1.1.4499.32931, Culture=neutral, PublicKeyToken=null</value>
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner, Version=1.1.4512.32829, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;BUT_syncS5.Parent" xml:space="preserve">
<value>$this</value>
@ -2559,7 +2556,7 @@ which result in a valid packet CRC
<value>BUT_syncS8</value>
</data>
<data name="&gt;&gt;BUT_syncS8.Type" xml:space="preserve">
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner, Version=1.1.4499.32931, Culture=neutral, PublicKeyToken=null</value>
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner, Version=1.1.4512.32829, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;BUT_syncS8.Parent" xml:space="preserve">
<value>$this</value>
@ -2586,7 +2583,7 @@ which result in a valid packet CRC
<value>BUT_syncS9</value>
</data>
<data name="&gt;&gt;BUT_syncS9.Type" xml:space="preserve">
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner, Version=1.1.4499.32931, Culture=neutral, PublicKeyToken=null</value>
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner, Version=1.1.4512.32829, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;BUT_syncS9.Parent" xml:space="preserve">
<value>$this</value>
@ -2613,7 +2610,7 @@ which result in a valid packet CRC
<value>BUT_syncS10</value>
</data>
<data name="&gt;&gt;BUT_syncS10.Type" xml:space="preserve">
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner, Version=1.1.4499.32931, Culture=neutral, PublicKeyToken=null</value>
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner, Version=1.1.4512.32829, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;BUT_syncS10.Parent" xml:space="preserve">
<value>$this</value>
@ -2640,6 +2637,6 @@ which result in a valid packet CRC
<value>_3DRradio</value>
</data>
<data name="&gt;&gt;$this.Type" xml:space="preserve">
<value>ArdupilotMega.Controls.BackstageView.BackStageViewContentPanel, ArdupilotMegaPlanner, Version=1.1.4499.32931, Culture=neutral, PublicKeyToken=null</value>
<value>ArdupilotMega.Controls.BackstageView.BackStageViewContentPanel, ArdupilotMegaPlanner, Version=1.1.4512.32829, Culture=neutral, PublicKeyToken=null</value>
</data>
</root>

View File

@ -64,6 +64,8 @@ namespace uploader
if (Count < 1)
throw new Exception ("no data in IntelHex file");
log (string.Format ("read {0} bytes from {1}\n", loadedSize, fromPath));
sr.Close();
}
private void log (string message, int level = 0)

View File

@ -222,7 +222,10 @@ namespace uploader
{
send (Code.CHIP_ERASE);
send (Code.EOC);
// sleep for 2 second - erase seems to take about 2 seconds
System.Threading.Thread.Sleep(2000);
getSync ();
}
@ -319,14 +322,16 @@ namespace uploader
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))
throw new Exception ("bootloader device ID mismatch");
if ((id != Code.DEVICE_ID_HM_TRP) && (id != Code.DEVICE_ID_RF50) && (id != Code.DEVICE_ID_RFD900))
throw new Exception ("bootloader device ID mismatch - device:" + id.ToString());
getSync ();
}
public void getDevice(ref Code device, ref Code freq)
{
connect_and_sync();
send(Code.GET_DEVICE);
send(Code.EOC);

View File

@ -213,8 +213,6 @@ namespace WebCamService
return list;
}
public bool showhud = true;
void timer1_Tick(object sender, EventArgs e)
{
try
@ -376,6 +374,8 @@ namespace WebCamService
media.majorType = MediaType.Video;
media.subType = MediaSubType.RGB24;
media.formatType = FormatType.VideoInfo;
sampGrabber.SetBufferSamples(false);
sampGrabber.SetOneShot(false);
hr = sampGrabber.SetMediaType( media );
DsError.ThrowExceptionForHR( hr );