[chronojump] Closing sp on OSX if opening chronopicRegister and no ports
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Closing sp on OSX if opening chronopicRegister and no ports
- Date: Thu, 3 Nov 2016 12:13:35 +0000 (UTC)
commit c597655f8f8820c2d6dcce1900ff70ffb975ce57
Author: Xavier de Blas <xaviblas gmail com>
Date: Thu Nov 3 13:12:39 2016 +0100
Closing sp on OSX if opening chronopicRegister and no ports
src/gui/chronojump.cs | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/src/gui/chronojump.cs b/src/gui/chronojump.cs
index 1bfbadb..e3cd000 100644
--- a/src/gui/chronojump.cs
+++ b/src/gui/chronojump.cs
@@ -6811,6 +6811,19 @@ LogB.Debug("X");
ChronopicRegisterSelectOS cros = new ChronopicRegisterSelectOS();
chronopicRegister = cros.Do();
+
+ /*On Chronopic hsa been disconnected on OSX, port gets blocked
+ * (no new tty is assigned until serial port is closed)
+ * maybe need to reconnect USB cables
+ */
+ if(UtilAll.GetOSEnum() == UtilAll.OperatingSystems.MACOSX &&
+ chronopicRegister.Crpl.L.Count == 0)
+ {
+ cp2016.SerialPortsCloseIfNeeded();
+ Thread.Sleep(250);
+ chronopicRegister = cros.Do();
+ }
+
/*
* openWindow: false, just generates the list,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]