[chronojump] Error message on Chronopic/encoder connection WIP



commit 39cde29d71c71ed242d53953476b0a25abd1002c
Author: Xavier de Blas <xaviblas gmail com>
Date:   Tue Mar 10 18:45:59 2020 +0100

    Error message on Chronopic/encoder connection WIP

 src/gui/app1/encoder.cs | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)
---
diff --git a/src/gui/app1/encoder.cs b/src/gui/app1/encoder.cs
index 9f1fde69..d9ed43e0 100644
--- a/src/gui/app1/encoder.cs
+++ b/src/gui/app1/encoder.cs
@@ -352,6 +352,7 @@ public partial class ChronoJumpWindow
        private static bool encoderProcessProblems;
        private static bool encoderProcessFinish;
        private static bool encoderProcessFinishContMode;
+       private static Stopwatch encoderCaptureStopwatch;
 
        private static EncoderRhythmExecute encoderRhythmExecute;
        private static EncoderRhythm encoderRhythm;
@@ -5667,6 +5668,10 @@ public partial class ChronoJumpWindow
 
                                encoderRProcCapture.CutByTriggers = reallyCutByTriggers;
 
+                               //to know if there are connection problems between chronopic and encoder
+                               encoderCaptureStopwatch = new Stopwatch();
+                               encoderCaptureStopwatch.Start();
+
                                encoderThread = new Thread(new ThreadStart(encoderDoCaptureCsharp));
                                GLib.Idle.Add (new GLib.IdleHandler (pulseGTKEncoderCaptureAndCurves));
                        }
@@ -6321,7 +6326,13 @@ public partial class ChronoJumpWindow
                        encoder_pulsebar_capture.Fraction = UtilAll.DivideSafeFraction(
                                        (selectedTime - eCapture.Countdown), selectedTime);
                        encoder_pulsebar_capture.Text = eCapture.Countdown + " s";
-       
+
+                       if(encoderCaptureStopwatch.Elapsed.TotalSeconds >= 3 && eCapture.Countdown == 
preferences.encoderCaptureTime)
+                       {
+                               //encoder_pulsebar_capture.Text = "Chronopic seems not properly connected to 
encoder");
+                               encoder_pulsebar_capture.Text = "Chronopic- /// -Encoder";
+                       }
+
                        return;
                }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]