mega changes -- transition to Python3

This commit is contained in:
cs-powell
2025-01-24 09:33:57 -05:00
parent 3be0e2323b
commit e15c534c07
65 changed files with 273097 additions and 16 deletions

View File

@@ -0,0 +1,50 @@
import java.io.IOException;
import java.net.SocketException;
import CognitiveModel.ModelFiles.*;
import Visualizer.visualizer;
public abstract class testprocess {
Model m = new Model();
public testprocess(Model inputM, XPlaneConnect xpc) {
m = inputM;
m.establishConnection(xpc);
}
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()) {
innerProcess(vis1);
}
} 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");
}
public void innerProcess(visualizer vis1){
System.out.println("Using default innerProcess");
}
}