Nice output
This commit is contained in:
parent
d9b3368cb2
commit
e99974e754
@ -20,7 +20,7 @@ public class OSCCollar
|
||||
private uint _nilSent = 0;
|
||||
private DateTime _lastNilMessageSent = DateTime.UnixEpoch;
|
||||
private DateTime _lastConsoleOutput = DateTime.UnixEpoch;
|
||||
private static readonly TimeSpan ConsoleUpdateInterval = TimeSpan.FromMilliseconds(50);
|
||||
private static readonly TimeSpan ConsoleUpdateInterval = TimeSpan.FromMilliseconds(100);
|
||||
private static readonly TimeSpan UpdateFieldsTimeout = TimeSpan.FromMilliseconds(1);
|
||||
private static readonly TimeSpan NilMessageMaxTimeout = TimeSpan.FromMilliseconds(400);
|
||||
|
||||
@ -50,14 +50,29 @@ public class OSCCollar
|
||||
Console.WriteLine($"Stretch:.............{_collarStretch:0.0000}");
|
||||
Console.WriteLine($"Vertical Movement:...{verticalMovement:0.0000}");
|
||||
Console.WriteLine($"Horizontal Movement:.{horizontalMovement:0.0000}");
|
||||
Console.WriteLine("");
|
||||
Console.WriteLine("");
|
||||
Console.WriteLine("");
|
||||
Console.WriteLine("");
|
||||
Console.WriteLine("");
|
||||
Console.WriteLine("");
|
||||
Console.WriteLine("");
|
||||
Console.WriteLine($"Sending /input nil {_nilSent}");
|
||||
Console.SetCursorPosition(0, Console.WindowHeight - 2);
|
||||
Console.Write($"/input nil sent {_nilSent}");
|
||||
|
||||
Console.SetCursorPosition(28, 8);
|
||||
Console.WriteLine("----------+----------");
|
||||
for (int i = 4; i < 13; i++)
|
||||
{
|
||||
if(i == 8)
|
||||
continue;
|
||||
Console.SetCursorPosition(38,i);
|
||||
Console.Write("|");
|
||||
}
|
||||
|
||||
int centerX = 38;
|
||||
int centerY = 8;
|
||||
int consoleX = Convert.ToInt32(Math.Floor(_horizontalMovement * 10));
|
||||
int consoleY = Convert.ToInt32(-Math.Floor(_verticalMovement * 5));
|
||||
double position = (_verticalMovement * 100) % 10;
|
||||
char c = position < 3 ? '.' : position > 7 ? '\'' : 'x';
|
||||
Console.SetCursorPosition(centerX + consoleX, centerY + consoleY);
|
||||
Console.ForegroundColor = ConsoleColor.Cyan;
|
||||
Console.Write(c);
|
||||
Console.SetCursorPosition(Console.WindowWidth - 1, Console.WindowHeight - 1);
|
||||
}
|
||||
|
||||
private void AllowMovingHandle(OscMessageValues messageValues)
|
||||
|
Loading…
Reference in New Issue
Block a user