[chronojump] Force sensor port gets disconnected on change mode
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Force sensor port gets disconnected on change mode
- Date: Wed, 30 Sep 2020 13:37:25 +0000 (UTC)
commit 78101f4c728ed7afd6018a93f54f46527f54d2cc
Author: Xavier de Blas <xaviblas gmail com>
Date: Wed Sep 30 15:37:07 2020 +0200
Force sensor port gets disconnected on change mode
src/gui/app1/chronojump.cs | 4 ++++
src/gui/app1/forceSensor.cs | 5 ++++-
2 files changed, 8 insertions(+), 1 deletion(-)
---
diff --git a/src/gui/app1/chronojump.cs b/src/gui/app1/chronojump.cs
index 3be05bee..6e776eb7 100644
--- a/src/gui/app1/chronojump.cs
+++ b/src/gui/app1/chronojump.cs
@@ -2922,6 +2922,10 @@ public partial class ChronoJumpWindow
setApp1Title(tempSessionName, current_menuitem_mode);
+ //maybe we have the force sensor port opened, close it:
+ if(portFSOpened)
+ forceSensorDisconnect();
+
//run simple will be the only one with its drawing are
frame_run_simple_double_contacts.Visible = false;
diff --git a/src/gui/app1/forceSensor.cs b/src/gui/app1/forceSensor.cs
index b9d7ae62..dec1e894 100644
--- a/src/gui/app1/forceSensor.cs
+++ b/src/gui/app1/forceSensor.cs
@@ -283,11 +283,14 @@ public partial class ChronoJumpWindow
LogB.Information(" FS connect 7: connected and adjusted!");
return true;
}
+
+ //this is called on change mode
private void forceSensorDisconnect()
{
portFS.Close();
portFSOpened = false;
- event_execute_label_message.Text = "Disconnected!";
+ //event_execute_label_message.Text = "Disconnected!";
+ LogB.Information("PortFS Disconnected!");
}
//Attention: no GTK here!!
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]