public GamePadPilot() { JXInputDevice dev = JXInputManager.getJXInputDevice(0); ax_x = dev.getAxis(0); ax_y = dev.getAxis(1); ax_t = dev.getAxis(2); pid_t = new PIDController(0.15, 0.3, 0); pid_a = new PIDController(0.04, 0, 0.1); pid_e = new PIDController(0.04, 0, 0.1); pid_h = new PIDController(0.3, 0.01, 0.2); }
private void initDevices() { final int devicesCount = JXInputManager.getNumberOfDevices(); if (devicesCount > 0) { this.devices = new Device[devicesCount]; for (int i = 0; i < devicesCount; ++i) { this.devices[i] = new Device(i, JXInputManager.getJXInputDevice(i)); } } else { this.devices = new Device[0]; } }