-
Notifications
You must be signed in to change notification settings - Fork 1
/
Program.cs
63 lines (46 loc) · 1.37 KB
/
Program.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
using System;
using System.IO.Ports;
using System.Threading;
namespace ControlProgram
{
public class Program
{
public static void Main()
{
Console.WriteLine("DeathRay computer prompt Copyright(C) 2020 Lewis Hamilton\n\rThis program comes with ABSOLUTELY NO WARRANTY; for details type `warranty'.\n\r");
Console.Write("Test? ");
var ans = Console.ReadLine();
if(ans == "y")
{
var t = new Test();
}
Console.WriteLine("Available Ports:");
foreach (string s in SerialPort.GetPortNames())
{
Console.WriteLine(" {0}", s);
}
var database = new StarDatabase();
Remote remote = new Remote();
Term vt4100 = new Term(database, remote);
Console.CancelKeyPress += delegate
{
vt4100.end();
Environment.Exit(0);
};
vt4100.draw();
Thread.Sleep(100);
var count = 0;
while (true)
{
vt4100.update();
count++;
if(count == 100)
{
vt4100.updateVision();
count = 0;
}
Thread.Sleep(65);
}
}
}
}