[chronojump] Detects if encoder gets disconnected while inertialBG thread is running
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Detects if encoder gets disconnected while inertialBG thread is running
- Date: Wed, 15 Feb 2017 15:50:30 +0000 (UTC)
commit 7c9506915968fafe2ade27416caa0f0bd6232011
Author: Xavier de Blas <xaviblas gmail com>
Date: Wed Feb 15 16:36:34 2017 +0100
Detects if encoder gets disconnected while inertialBG thread is running
src/gui/encoder.cs | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/src/gui/encoder.cs b/src/gui/encoder.cs
index 49cb85f..8a3e845 100644
--- a/src/gui/encoder.cs
+++ b/src/gui/encoder.cs
@@ -5089,6 +5089,12 @@ public partial class ChronoJumpWindow
//don't plot info here because this is sorking all the time
//LogB.Information(" CapBG:"+ encoderThreadBG.ThreadState.ToString());
+ if(newValue < -100000 || newValue > 100000)
+ {
+ LogB.Information("Encoder seems to be disconnected");
+ stopCapturingInertialBG();
+ }
+
return true;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]