From 200eadd1e93d0391710d0c34afa9be166c287d02 Mon Sep 17 00:00:00 2001 From: Jason Watkins Date: Fri, 1 May 2015 14:28:33 -0700 Subject: [PATCH] Updated Java example. - Removed setCONN, since very few users should need it in the future. - Added test at the beginning of the example to ensure that the client is connected to X-Plane. --- Java/Examples/BasicOperation/src/Main.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Java/Examples/BasicOperation/src/Main.java b/Java/Examples/BasicOperation/src/Main.java index 1ab5bcc..dc82c9f 100644 --- a/Java/Examples/BasicOperation/src/Main.java +++ b/Java/Examples/BasicOperation/src/Main.java @@ -21,8 +21,8 @@ public class Main System.out.println("Setting up simulation..."); try(XPlaneConnect xpc = new XPlaneConnect()) { - System.out.println("Setting inbound port"); - xpc.setCONN(49055); + // Ensure connection established. + xpc.getDREF("sim/test/test_float"); System.out.println("Setting player aircraft position"); float[] posi = new float[] {37.524F, -122.06899F, 2500, 0, 0, 0, 1};