Example #1
0
    private void initComponents() {
      pidThrustPanel = new PidPanel(0);
      pidRudderPanel = new PidPanel(5);
      drivePanel = new DrivePanel();

      // Put everything together, using a vertical BoxLayout
      setLayout(new BoxLayout(this, BoxLayout.PAGE_AXIS));

      drivePanel.setBorder(BorderFactory.createTitledBorder("Velocity"));
      add(drivePanel);

      add(Box.createRigidArea(new Dimension(0, 5)));

      pidThrustPanel.setBorder(BorderFactory.createTitledBorder("Thrust PID"));
      add(pidThrustPanel);

      add(Box.createRigidArea(new Dimension(0, 5)));

      pidRudderPanel.setBorder(BorderFactory.createTitledBorder("Rudder PID"));
      add(pidRudderPanel);
    }
Example #2
0
 public void setUpdateRate(long period_ms) {
   pidThrustPanel.setUpdateRate(period_ms);
   pidRudderPanel.setUpdateRate(period_ms);
   drivePanel.setUpdateRate(period_ms);
 }
Example #3
0
 public void setVehicle(AsyncVehicleServer vehicle) {
   pidThrustPanel.setVehicle(vehicle);
   pidRudderPanel.setVehicle(vehicle);
   drivePanel.setVehicle(vehicle);
 }