Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow redirect stdout #3

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "libs/m0lte"]
path = libs/m0lte
url = git@github.com:M0LTE/WsjtxUdpLib.git
url = https://github.com/M0LTE/WsjtxUdpLib.git
22 changes: 16 additions & 6 deletions SOTAmatSkimmer/SOTAmatClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,23 @@ public void ParseAndExecuteMessage(Configuration config, int snr, double deltaTi

// Update the average DeltaTime we are seeing from these reception reports
UpdateAvergaeDeltaTime(deltaTime);
if (Math.Abs(deltaTimeAverage) > 0.5)
Console.ForegroundColor = ConsoleColor.Red;

// print just the delta time in front of the debug data if debug is enabled
if (config.Debug)
{
Console.Write($"{deltaTimeAverage:+0.00;-0.00} ");
Console.Out.Flush();
}
else
Console.ForegroundColor = ConsoleColor.Green;
Console.Write($" Average DeltaTime: {deltaTimeAverage.ToString("+0.00;-0.00")} ");
Console.SetCursorPosition(0, Console.CursorTop);
Console.ResetColor();
{
if (Math.Abs(deltaTimeAverage) > 0.5)
Console.ForegroundColor = ConsoleColor.Red;
else
Console.ForegroundColor = ConsoleColor.Green;
Console.Write($" Average DeltaTime: {deltaTimeAverage:+0.00;-0.00} ");
Console.SetCursorPosition(0, Console.CursorTop);
Console.ResetColor();
}

// If the statusMsg is a potential SOTAmat statusMsg, send it to the SOTAmat server
string pattern = @"^(S(T(M(T)?)?|OTAM(T|AT)?)?M?)\s([0-9A-Z]{1,2}[0-9][0-9A-Z]{1,3})(/[0-9A-Z]{1,4})+$";
Expand Down