Author: ks156
Date: 2009-09-14 13:06:02 +0200 (Mon, 14 Sep 2009)
New Revision: 5373
Modified:
software_suite_v3/software/tool/tool-tux-controller/branches/user_mode/src/GUI/control/controlTux.java
Log:
* Added a test to determines if the server is on the port 270 or 54321
Modified:
software_suite_v3/software/tool/tool-tux-controller/branches/user_mode/src/GUI/control/controlTux.java
===================================================================
---
software_suite_v3/software/tool/tool-tux-controller/branches/user_mode/src/GUI/control/controlTux.java
2009-09-14 10:42:19 UTC (rev 5372)
+++
software_suite_v3/software/tool/tool-tux-controller/branches/user_mode/src/GUI/control/controlTux.java
2009-09-14 11:06:02 UTC (rev 5373)
@@ -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