Jump to content

Thrustmaster Combined Full DX Mapping (extending the 32 DX buttons limit)


Recommended Posts

9 minutes ago, GrapeFruiT said:

I also know this seems to be unbelievable, yesterday i thought after the full dcs repair the problem was fixed, it was gone, and suddenly it appeared today again, while in a flight sqadron event, this is like murphey's law happening, always when its important. The strange thing is, for now it suddenly dissappeared, i have to check it out again, and make sure, the deamon fucks off out of my joystick...i will report back again.

I don't know what happen exactly, but I am pretty sure this has nothing to do with the script... This appear to be a pure hardware problem, like a bad electrical contact in the HAT switch that cause "false" and unwanted button press...

Link to comment
Share on other sites

14 hours ago, sedenion said:

I don't know what happen exactly, but I am pretty sure this has nothing to do with the script... This appear to be a pure hardware problem, like a bad electrical contact in the HAT switch that cause "false" and unwanted button press...

Yeah, this could really be, yesterday, i opened my mind. I am using a usb-a 3.0 port hub with powersupply. Maybe it is overloaded and still it isn't enough energy for all connected devices available, 6 of 7 ports are in use. 3 MFDs, throttle, joystick, and rudders. I tested it yesterday late night again, for a few sessions  i hadn't any problems with this weird problem, no trim up, no strange behaviour in dcs. Before this try yesterday, i had this listed weird problems. And also yesterday in the flight sqadron event. "Murphy's law"

When this problems will occure again, i will try out to plug the joystick usb-port directly into my computer direct into my tower pc mainboard ports, not the USB Hub. Directly into my tower pc etc. Just to make sure if this happens all again. (Then it has to be an bad electrical contact in my joystick hat button)

Im sorry about the stress ive been creating. Also thanks for your patience and support. And again thanks for your nice effort and your nice script to use the hardware with all buttons and functions, especially that you share it with the community.

Sincerely yours and good flights

Link to comment
Share on other sites

Hello people.

Hello Sedenion, i tested everything. Bad news.

Now i have to say, it has to rely to your script. Even when my joystick isn't plugged in. (Not connected to an usb port on the pc). Even unmapped in dcs control settings, it trims up the Flaps to max.

F/A-18C on quickstart missions, etc, always to max trim behaviour. Means 24° NU Position, check it out to fly the F/A-18C, you'll see the mistake.

So its definetely not my joystick, not my pcs, not dcs(there im not sure). Maybe there is an incompability, the only one mod i did use, is the ReshadeVR Sharpen Colors Mod(Valve Index VR). But also without mod, i had the same results, causing the Trim issue. Workaround is still how i mentioned it in previous posts.

When i turn off your script, the bug doesn't happen. Pls investigate, try to fly an f18 with your lates script version 1.5, and turn off all apmods, and bind or dont the trim functions in dcs, then when you start, doesn't depend on starting flap position (Full, Auto, Half) it always stab trims to 24°.

 

Link to comment
Share on other sites

22 minutes ago, GrapeFruiT said:

Hello people.

Hello Sedenion, i tested everything. Bad news.

Now i have to say, it has to rely to your script. Even when my joystick isn't plugged in. (Not connected to an usb port on the pc). Even unmapped in dcs control settings, it trims up the Flaps to max.

This is simply technically impossible. This mean there is something you missed, something you have not spotted that create an input. An axis, another device... I don't know, but the TARGET software itself cannot interact directly with DCS (or any other software) in such manner, it simply can't.

28 minutes ago, GrapeFruiT said:

F/A-18C on quickstart missions, etc, always to max trim behaviour. Means 24° NU Position, check it out to fly the F/A-18C, you'll see the mistake.

I don't have the F/A-18C module.

28 minutes ago, GrapeFruiT said:

So its definetely not my joystick, not my pcs, not dcs(there im not sure). Maybe there is an incompability, the only one mod i did use, is the ReshadeVR Sharpen Colors Mod(Valve Index VR). But also without mod, i had the same results, causing the Trim issue. Workaround is still how i mentioned it in previous posts.

Reshader have nothing to do with that, you can exclude this theory. 

30 minutes ago, GrapeFruiT said:

When i turn off your script, the bug doesn't happen. Pls investigate, try to fly an f18 with your lates script version 1.5, and turn off all apmods, and bind or dont the trim functions in dcs, then when you start, doesn't depend on starting flap position (Full, Auto, Half) it always stab trims to 24°.

I cannot investigate... I don't have your setup, I don't have F/A-18C module, I have no access to your computer... The only thing I can tell, is that if something happen in DCS, this is triggered by an input, either a button, an axis, or emulated keyboard or mouse, that trigger a command which act on trim, so you have to discover what command, and what input. Computers are not magical, they are logical, so, be logical. So, proceed by elimination, try and check... First, to avoid any driver or software bug,  uninstall then reinstall Warthog drivers and TARGET software with latest versions, also verify you flashed your devices with the latest firmware...

Link to comment
Share on other sites

Hello,  i tried some other other target scripts, this also doesn't happen. With your script im afraid this happens.

I noticed in device testing (DEVICE ANALYZER), that other scripts, the DMS Hat is set up as point of view hat, the H1 Trim is set as button.

In your script is it set to the use of buttons, and the H1 Trim is set as point of view hat. Means it is some cross changed...

Im at a point, close to stop to use target and live like the rest 98% of users not using target, and not use middle positions etc....

I hate target and thrustmaster hotas it is definitely not worth its money. So when you buy a joystick, don't buy Thrustmaster Hotas or target, you have no software support from the devs, and your joystick and throttle can't even be used full functional. So without C++ programming etc, you are fucked paying 400€+ so FUCK THRUSTMASTER HOTAS.

 

28 minutes ago, sedenion said:

This is simply technically impossible. This mean there is something you missed, something you have not spotted that create an input. An axis, another device... I don't know, but the TARGET software itself cannot interact directly with DCS (or any other software) in such manner, it simply can't.

I don't have the F/A-18C module.

Reshader have nothing to do with that, you can exclude this theory. 

I cannot investigate... I don't have your setup, I don't have F/A-18C module, I have no access to your computer... The only thing I can tell, is that if something happen in DCS, this is triggered by an input, either a button, an axis, or emulated keyboard or mouse, that trigger a command which act on trim, so you have to discover what command, and what input. Computers are not magical, they are logical, so, be logical. So, proceed by elimination, try and check... First, to avoid any driver or software bug,  uninstall then reinstall Warthog drivers and TARGET software with latest versions, also verify you flashed your devices with the latest firmware...

Do you have maybe a flight sqadron member or a friend with the Thrustmaster Hotas (Throttle + Stick (F16/A10)) who could also try this? Who owns the module F/A-18C ?

Link to comment
Share on other sites

23 minutes ago, GrapeFruiT said:

Hello,  i tried some other other target scripts, this also doesn't happen. With your script im afraid this happens.

I noticed in device testing (DEVICE ANALYZER), that other scripts, the DMS Hat is set up as point of view hat, the H1 Trim is set as button.

In your script is it set to the use of buttons, and the H1 Trim is set as point of view hat. Means it is some cross changed...

POV Positions = Buttons. Except in some low level software aspect relative to HID spec, this is the same thing. 

The hardware maping (meaning, as it is recognized natively by HID interface, without script, withou virtual device) of the Warthog Stick (F18 or F16) is that H1 IS the POV HAT, and my script simply replicate this hardware configuration.

Your problem cannot come from there, forgots this.

23 minutes ago, GrapeFruiT said:

Do you have maybe a flight sqadron member or a friend with the Thrustmaster Hotas (Throttle + Stick (F16/A10)) who could also try this? Who owns the module F/A-18C ?

 
No, I not member of any squadron. Ask somebody have the F/A-18C module and Warthog to try my script, and ask him if it has the same problem. But I think not, I think there is something specific in your setup that cause that.

Edited by sedenion
Link to comment
Share on other sites

Hey i tried something out.

I disabled 2 command lines, even without using them (lmfd, rmfd) set to 0. grafik.png

My problem still occured. Now i had the feelings, there could be something with the mfds...

Strange thing is i disabled 2 command lines later.

grafik.png

Now, it did stop. No sudden instant trimmings etc.

Hopefully this is it.  I have 3 MFDs, working. Don't know if has a connection to the issues happened, with the script, because the script just has left and right...

I dont know, so this is what i did, and for 3 test sessions, it is not happening again.

Link to comment
Share on other sites

27 minutes ago, GrapeFruiT said:

Hey i tried something out.

I disabled 2 command lines, even without using them (lmfd, rmfd) set to 0.

My problem still occured. Now i had the feelings, there could be something with the mfds...

Strange thing is i disabled 2 command lines later.

Now, it did stop. No sudden instant trimmings etc.

Hopefully this is it.  I have 3 MFDs, working. Don't know if has a connection to the issues happened, with the script, because the script just has left and right...

I dont know, so this is what i did, and for 3 test sessions, it is not happening again.

The script cannot compile with the two first lines you "disabled" unless you also "disable" the lines 167, 168, 194 and 195... The two other lines (the include directives) have pratically no effect since there is no mapping, included files are simply placeholder with a function that return 0.

Anyway, with "disabled" lines as you show in your screenshots, the script cannot run, and the output should show you a runtime error.


Edited by sedenion
Link to comment
Share on other sites

I have to add... Instead of the script, I think you better investigate first in the DCS side to determine what command is triggered to act to the F18 trim/elevators. It must be a command or axis command somewhere, in any section that you don't spot, and is triggered by something. Once you found that, then we could determins how the script may influence this.


Edited by sedenion
Link to comment
Share on other sites

Also remember that once the script is runing, it is like you have a new device plugged to your computer, DCS detects a totaly new device (the virtual Combined Device) whith its own controls / buttons assignations. In the same time, the usual two Warthog device disapear (they are temporarly disabled by TARGET). 

This mean that you must verify the DCS commands setup and assigned buttons/axes while the script is running, because this is only at this moment that the "virtual Combined  Device" is detected by DCS. Once you stop the script, the Combined Device disapear (like if you unpluged) and the two Warthog physical devices come back, with their own specific commands setup.


Edited by sedenion
Link to comment
Share on other sites

Hi,

 I'm trying the script from this thread, it works perfectly, but I only see a strange effect when I start a F-18 mission. The stick and throttle axles initialise on non-cantered positions, even if the physical stick is centered. When I move the stick everything goes right. Someone saw this behaviour?

In DCS I have checked the option for synchronising the physical position with the simulation.

Thanks!

Link to comment
Share on other sites

42 minutes ago, Nahemoth said:

In DCS I have checked the option for synchronising the physical position with the simulation.

That's your problem. This option is bugged, somehow it seems like it remembers your last input or something like that. Better uncheck it.

Win11 Pro 64-bit, Ryzen 5800X3D, Corsair H115i, Gigabyte X570S UD, EVGA 3080Ti XC3 Ultra 12GB, 64 GB DDR4 G.Skill 3600. Monitors: LG 27GL850-B27 2560x1440 + Samsung SyncMaster 2443 1920x1200, HOTAS: Warthog with Virpil WarBRD base, MFG Crosswind combat pedals, TrackIR4, Rift-S.

Personal Wish List: A6 Intruder, Vietnam theater, decent ATC module, better VR performance!

Link to comment
Share on other sites

Indeed, as far as I know this is not specific to this script, TARGET or even warthog, but how input data are gathered through Windows HID API. In short, unless you change device state (button or axis) no data is received and programs have no ability to "poll" device state nor query 'last device data'. Programs have to implement some workaround on their own, and this is unperfect.

Link to comment
Share on other sites

  • 3 weeks later...

Hi, so to me this is the single best thing I have found all year, it does exactly what I need, I just don't know how to make it do that. 

I am trying to change the buttons and triggers to keyboard outputs and can't get them to work. I don't know what I am doing wrong and even reading the manual I can't figure it out even though I am basically using the code in the script and the examples in the manual.

I would really-really appreciate some help with this.

I changed the value for F18 to 0.

I've tried a lot of things and you'd probably laugh at half them, but I thought editing MapJoystick.tmh would work. I tried changing TG1 and S4 to things like 'b' and 'c' (just for testing sake), I tried making a tmh file and the only result I was getting was for either nothing happening or it locking up the joystick.

 

If someone could give me an example of what it is I need to change that would be great and I'm guessing reading through some of the posts and other threads this is something basic I am missing.

Link to comment
Share on other sites

8 hours ago, Cackles said:

Hi, so to me this is the single best thing I have found all year, it does exactly what I need, I just don't know how to make it do that. 

I am trying to change the buttons and triggers to keyboard outputs and can't get them to work. I don't know what I am doing wrong and even reading the manual I can't figure it out even though I am basically using the code in the script and the examples in the manual.

I would really-really appreciate some help with this.

I changed the value for F18 to 0.

I've tried a lot of things and you'd probably laugh at half them, but I thought editing MapJoystick.tmh would work. I tried changing TG1 and S4 to things like 'b' and 'c' (just for testing sake), I tried making a tmh file and the only result I was getting was for either nothing happening or it locking up the joystick.

 

If someone could give me an example of what it is I need to change that would be great and I'm guessing reading through some of the posts and other threads this is something basic I am missing.

I think you should create a new topic in the Thrustmaster section, because your request have very little to do with the purpose of this current one.

Link to comment
Share on other sites

10 hours ago, Cackles said:

Hi, so to me this is the single best thing I have found all year, it does exactly what I need, I just don't know how to make it do that. 

I am trying to change the buttons and triggers to keyboard outputs and can't get them to work. I don't know what I am doing wrong and even reading the manual I can't figure it out even though I am basically using the code in the script and the examples in the manual.

This script is not for assigning keystrokes to various buttons but for assigning DX outputs to every button/switch/trigger combined with longpress and layer actions.
If you want to generate keystrokes, the standard scripting (like in the TARGET manual) is what you are looking for.
If you want more then 32 DX outputs available on a combined device (when a script runs it combines throttle and stick into one single device) you need to look for the standard 120DX file which replaces the default target.tmh file and start from there (the tmh files are not for editing in general, you should create/write a script with a tmc extention, not tmh, at least for starters).
Also, since you are trying to generate keyboard outputs I might be wrong but I don't think you understand what DX outputs are.

 

targetdx120.tmh

Win11 Pro 64-bit, Ryzen 5800X3D, Corsair H115i, Gigabyte X570S UD, EVGA 3080Ti XC3 Ultra 12GB, 64 GB DDR4 G.Skill 3600. Monitors: LG 27GL850-B27 2560x1440 + Samsung SyncMaster 2443 1920x1200, HOTAS: Warthog with Virpil WarBRD base, MFG Crosswind combat pedals, TrackIR4, Rift-S.

Personal Wish List: A6 Intruder, Vietnam theater, decent ATC module, better VR performance!

Link to comment
Share on other sites

9 hours ago, sedenion said:

I think you should create a new topic in the Thrustmaster section, because your request have very little to do with the purpose of this current one.

Apologies, I'll wrap it up with a reply to the second response, thanks.

BTW, nice work.


Edited by Cackles
Link to comment
Share on other sites

10 hours ago, Lange_666 said:

This script is not for assigning keystrokes to various buttons but for assigning DX outputs to every button/switch/trigger combined with longpress and layer actions.
If you want to generate keystrokes, the standard scripting (like in the TARGET manual) is what you are looking for.
If you want more then 32 DX outputs available on a combined device (when a script runs it combines throttle and stick into one single device) you need to look for the standard 120DX file which replaces the default target.tmh file and start from there (the tmh files are not for editing in general, you should create/write a script with a tmc extention, not tmh, at least for starters).
Also, since you are trying to generate keyboard outputs I might be wrong but I don't think you understand what DX outputs are.

 

targetdx120.tmh 30.52 kB · 4 downloads

Thanks I'll open another thread and put in there what I need.

Link to comment
Share on other sites

On 10/25/2021 at 2:22 PM, sedenion said:

Also remember that once the script is runing, it is like you have a new device plugged to your computer, DCS detects a totaly new device (the virtual Combined Device) whith its own controls / buttons assignations. In the same time, the usual two Warthog device disapear (they are temporarly disabled by TARGET). 

This mean that you must verify the DCS commands setup and assigned buttons/axes while the script is running, because this is only at this moment that the "virtual Combined  Device" is detected by DCS. Once you stop the script, the Combined Device disapear (like if you unpluged) and the two Warthog physical devices come back, with their own specific commands setup.

 

I see all of them, plus my BlackHog on the settings screen, I always go to the top of the Stick/Throttle/BlackHog and clear all of the assignments first in Axis and then in the general settings for those three controllers.  I'll set my axis on the TMWH Combined column and then set up the keypress on the combined row making sure there are no other Joy0, 1, 2, conflicts with the Joy3 (Combined) column.  Then the 128 script works as advertised.  I'm sure others see different things on their settings page, but the concept still applies no matter what else you have connected. 

Sempre Fortis

Link to comment
Share on other sites

11 minutes ago, 352nd_Hoss said:

I see all of them, plus my BlackHog on the settings screen, I always go to the top of the Stick/Throttle/BlackHog and clear all of the assignments first in Axis and then in the general settings for those three controllers.  I'll set my axis on the TMWH Combined column and then set up the keypress on the combined row making sure there are no other Joy0, 1, 2, conflicts with the Joy3 (Combined) column.  Then the 128 script works as advertised.  I'm sure others see different things on their settings page, but the concept still applies no matter what else you have connected. 

I understood absolutely nothing...

Link to comment
Share on other sites

14 hours ago, sedenion said:

I think you should create a new topic in the Thrustmaster section, because your request have very little to do with the purpose of this current one.

Hi, I'm really sorry about crashing your thread. It turns out I had it working 2 days ago ... Yes, I cried, a lot. Anyway problem solved. I had to add the keyboard and mouse to the script, which I previously had. When I tested it-it must have been one of the times FAST or the joystick crashed or as I found it keeps using the previous saved version and I didn't know it done things like that until my 3rd day, yesterday, so I had already went back to the original download version to try something else not thinking about that piece of code.

  // Init virtual device (using DX++ Module)
  if(InitMoreDX(DX_COUNT, &EventHandle, CREATE_JOYSTICK+CREATE_KEYBOARD+CREATE_MOUSE)) 
    return 1;

I really do mean it when I say this 120 button hack is the single best thing I have found. Now I can send a keyboard command and change a panel's function and I can do things like assign S4 L_Alt and use that to have a left alt + trigger fire key binding and I can do the same with S3 and alt ctrl etc.

I'm more than happy I found the download because I packed my Warthog away 5 years ago since my MS was getting to me and just unpacked it because I want to get use out of it before my new found arthritis gets any worse.
I also found this while butchering your code:

 

  // -- EAC (Radar Altimeter) --------------------------------------------------
  if(LED_EAC) {
    MapKey( &Dev,    EACON,    CHAIN(DX59, LED(&Dev,LED_ONOFF,LED_CURRENT+LED_EAC)));
    MapKey( &Dev,    EACOFF,   CHAIN(DX60, LED(&Dev,LED_ONOFF,LED_CURRENT-LED_EAC)));
  } else {
    MapKey( &Dev,    EACON,    DX59);
    MapKey( &Dev,    EACOFF,   DX61);
  }
  // -- RDR (Radar Altimeter) --------------------------------------------------
  if(LED_RDR) {
    MapKey( &Dev,    RDRNRM,   CHAIN(DX61, LED(&Dev,LED_ONOFF,LED_CURRENT+LED_RDR)));
    MapKey( &Dev,    RDRDIS,   CHAIN(DX62, LED(&Dev,LED_ONOFF,LED_CURRENT-LED_RDR)));
  } else {
    MapKey( &Dev,    RDRNRM,   DX61);
    MapKey( &Dev,    RDRDIS,   DX62);
  }

It might be because of the way it works, but shouldn't that be EACOFF DX60 or is it the way the logic works? I think it's the only switch that actually sends a signal in all position is it not, so I dunno if you have that reason or something.

Can I message you about me uploading this somewhere and send you the stripped down version I made for approval?

 


Edited by Cackles
Link to comment
Share on other sites

3 hours ago, sedenion said:

I understood absolutely nothing...

I'll take a screen shot and add it to the post. I used to see the Stick and the Throttle on the settings page, they are gone now, but you can see when I choose a plane I have not set up the Axis commands are all spread out.  I also go in and clear DX inputs that are on Joystick v.2.04 and the Crosswinds get some as well.  Those all have to be cleared before I even try to assign dx commands via sedenion's 128dx script.  See what I'm talking about now?.

 

Hoss

 

joy2.png


Edited by 352nd_Hoss

Sempre Fortis

Link to comment
Share on other sites

7 hours ago, 352nd_Hoss said:

I'll take a screen shot and add it to the post. I used to see the Stick and the Throttle on the settings page, they are gone now, but you can see when I choose a plane I have not set up the Axis commands are all spread out.  I also go in and clear DX inputs that are on Joystick v.2.04 and the Crosswinds get some as well.  Those all have to be cleared before I even try to assign dx commands via sedenion's 128dx script.  See what I'm talking about now?.

 

Hoss

Ok, I think you were actually more responding to GrapeFruiT...

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...