Author: ks156
Date: 2009-11-18 11:29:27 +0100 (Wed, 18 Nov 2009)
New Revision: 5903

Modified:
   
software_suite_v3/software/tool/tool-tux-controller/trunk/src/GUI/control/controlTux.java
Log:
* Merged the user_mode branch from rev 5372. 
  This branch is now done and discontinued.


Modified: 
software_suite_v3/software/tool/tool-tux-controller/trunk/src/GUI/control/controlTux.java
===================================================================
--- 
software_suite_v3/software/tool/tool-tux-controller/trunk/src/GUI/control/controlTux.java
   2009-11-18 10:27:56 UTC (rev 5902)
+++ 
software_suite_v3/software/tool/tool-tux-controller/trunk/src/GUI/control/controlTux.java
   2009-11-18 10:29:27 UTC (rev 5903)
@@ -34,9 +34,27 @@
 
     public controlTux(mainWindow winInstance) {
         win = winInstance;
+
+        /* Try to connect with the port 270 */
         tux = new TuxAPI("127.0.0.1", 270);
         tux.server.autoConnect(TuxAPIConst.CLIENT_LEVEL_RESTRICTED, 
                 "TuxController", "98765");
+
+        /* Wait 1 second, and check if the API is connected */
+        try {
+            Thread.sleep(1000);
+        }
+        catch(Exception except) {  
+            except.printStackTrace();
+        }  
+
+        /* If the API is not connected, try with the port 54321 */
+        if (tux.server.getConnected() != true)
+        {
+            tux = new TuxAPI("127.0.0.1", 54321);
+            tux.server.autoConnect(TuxAPIConst.CLIENT_LEVEL_RESTRICTED, 
+                    "TuxController", "98765");
+        }
         tux.server.waitConnected(0.5);
         registerEvents();
         if (tux.radio.waitConnected(0.5))


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Tux-droid-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tux-droid-svn

Reply via email to