Skip to content

Commit

Permalink
use javac instead of javac2 again
Browse files Browse the repository at this point in the history
  • Loading branch information
stmoon authored and bkueng committed Jan 12, 2018
1 parent 0000858 commit aabbecd
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 12 deletions.
4 changes: 2 additions & 2 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@
<taskdef name="javac2" classname="com.intellij.ant.Javac2" classpathref="javac2.class.path"/>

<target name="compile" description="Compile java sources" depends="make_dirs">
<javac2 destdir="${classes.dir}" includeantruntime="false" debug="true">
<javac destdir="${classes.dir}" includeantruntime="false" debug="true">
<classpath refid="libsclasspath"/>
<src path="src"/>
<src path="jMAVlib/src"/>
</javac2>
</javac>
</target>

<target name="jmavsim" description="Link classes and JARs for jMAVSim" depends="compile">
Expand Down
3 changes: 3 additions & 0 deletions jMAVSim.ipr
Original file line number Diff line number Diff line change
Expand Up @@ -188,4 +188,7 @@
<jarDirectory url="file://$PROJECT_DIR$/lib" recursive="false" />
</library>
</component>
<component name="uidesigner-configuration">
<option name="INSTRUMENT_CLASSES" value="false" />
</component>
</project>
84 changes: 74 additions & 10 deletions src/me/drton/jmavsim/SensorParamPanel.java
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
package me.drton.jmavsim;

import com.intellij.uiDesigner.core.GridConstraints;
import com.intellij.uiDesigner.core.GridLayoutManager;

import javax.swing.*;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import java.awt.*;

/**
* @author SungTae Moon <[email protected]>
* @file SensorParamPanel.java
* Sensor Control Parameter Panel
*
* <p>
* This panel is used for the sensor test and analysis
*
* @author SungTae Moon <[email protected]>
*/

public class SensorParamPanel extends JPanel {
public class SensorParamPanel extends JPanel {
private JSpinner accelSpinner;
private JSpinner gyroSpinner;
private JPanel mainPanel;
Expand All @@ -38,47 +41,47 @@ public SensorParamPanel() {
accelSpinner.addChangeListener(new ChangeListener() {
@Override
public void stateChanged(ChangeEvent e) {
Double value = (Double)accelSpinner.getValue();
Double value = (Double) accelSpinner.getValue();
sensors.setParameter("noise_Acc", value.floatValue());
}
});

gyroSpinner.addChangeListener(new ChangeListener() {
@Override
public void stateChanged(ChangeEvent e) {
Double value = (Double)gyroSpinner.getValue();
Double value = (Double) gyroSpinner.getValue();
sensors.setParameter("noise_Gyo", value.floatValue());
}
});

magSpinner.addChangeListener(new ChangeListener() {
@Override
public void stateChanged(ChangeEvent e) {
Double value = (Double)magSpinner.getValue();
Double value = (Double) magSpinner.getValue();
sensors.setParameter("noise_Mag", value.floatValue());
}
});

presSpinner.addChangeListener(new ChangeListener() {
@Override
public void stateChanged(ChangeEvent e) {
Double value = (Double)presSpinner.getValue();
Double value = (Double) presSpinner.getValue();
sensors.setParameter("noise_Prs", value.floatValue());
}
});

gpsSpinner.addChangeListener(new ChangeListener() {
@Override
public void stateChanged(ChangeEvent e) {
Double value = (Double)gpsSpinner.getValue();
Double value = (Double) gpsSpinner.getValue();
sensors.setParameter("gpsNoiseStdDev", value.floatValue());
}
});

massSpinner.addChangeListener(new ChangeListener() {
@Override
public void stateChanged(ChangeEvent e) {
Double value = (Double)massSpinner.getValue();
Double value = (Double) massSpinner.getValue();
sensors.setParameter("mass", value.floatValue());
}
});
Expand All @@ -102,4 +105,65 @@ public void setSensor(Sensors sensors) {

}

{
// GUI initializer generated by IntelliJ IDEA GUI Designer
// >>> IMPORTANT!! <<<
// DO NOT EDIT OR ADD ANY CODE HERE!
$$$setupUI$$$();
}

/**
* Method generated by IntelliJ IDEA GUI Designer
* >>> IMPORTANT!! <<<
* DO NOT edit this method OR call it in your code!
*
* @noinspection ALL
*/
private void $$$setupUI$$$() {
mainPanel = new JPanel();
mainPanel.setLayout(new GridLayoutManager(8, 2, new Insets(0, 0, 0, 0), -1, -1));
final JLabel label1 = new JLabel();
label1.setText("Accel Noise StdDev");
mainPanel.add(label1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
accelSpinner = new JSpinner();
mainPanel.add(accelSpinner, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
final JLabel label2 = new JLabel();
label2.setText("Gyro Noise StdDev");
mainPanel.add(label2, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
gyroSpinner = new JSpinner();
mainPanel.add(gyroSpinner, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
final JLabel label3 = new JLabel();
label3.setText("Mag Noise StdDev");
mainPanel.add(label3, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
final JLabel label4 = new JLabel();
label4.setText("Pressure Noise StdDev");
mainPanel.add(label4, new GridConstraints(4, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
final JLabel label5 = new JLabel();
label5.setText("GPS Noise StdDev");
mainPanel.add(label5, new GridConstraints(5, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
magSpinner = new JSpinner();
mainPanel.add(magSpinner, new GridConstraints(3, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
presSpinner = new JSpinner();
mainPanel.add(presSpinner, new GridConstraints(4, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
gpsSpinner = new JSpinner();
mainPanel.add(gpsSpinner, new GridConstraints(5, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
final JLabel label6 = new JLabel();
label6.setText("--- VEHICLE ---");
mainPanel.add(label6, new GridConstraints(6, 0, 1, 2, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
final JLabel label7 = new JLabel();
label7.setText("mass");
mainPanel.add(label7, new GridConstraints(7, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
massSpinner = new JSpinner();
mainPanel.add(massSpinner, new GridConstraints(7, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
final JLabel label8 = new JLabel();
label8.setText("--- SENSORS ---");
mainPanel.add(label8, new GridConstraints(0, 0, 1, 2, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
}

/**
* @noinspection ALL
*/
public JComponent $$$getRootComponent$$$() {
return mainPanel;
}
}

0 comments on commit aabbecd

Please sign in to comment.