Skip to content

Commit

Permalink
fix for heli stable/dev SITL selection ISSUE ArduPilot#2733 rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
EosBandi committed Dec 13, 2021
1 parent 4aefe60 commit 3f8257e
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions GCSViews/SITL.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,10 @@ public partial class SITL : MyUserControl, IActivate
{ "calibration", Calibration::create },
*/

///tmp/.build/ArduCopter.elf -M+ -O-34.98106,117.85201,40,0
///tmp/.build/APMrover2.elf -Mrover -O-34.98106,117.85201,40,0
///tmp/.build/ArduCopter.elf -M+ -O-34.98106,117.85201,40,0
///tmp/.build/APMrover2.elf -Mrover -O-34.98106,117.85201,40,0
///tmp/.build/ArduPlane.elf -Mjsbsim -O-34.98106,117.85201,40,0 --autotest-dir ./
///tmp/.build/ArduCopter.elf -Mheli -O-34.98106,117.85201,40,0
///tmp/.build/ArduCopter.elf -Mheli -O-34.98106,117.85201,40,0
~SITL()
{
try
Expand Down Expand Up @@ -318,7 +318,7 @@ private async Task<string> CheckandGetSITLImage(string filename)
return path;
}
}

if (RuntimeInformation.OSArchitecture == Architecture.Arm ||
RuntimeInformation.OSArchitecture == Architecture.Arm64)
{
Expand Down Expand Up @@ -389,6 +389,8 @@ private async Task<string> CheckandGetSITLImage(string filename)
url = sitlroverstableurl;
if (filename.ToLower().Contains("plane"))
url = sitlplanestableurl;
if (filename.ToLower().Contains("heli"))
url = sitlcopterstableurl;
} else
{
return null;
Expand Down Expand Up @@ -421,7 +423,7 @@ private async Task<string> CheckandGetSITLImage(string filename)
});

await t1;

load.Close();
}

Expand Down Expand Up @@ -824,7 +826,7 @@ public async Task StartSwarmSeperate(Firmwares firmware)
{
exepath = CheckandGetSITLImage("ArduPlane.elf");
model = "plane";
} else
} else
if (firmware == Firmwares.ArduRover)
{
exepath = CheckandGetSITLImage("ArduRover.elf");
Expand All @@ -835,9 +837,9 @@ public async Task StartSwarmSeperate(Firmwares firmware)
exepath = CheckandGetSITLImage("ArduCopter.elf");
model = "+";
}

var config = await GetDefaultConfig(model);

max--;

for (int a = (int)max; a >= 0; a--)
Expand Down Expand Up @@ -945,7 +947,7 @@ public async Task StartSwarmSeperate(Firmwares firmware)
}

public async void StartSwarmChain()
{
{
var max = 10;

if (InputBox.Show("how many?", "how many?", ref max) != DialogResult.OK)
Expand Down

0 comments on commit 3f8257e

Please sign in to comment.