Skip to content

Commit

Permalink
Added a scan for AOG and a delay for it to warm up
Browse files Browse the repository at this point in the history
  • Loading branch information
lansalot committed Dec 8, 2023
1 parent 3e91b56 commit f726ba3
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion Tracker/Tracker/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ internal class Program
private static bool interactive = true;
private static string TrackerID = "";
private static string trackerURL = "";
private static int sendInterval = 5; // should be 300 or so usually
private static int sendInterval = 300;
private static string iniFile = "";

private static string taskXML = @"<?xml version='1.0' encoding='UTF-16'?>
Expand Down Expand Up @@ -269,6 +269,23 @@ static void Main(string[] Args)
}
if (!interactive) ShowWindow(handle, SW_HIDE);
Console.WriteLine("Waiting for data from AOG and time interval " + sendInterval + " to elapse");
while (true)
{
Process[] pname = Process.GetProcessesByName("agopengps");

if (pname.Length == 0)
{
Console.WriteLine("Waiting for AOG to start");
System.Threading.Thread.Sleep(5000);
}
else
{
break;
}
}
Console.WriteLine("Found AgIO, waiting a few seconds for it to warm up");
System.Threading.Thread.Sleep(10000);

Program program = new Program();
//program.udpAGIO = new UdpClient(new IPEndPoint(IPAddress.Any, 15555));
program.udpAGIO = new UdpClient();
Expand Down

0 comments on commit f726ba3

Please sign in to comment.