New visualization for model queue and delay events between looking at compass and looking at airspeed

This commit is contained in:
cs-powell
2024-12-07 23:19:42 -05:00
parent 2297854c28
commit 33a4b8eb7e
6 changed files with 118 additions and 46 deletions

View File

@@ -12,15 +12,22 @@ public class testprocess1 extends testprocess {
}
@Override
public void innerProcess(visualizer vis1){
public void innerProcess(visualizer vis1) {
float[] array = m.next();
double r = Math.random();
if (m.getModelQueueLength() < 5) {
m.createAction(ActionType.VISION, null, 0, "sim/cockpit2/gauges/indicators/airspeed_kts_pilot");
if (r > 0.5) {
// m.createAction(ActionType.DELAY, null, 200, null);
m.createAction(ActionType.DELAY, null, 200, null);
m.createAction(ActionType.VISION, null, 0, "sim/cockpit2/gauges/indicators/compass_heading_deg_mag");
} else {
m.createAction(ActionType.VISION, null, 0, "sim/cockpit2/gauges/indicators/airspeed_kts_pilot");
}
}
// m.printModelQueue();
m.logData();
try {
vis1.updateVisualizer(m.getCurrentControls());
vis1.updateVisualizer(m);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();