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.
This commit is contained in:
@@ -21,8 +21,8 @@ public class Main
|
|||||||
System.out.println("Setting up simulation...");
|
System.out.println("Setting up simulation...");
|
||||||
try(XPlaneConnect xpc = new XPlaneConnect())
|
try(XPlaneConnect xpc = new XPlaneConnect())
|
||||||
{
|
{
|
||||||
System.out.println("Setting inbound port");
|
// Ensure connection established.
|
||||||
xpc.setCONN(49055);
|
xpc.getDREF("sim/test/test_float");
|
||||||
|
|
||||||
System.out.println("Setting player aircraft position");
|
System.out.println("Setting player aircraft position");
|
||||||
float[] posi = new float[] {37.524F, -122.06899F, 2500, 0, 0, 0, 1};
|
float[] posi = new float[] {37.524F, -122.06899F, 2500, 0, 0, 0, 1};
|
||||||
|
|||||||
Reference in New Issue
Block a user