intellij commit #1
This commit is contained in:
@@ -12,33 +12,18 @@ public class testprocess1 extends testprocess {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void runProcess() {
|
||||
try (XPlaneConnect xpc = new XPlaneConnect()) {
|
||||
// Ensure connection established.
|
||||
m = new Model(xpc);
|
||||
m.activateModel();
|
||||
m.createAction(ActionType.VISION, null, 0, "sim/cockpit2/gauges/indicators/airspeed_kts_pilot");
|
||||
m.createAction(ActionType.MOTOR, MotorType.PITCHUP, 0, null);
|
||||
m.printModelQueue();
|
||||
visualizer vis1 = new visualizer(m);
|
||||
vis1.initializeDisplay();
|
||||
while (m.isActive() && !m.isEmpty()) {
|
||||
float[] array = m.next();
|
||||
if (m.getModelQueueLength() < 5) {
|
||||
m.createAction(ActionType.VISION, null, 0, "sim/cockpit2/gauges/indicators/airspeed_kts_pilot");
|
||||
// m.createAction(ActionType.MOTOR, MotorType.PITCHUP, 0, null);
|
||||
// m.createAction(ActionType.MOTOR, MotorType.PITCHDOWN, 0, null);
|
||||
}
|
||||
// m.printModelQueue();
|
||||
m.logData();
|
||||
vis1.updateVisualizer(m.getCurrentControls());
|
||||
public void innerProcess(visualizer vis1){
|
||||
float[] array = m.next();
|
||||
if (m.getModelQueueLength() < 5) {
|
||||
m.createAction(ActionType.VISION, null, 0, "sim/cockpit2/gauges/indicators/airspeed_kts_pilot");
|
||||
}
|
||||
// m.printModelQueue();
|
||||
m.logData();
|
||||
try {
|
||||
vis1.updateVisualizer(m.getCurrentControls());
|
||||
} catch (IOException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
} catch (SocketException ex) {
|
||||
System.out.println("Unable to set up the connection. (Error message was '" + ex.getMessage() + "'.)");
|
||||
} catch (IOException ex) {
|
||||
System.out.println(
|
||||
"Something went wrong with one of the commands. (Error message was '" + ex.getMessage() + "'.)");
|
||||
}
|
||||
System.out.println("Exiting");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user