Closed thomasnield closed 3 years ago
I get stranger results when I try different combinations. Here I am only able to get 5 inputs.
#include <Joystick.h>
Joystick_ Joystick(JOYSTICK_DEFAULT_REPORT_ID,JOYSTICK_TYPE_GAMEPAD,
0, 0, // Button Count, Hat Switch Count
true, true, true, // X, Y, Z Axis
false, false, false, // No Rx, Ry, or Rz
true, true, // rudder, throttle
true, true, true); // accelerator, brake, steering
void setup() {
Joystick.begin();
}
void loop() {
for (int i = 0; i < 1024; i++) {
Joystick.setXAxis(i);
Joystick.setYAxis(i);
Joystick.setZAxis(i);
Joystick.setThrottle(i);
Joystick.setRudder(i);
//Joystick.setRxAxis(i);
//Joystick.setRyAxis(i);
//Joystick.setRzAxis(i);
Joystick.setAccelerator(i);
Joystick.setBrake(i);
delay(50);
}
}
Alright I think this issue was resolved on another thread. I have made this change in my own fork.
https://github.com/MHeironimus/ArduinoJoystickLibrary/issues/177
I have tried running this code to see if Windows 10 and Microsoft Flight Simulator would pick up all analog inputs this library allows. It simply iterates the values 0 through 1023. Unfortunately both platforms only seem to pick up 7 analog inputs.
Is this a bug or a known limitation?
Technical Details