Exemple #1
0
        public void SetPumpSpeedPerformance()
        {
            var messages = KrakenDevice.GenerateCoolingMessage(true, true, 70, 70, 70, 70, 70, 70, 70, 70, 80, 85, 90,
                                                               95, 100, 100, 100, 100, 100, 100, 100, 100, 100);

            foreach (var message in messages)
            {
                commander.AddCommand(message);
            }
        }
Exemple #2
0
        public void SetFanSpeedSilent()
        {
            var messages = KrakenDevice.GenerateCoolingMessage(false, true, 25, 25, 25, 25, 25, 25, 25, 25, 35, 45, 55,
                                                               75, 100, 100, 100, 100, 100, 100, 100, 100, 100);

            foreach (var message in messages)
            {
                commander.AddCommand(message);
            }
        }
Exemple #3
0
        public void SetFanSpeedPerformance()
        {
            var messages = KrakenDevice.GenerateCoolingMessage(false, true, 50, 50, 50, 50, 50, 50, 50, 50, 60, 70, 80,
                                                               90, 100, 100, 100, 100, 100, 100, 100, 100, 100);

            foreach (var message in messages)
            {
                commander.AddCommand(message);
            }
        }
Exemple #4
0
        static void Main(string[] args)
        {
            var devices = new List <HidDevice>(DeviceEnumerator.EnumerateKrakenX62Devices());
            var tasks   = new List <Task>();

            var deviceList = new List <HidDevice>(DeviceEnumerator.EnumerateKrakenX62Devices());

            if (deviceList.Count < 1)
            {
                Console.WriteLine("No Kraken X62 device found!");
                return;
            }
            var device = new KrakenDevice(deviceList[0]);

            var messages = KrakenDevice.GenerateCoolingMessage(false, true, 25,
                                                               25,
                                                               25,
                                                               25,
                                                               25,
                                                               25,
                                                               25,
                                                               25,
                                                               35,
                                                               45,
                                                               55,
                                                               75,
                                                               100,
                                                               100,
                                                               100,
                                                               100,
                                                               100,
                                                               100,
                                                               100,
                                                               100,
                                                               100);
            var stopwatch = new Stopwatch();

            stopwatch.Start();
            foreach (var message in messages)
            {
                device.Write(message);
            }
            stopwatch.Start();
            Console.WriteLine($"Time taken: {stopwatch.ElapsedMilliseconds}ms - Avg: {stopwatch.ElapsedMilliseconds / (float) messages.Length}ms");
        }
Exemple #5
0
        private void UpdateBenchmark()
        {
            System.Console.WriteLine("Starting staged Performance Benchmark:");
            Console.WriteLine("- Stage 1: Slow");
            for (var i = 0; i < 10; i++)
            {
                commander.AddCommand(KrakenDevice.GenerateCoolingMessage(true, false, 35));
                commander.AddCommand(KrakenDevice.GenerateCoolingMessage(false, false, 35));
                Thread.Sleep(1000);
            }

            Console.WriteLine("- Stage 2: Full");
            for (var i = 0; i < 10; i++)
            {
                commander.AddCommand(KrakenDevice.GenerateCoolingMessage(true, false, 100));
                commander.AddCommand(KrakenDevice.GenerateCoolingMessage(false, false, 100));
                Thread.Sleep(1000);
            }

            Console.WriteLine("- Stage 3: Reset");
            commander.AddCommand(KrakenDevice.GenerateCoolingMessage(true, false, 40));
            commander.AddCommand(KrakenDevice.GenerateCoolingMessage(false, false, 40));
        }