DX Issue
-
I’ve been trying to learn BMS and Warthog. This forum is great, so I hope I am not being too irritating.
I have been noticing that a lot of the profiles which I have found in this forum has not been working for me. I think I may have narrowed the issue down to a DX issue. I am using JC1’s profile and key.
https://www.benchmarksims.org/forum/showthread.php?25538-jc1-Profile
I run the profile in Target and make sure the correct key is loaded in BMS. Currently I am trying to resolve the inability to deploy the speed brakes.
Here is the relevent entry in the key file:
Speedbrake
AFBrakesIn 30 8 -2 0 0x0 -1 SPDF
AFBrakesOut 31 8 -2 0 0x0 -1 SPDBBelow is the Target Script.
//Speedbrake //SPDF DX31
//keyfile controlled //Shifted, SimDoNothing
//Unshifted, AFBrakesIn//SPDB DX32
//Shifted, SimDoNothing
//Unshifted, AFBrakesOutIt is my understanding that the key file defines the function of the speed brake - that I do not need to include a script in Target. Should I try to force the function with a script?
Any help would be appreciated.
Blain
-
I think it would be best to not use the Target software for items that can be setup using the Excel program located in the documents folder.
Using that editor, makes it really easy and reliable to use DX.
The Only thing I had for foxy was the use of wheel brakes on the ground with the paddle switch, which was included with Dunc’s profile, mind you this is for a cougar, but I think it should be the same.
-
TARGET (or driver defaults) determines what logical controller output results from physical controller input.
KEY file determines what simulation behavior result from logical controller input.The code in post #1 shows AFBrakesIn 30 8 -2 0 0x0 -1 SPDF which is given input button ID 30, return callback AFBrakesIn.
To provide input button ID 30 the logical controller must output button 31 is pressed.
Below is the Target Script.
//Speedbrake //SPDF DX31
//keyfile controlled //Shifted, SimDoNothing
//Unshifted, AFBrakesIn//SPDB DX32
//Shifted, SimDoNothing
//Unshifted, AFBrakesOutThere’s no script there except for comments. Here’s an example line which would bind speedbrake forward to DX4 MapKey(&Throttle, SPDF, DX4);
-
TARGET (or driver defaults) determines what logical controller output results from physical controller input.
KEY file determines what simulation behavior result from logical controller input.The code in post #1 shows AFBrakesIn 30 8 -2 0 0x0 -1 SPDF which is given input button ID 30, return callback AFBrakesIn.
To provide input button ID 30 the logical controller must output button 31 is pressed.
There’s no script there except for comments. Here’s an example line which would bind speedbrake forward to DX4 MapKey(&Throttle, SPDF, DX4);
Thanks for your assistance. I am running the stick and throttle combined so my understanding is that I have 32 DX assignments, which I can assign to any button or switch on the stick/throttle combination. I believe this was discussed in the following thread:
https://www.benchmarksims.org/forum/showthread.php?24782-DX
As I understand it, the TARGET script binds the button to a DX assignment in the key file, which is itself bound to a call back, in this case air brakes in and out.
So it should look like the following in the TARGET script.
MapKey(&Throttle, SPDF, DX32);
MapKey(&Throttle, SPDB, DX31);While troubleshooting last night I had the same thought regarding the need to bind the DX assignment to the throttle. (If that is so then why do so many profiles just have a comment - key file controlled?) Regarding the need to bind buttons to the DX assignment is that true also for TMS, DMS, CMS? I included the script above and it did not work. I tested the function in/out airbrakes on the keyboard and it seemed to work. I also tested the buttons in the event tester and it seemed to work also.
I am wondering whether it is a USB issue, or an issue the button press not being received by the sim. BTW - I have the HOTAS connected to a USB 3.0/2.0 connector.
I went back to the TARGET GUI in attempt to create a profile. I could not get the pickle button - S2 - to work. I used both the SPC key command and the DX assignment. I set the pickle button as both a pulse and hold but it would not release weapons. I had to increased the character generation rate/pulse event time in order for it work. But this adjustment affected the trigger detent. I believe the trigger detent is set to hold. But once I pressed the trigger it would not stop.
-
I ended up trying Mudd’s profile and it seemed to work. Then I inserted the script to exclude the TM TFRP rudders so only the stick and throttle would be combined devices and noticed that none of my buttons worked. After trying a different scripts I pulled out the TFRP and tried it. The buttons worked. Then I remembered something a discussion about device sorting. That was it. I had reinstalled BMS to fix the AP function. That must have altered device the sorting of the devices. I put TM combined at the top and the TFRP second. Now I can go about trying my hand at modifying some of the profiles I downloaded. It was very frustrating but the experience over the past several weeks has helped me to learn a little about scripting. Thanks to everyone who gave suggestions!
-
If that is so then why do so many profiles just have a comment - key file controlled?
As I understand it the script isn’t all of the binds. If you don’t explicitly bind a button TARGET will do it for you anyway. To actually get a null result the button must be explicitly bound to 0, a.k.a. the null output. A comment “handled by key file” suggests that the explicit bind was omitted from the script and the key file relies on this secondary behavior.
The other possibility is that particular TARGET script is excluding the joystick but puts the comments in the script for the joystick anyway as a reminder.
-
As I understand it the script isn’t all of the binds. If you don’t explicitly bind a button TARGET will do it for you anyway. To actually get a null result the button must be explicitly bound to 0, a.k.a. the null output. A comment “handled by key file” suggests that the explicit bind was omitted from the script and the key file relies on this secondary behavior.
The other possibility is that particular TARGET script is excluding the joystick but puts the comments in the script for the joystick anyway as a reminder.
So if I understand correctly, its safer to bind in TARGET. The TM script manual is very basic. I wish there was something more comprehensive out there. There is scripting in some of the profiles that is not really covered that well in the manual, and TM’s support kind of sucks.
Prior to the issue, I was aware of the sorting issue. But I didn’t think it applied to rudder pedals as it has not buttons. I guess it does…Something good to know.
Thanks for you thoughts on the matter.