[chronojump] On Wichro connected (and recognised) don't show Connect at start chronojump on race/race interval.



commit de9892162de08fe7fc7d3968cbed6cdead369f74
Author: Xavier de Blas <xaviblas gmail com>
Date:   Fri Dec 17 17:00:51 2021 +0100

    On Wichro connected (and recognised) don't show Connect at start chronojump on race/race interval.

 src/gui/app1/chronojump.cs | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)
---
diff --git a/src/gui/app1/chronojump.cs b/src/gui/app1/chronojump.cs
index e47155dd8..a5a871c26 100644
--- a/src/gui/app1/chronojump.cs
+++ b/src/gui/app1/chronojump.cs
@@ -3602,7 +3602,21 @@ public partial class ChronoJumpWindow
                }
                else if(m == Constants.Modes.RUNSSIMPLE || m == Constants.Modes.RUNSINTERVALLIC)
                {
-                       if(cp2016.StoredWireless)
+                       LogB.Information("change mode is called");
+                       LogB.Information(string.Format("wireless conditions A: {0}, {1}",
+                               cp2016.StoredWireless, chronopicRegister != null));
+
+                       if(chronopicRegister == null)
+                       {
+                               LogB.Information("Updating chronopicRegister to know if we have a wichro 
connected so we don't need 'Connected' at start");
+                               chronopicRegisterUpdate(false);
+                       }
+
+                       LogB.Information(string.Format("wireless conditions B: {0}, {1}",
+                               cp2016.StoredWireless, chronopicRegister != null));
+
+                       if(cp2016.StoredWireless ||
+                                       (chronopicRegister != null && 
chronopicRegister.NumConnectedOfType(ChronopicRegisterPort.Types.RUN_WIRELESS) == 1) )
                                button_execute_test_show_connect_or_execute(false);
                        else
                                button_execute_test_show_connect_or_execute(! 
cp2016.SuccededConnectContactsRealThread);


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