-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JOYSTICK_TYPE_GAMEPAD Crashes DCS (Digital Combat Simulator) #3
Comments
Hi,I compiled your code and uploaded it to my arduino pro micro.It works nice.I cant recurrent the problem what you said.Maybe change another chip and try again? |
Hi, had you tried running DCS after your pro micro is plugged? |
You can delete |
Hi, I commented out delay(20) and tried again. Then run DCS. Still crashed.
In a DCS forum of 2 years ago someone commented regarding FFD on gamepads.
This promote some Idea about the problem?
Omar Achraf
Em ter., 19 de mai. de 2020 às 14:52, York Law <notifications@github.com>
escreveu:
… You can delete delay(20); and try again.Or use more less delay like
delay(1);.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#3 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AK2MODQ5GXFMOMZYWKGL5ZDRSLBO5ANCNFSM4NEWEOEQ>
.
|
Hi, just another feedback. I tested with the library that doesnt have FFB (
https://github.com/MHeironimus/ArduinoJoystickLibrary ) and it worked ok
with DCS. Could be related to FFB?
Omar Achraf
Em ter., 19 de mai. de 2020 às 17:54, Omar Achraf <omarachraf@gmail.com>
escreveu:
… Hi, I commented out delay(20) and tried again. Then run DCS. Still
crashed.
In a DCS forum of 2 years ago someone commented regarding FFD on gamepads.
This promote some Idea about the problem?
Omar Achraf
Em ter., 19 de mai. de 2020 às 14:52, York Law ***@***.***>
escreveu:
> You can delete delay(20); and try again.Or use more less delay like
> delay(1);.
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <#3 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AK2MODQ5GXFMOMZYWKGL5ZDRSLBO5ANCNFSM4NEWEOEQ>
> .
>
|
got it,I will test the library in DCS soon:) |
Hi,I have recurrented this problem yet.You must add |
I updated the library.It changed a lot.You should download the latest version of library to make your program. |
Hi,
Updated! and recompiled and upload to my pro micro (without
Joystick.getForce(forces); )
It executed DCS simulator withou crash.
But, when I exit DCS, DCS hangs. Need too kill.
Omar Achraf
Em seg., 25 de mai. de 2020 às 15:37, York Law <notifications@github.com>
escreveu:
… I updated the library.It changed a lot.You should download the latest
version of library to make your program.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#3 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AK2MODWUBBKY7CKTYWK3JOLRTK3HVANCNFSM4NEWEOEQ>
.
|
The sketch below works in windows joystick usb configuration. However when I start DCS (Digital Combat Simulator) DCS crashes.
/*
switch in pin 2
potentiometers in A0, A1 and A2
Arduino pro micro
*/
#include "Joystick.h"
Joystick_ Joystick(
JOYSTICK_DEFAULT_REPORT_ID, // hidReportId
JOYSTICK_TYPE_GAMEPAD, // joystickType
1, // buttonCount
0, // hatSwitchCount
true, // includeXAxis
true, // includeYAxis
true, // includeZAxis
false,// includeRxAxis
false,// includeRyAxis
false,// includeRzAxis
false,// includeRudder
false,// includeThrottle
false,// includeAccelerator
false,// includeBrake
false // includeSteerings
);
const int pinButton = 2;
int sx, sy, sz; // sensor values
int x, y, z; // values to Joy X, Y, Z
void setup() {
pinMode(pinButton, INPUT_PULLUP);
Joystick.setXAxisRange(-1023, 1023);
Joystick.setYAxisRange(-1023, 1023);
Joystick.setZAxisRange(-127, 127);
Joystick.begin(false);
}
void loop() {
if (digitalRead(pinButton)) {
Joystick.pressButton(0); // 0..31
} else {
Joystick.releaseButton(0);
}
sx = analogRead(A0);
sy = analogRead(A1);
sz = analogRead(A2);
x = map(sx, 0, 1023, -1023, 1023);
y = map(sy, 0, 1023, -1023, 1023);
z = map(sz, 0, 1023, -127, 127);
Joystick.setXAxis(x);
Joystick.setYAxis(y);
Joystick.setZAxis(z);
Joystick.sendState();
delay(20);
}
The text was updated successfully, but these errors were encountered: