[tuxdroid-svn] r1412 - software_suite_v2/tuxware/java-api/trunk/src
Status: Beta
Brought to you by:
ks156
From: remi <c2m...@c2...> - 2008-07-29 09:37:30
|
Author: remi Date: 2008-07-29 11:37:33 +0200 (Tue, 29 Jul 2008) New Revision: 1412 Modified: software_suite_v2/tuxware/java-api/trunk/src/TestAPI.java Log: * added the "radio connected" event in the example. Modified: software_suite_v2/tuxware/java-api/trunk/src/TestAPI.java =================================================================== --- software_suite_v2/tuxware/java-api/trunk/src/TestAPI.java 2008-07-29 08:07:47 UTC (rev 1411) +++ software_suite_v2/tuxware/java-api/trunk/src/TestAPI.java 2008-07-29 09:37:33 UTC (rev 1412) @@ -13,6 +13,10 @@ System.out.println(str); } + public static void radio_connect(String value, Double delay){ + System.out.println("Radio is connected"); + } + /** * @param args */ @@ -21,6 +25,7 @@ TuxAPI tux = new TuxAPI("localhost", 270); System.out.println("Register the 'all' events callback"); tux.event.handler.register("all", new TestAPI(), "onAllEvent"); + tux.event.handler.register(TuxAPIConst.ST_NAME_RADIO_STATE, new TestAPI(), "radio_connect", "True", null); tux.button.remote.registerEventOnPressed(new TestAPI(), "remote_button", null); System.out.println("Connect to a Tuxdroid server"); tux.server.autoConnect(TuxAPIConst.CLIENT_LEVEL_RESTRICTED, "Test", "myPasswd"); |