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,44 @@
package CognitiveModel.ModelFiles;
import java.io.IOException;
public class Motor extends Action {
float[] control;
MotorType motorType;
public Motor(MotorType motorType) {
super(ActionType.MOTOR, 1000);
this.motorType = motorType;
}
// public Motor(int delay) {
// super(ActionType.MOTOR,delay);
// }
public Motor(MotorType motorType, int delay, String target) {
super(ActionType.MOTOR, delay, target);
this.motorType = motorType;
}
public void createMotorControl() { // TODO: Maybe takes in a formatted set of vision inputs?
control = null;
}
public MotorType getMotorType() {
return motorType;
}
public void sendMotorControl(XPlaneConnect xpc) {
if (control != null) {
try {
xpc.sendCTRL(control);
} catch (IOException e) {
// TODO Auto-generated catch block
System.out.println("Control failed to send");
}
}
}
}