public RecordingDriver2(int processingThreadNumber = 3)
 {
     ArduinoWorker                = new ArduinoWorker();
     settings                     = new SettingsContainer();
     imageCapture                 = new ImageCapture();
     imageCapture2                = new ModelImageCapture();
     imageProcessor               = new ImageProcessor2(processingThreadNumber);
     imageCapture.rec            += AddImage;
     imageCapture2.imageReciever += AddImage;
     imageCapture.action         += ArduinoWorker.Action;
     imageCapture.Start();
     imageCapture2.Pause();
     imageCapture2.Start();
 }
        public void FPS_test2()
        {
            count = 0;
            capt  = new ModelImageCapture(5, 5);
            capt.CreateImagesForStepMethod(1, 4);
            capt.imageReciever += testReciever1;
            double FPS = 5;

            capt.SetMaxFPS(FPS);
            capt.Start();
            DateTime dt1 = DateTime.UtcNow;

            Thread.Sleep(6000);
            capt.Stop();
            double sec = DateTime.UtcNow.Subtract(dt1).TotalSeconds;
            double d   = count / sec;

            capt.imageReciever -= testReciever1;
            Assert.IsTrue(Math.Abs(d - FPS) / FPS < 0.1);
            count = 0;
        }