public static void TestGainStep(HE50 camera) { /* Test Gainstep up down */ ConsoleKeyInfo key; key = Console.ReadKey(); Console.Clear(); Console.WriteLine("Increase/Decrease cameras gain by using buttons below"); Console.WriteLine("U. Up"); Console.WriteLine("D. Down"); Console.WriteLine("Q. Quit"); Console.WriteLine(""); while (key.KeyChar != 'q') { switch (key.KeyChar) { case 'u': camera.GainStepUp(); break; case 'd': camera.GainStepDown(); break; } if (key.KeyChar == 'q') { break; } key = Console.ReadKey(); } }
public static void TestPanTilt(HE50 camera) { /* Test Gainstep up down */ ConsoleKeyInfo key; key = Console.ReadKey(); Console.Clear(); Console.WriteLine("Test your cameras Pan/Tilt by using the keyboard."); Console.WriteLine("W. Up"); Console.WriteLine("S. Down"); Console.WriteLine("A. Left"); Console.WriteLine("D. Right"); Console.WriteLine("Z. Zoom in"); Console.WriteLine("X. Zoom out"); Console.WriteLine("E. Stop"); Console.WriteLine("Q. Quit"); Console.WriteLine(""); while (key.KeyChar != 'q') { switch (key.KeyChar) { case 'w': camera.Tilt = 70; break; case 's': camera.Tilt = 30; break; case 'a': camera.Pan = 30; break; case 'd': camera.Pan = 70; break; case 'z': camera.Zoom = 70; break; case 'x': camera.Zoom = 30; break; case 'e': camera.Pan = 50; camera.Tilt = 50; camera.Zoom = 50; break; } key = Console.ReadKey(); } camera.Pan = 50; camera.Tilt = 50; camera.Zoom = 50; }
static void Main(string[] args) { HE50.debug = true; HE50.cameraUpdates = false; HE50.expandedDebug = true; HE50 camera1 = new HE50("192.168.62.155", "admin", "12345"); camera1.onLog += log; camera1.onConnect += onConnect; camera1.onDisconnect += onDisconnect; Console.Clear(); Console.WriteLine("1. Test Gain up/down."); Console.WriteLine("2. Pan & Tilt."); Console.WriteLine("3. Chroma"); Console.WriteLine(""); ConsoleKeyInfo key; key = Console.ReadKey(); while (key.KeyChar != 'q') { switch (key.KeyChar) { case '1': GainStep.TestGainStep(camera1); break; case '2': PanTilt.TestPanTilt(camera1); break; case '3': Chroma.TestChroma(camera1); break; } if (key.KeyChar == 'q') { break; } Console.Clear(); Console.WriteLine("1. Test Gain up/down."); Console.WriteLine("2. Pan & Tilt."); Console.WriteLine("3. Chroma"); Console.WriteLine(""); key = Console.ReadKey(); } /* * Console.WriteLine("Preset = 1"); * Console.ReadKey(); * * camera1.Preset = 0; * Console.WriteLine("Preset = 2"); * Console.ReadKey(); * * camera1.Preset = 1; * Console.WriteLine("Preset = 3"); * Console.ReadKey(); * * camera1.Power = 0; * Console.WriteLine("Start"); * Console.ReadKey(); * * camera1.Preset = 1; * Console.WriteLine("Preset = 1"); * Console.ReadKey(); * * camera1.Preset = 0; * Console.WriteLine("Preset = 2"); * Console.ReadKey(); * * camera1.Preset = 1; * Console.WriteLine("Preset = 3"); * System.Threading.Thread.Sleep(5000); * /* * * camera1.Power = 1; * Console.WriteLine("Start"); * * camera1.Pan = 60; * Console.WriteLine("Pan=55"); * System.Threading.Thread.Sleep(3000); * * * camera1.Tilt = 60; * Console.WriteLine("Tilt=55"); * System.Threading.Thread.Sleep(2000); * * camera1.Pan = 40; * Console.WriteLine("Pan=55"); * System.Threading.Thread.Sleep(2000); * * camera1.Tilt = 40; * Console.WriteLine("Tilt=45"); * System.Threading.Thread.Sleep(3000); * * * camera1.Pan = 50; * Console.WriteLine("Pan=50"); * camera1.Tilt = 50; * Console.WriteLine("Tilt=50"); * * System.Threading.Thread.Sleep(5000); * Console.WriteLine("Väntar på Användare...."); * Console.ReadKey(); * * camera1.Pan = 30; * Console.WriteLine("Pan=30"); * System.Threading.Thread.Sleep(3000); * * camera1.Pan = 70; * Console.WriteLine("Pan=70"); * System.Threading.Thread.Sleep(3000); * * camera1.Pan = 50; * * System.Threading.Thread.Sleep(5000); * Console.WriteLine("Klar"); * * */ Console.ReadKey(); camera1.stop(); }
public static void TestChroma(HE50 camera) { ConsoleKeyInfo key; key = Console.ReadKey(); Console.Clear(); Console.WriteLine("Test chroma on all Cameras except HE-130, by pressing vkeys 0-6"); Console.WriteLine("Test chroma on HE-130, by the following commands."); Console.WriteLine("W. Set chroma to 120/168"); Console.WriteLine("S. set chroma to 49/168"); Console.WriteLine("Q. Quit"); Console.WriteLine("E. Turn chroma off"); Console.WriteLine(""); while (key.KeyChar != 'q') { switch (key.KeyChar) { case '0': camera.Chroma = 0; break; case '1': camera.Chroma = 1; break; case '2': camera.Chroma = 2; break; case '3': camera.Chroma = 3; break; case '4': camera.Chroma = 4; break; case '5': camera.Chroma = 5; break; case '6': camera.Chroma = 6; break; case 'w': camera.Chroma130 = 120; break; case 's': camera.Chroma130 = 49; break; case 'e': camera.Chroma130 = 0; break; } key = Console.ReadKey(); } }