Jump to content

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


Recommended Posts

On 11/19/2021 at 12:21 AM, Cackles said:

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?

 

 

I just redo what you did to be able to mix mouse emulation and keystroke with this 120 button hack. I should had a look sooner in this thread, i would have save time.

@sedenion : why did you restrain device creation to joystick only ? Generate keystroke or setup mouse emulation is a common need, and by default it will not work without any error message with your hack. We were 2 people to spend time on it, so could you update your package as described by @Cackles for other users ?

P8700K @4.8 GHz, 3080ti, 32 GB RAM, HP reverb Pro.

I spend my time making 3dmigoto VR mods for BoS and DCS instead of flying, see https://www.patreon.com/lefuneste

Link to comment
Share on other sites

56 minutes ago, lefuneste01 said:

I just redo what you did to be able to mix mouse emulation and keystroke with this 120 button hack. I should had a look sooner in this thread, i would have save time.

@sedenion : why did you restrain device creation to joystick only ? Generate keystroke or setup mouse emulation is a common need, and by default it will not work without any error message with your hack. We were 2 people to spend time on it, so could you update your package as described by @Cackles for other users ?

The goal of my mapping script is to create a virtual device with only DX buttons, in this context there is no need for virtual mouse or keyboard. You are free to adapt and customize it as your needs. Also notice that the "DX++ module" (wich is a very small piece of code) is not copyrighted, you can freely take it, embed it in your own mapping script...


Edited by sedenion
Link to comment
Share on other sites

On 11/19/2021 at 12:21 AM, Cackles said:
  // -- 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?

You right, it's an error. The mapping for EACOFF should be DX60... Notice this error occure only if you disable the LED assignment for EAC switch.

Link to comment
Share on other sites

Well, I released new version, available for download with some little changes and fix:

v1.6 (2021-11-26)
 - Add support to exclude Airbus Edition devices.
 - Add options to change LEDs intensity and disable Throttle backlight.
 - Fix wrong mapping for EACOFF.

- Fix virtual keyboard and mouse not created as usual.

 

 


Edited by sedenion
Link to comment
Share on other sites

40 minutes ago, sedenion said:

The goal of my mapping script is to create a virtual device with only DX buttons, in this context there is no need for virtual mouse or keyboard. You are free to adapt and customize it as your needs. Also notice that the "DX++ module" (wich is a very small piece of code) is not copyrighted, you can freely take it, embed it in your own mapping script...

 

I did it for myself, as Cackles, but it should be easier for newcomers who may want to extend it...They may go back to standard because of this.

And it won't change the behaviour of your great script.

Could you at least put a sentence  on first post to explain that Mouse and Keyboard are disabled by default and what to do in case of ?

P8700K @4.8 GHz, 3080ti, 32 GB RAM, HP reverb Pro.

I spend my time making 3dmigoto VR mods for BoS and DCS instead of flying, see https://www.patreon.com/lefuneste

Link to comment
Share on other sites

39 minutes ago, lefuneste01 said:

I did it for myself, as Cackles, but it should be easier for newcomers who may want to extend it...They may go back to standard because of this.

And it won't change the behaviour of your great script.

Could you at least put a sentence  on first post to explain that Mouse and Keyboard are disabled by default and what to do in case of ?

Well, I uploaded a new 1.6 version with usual virtual Keyboard+Mouse creation.

Link to comment
Share on other sites

The Autopilot script function has me confused as to how to properly implement it for A-10, F-18, F-16.  Has anyone done a Youtube video of how to set that up to work properly on the control settings page, reading how someone does it is hard for me to visualize sometimes. 

Hoss

Sempre Fortis

Link to comment
Share on other sites

45 minutes ago, 352nd_Hoss said:

The Autopilot script function has me confused as to how to properly implement it for A-10, F-18, F-16.  Has anyone done a Youtube video of how to set that up to work properly on the control settings page, reading how someone does it is hard for me to visualize sometimes. 

Hoss

What are (all) available commands related to autopilot for each modules ?

Link to comment
Share on other sites

It's the engage/disengage function and the LASTE switch (Path/Alt-Hdg/Alt) settings.  How to coordinate them with which ever A/P function from whichever module I assign those three functions too, not matter their module name (Aircraft).  That's why I was asking if someone did a youtube tutorial on it.  Seeing is completely understanding.................................  at least for this seasoned citizens old brain....

Cheers and thanks

Hoss

Sempre Fortis

Link to comment
Share on other sites

I get a compile error..................

Runtime error: Symbol not found: A30Pilot in main (line183 in Run_Complete.tmc) The Simple also fails line 184, same script though...

The file is clean, no changes made by me and I get the runtime error, I go back to 1.5 and it compiles with no errors. 

if(!USE_A320PILOT)   Configure(&A320Pilot, MODE_EXCLUDED);


Edited by 352nd_Hoss

Sempre Fortis

Link to comment
Share on other sites

7 hours ago, 352nd_Hoss said:

I get a compile error..................

Runtime error: Symbol not found: A30Pilot in main (line183 in Run_Complete.tmc) The Simple also fails line 184, same script though...

The file is clean, no changes made by me and I get the runtime error, I go back to 1.5 and it compiles with no errors. 

if(!USE_A320PILOT)   Configure(&A320Pilot, MODE_EXCLUDED);

Okay, for this, download and install the latest TARGET Software version (3.0.20)

https://support.thrustmaster.com/en/product/hotaswarthog-en/


Edited by sedenion
Link to comment
Share on other sites

8 hours ago, 352nd_Hoss said:

It's the engage/disengage function and the LASTE switch (Path/Alt-Hdg/Alt) settings.  How to coordinate them with which ever A/P function from whichever module I assign those three functions too, not matter their module name (Aircraft).  That's why I was asking if someone did a youtube tutorial on it.  Seeing is completely understanding.................................  at least for this seasoned citizens old brain....

I do not have Youtube video as you request, but I can explain how the Advanced AP logic behav, since I have coded it. It may be suitable or not depending the available commands (and their behavior) for the aircraft. Maybe you simply cannot use this Advanced AP properly because available bindable commands and their behavior are not suitable.

Link to comment
Share on other sites

21 hours ago, sedenion said:

Well, I uploaded a new 1.6 version with usual virtual Keyboard+Mouse creation.

Thanks for the future users of your wonderful hack!

If only I would have seen it before, it would have save me a lot of time...My future AH64 profile will be based on your script !

P8700K @4.8 GHz, 3080ti, 32 GB RAM, HP reverb Pro.

I spend my time making 3dmigoto VR mods for BoS and DCS instead of flying, see https://www.patreon.com/lefuneste

Link to comment
Share on other sites

  • 2 weeks later...
On 10/25/2021 at 11: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.

 

HI Sedenion,

there passed some time, when you remember, i was the guy who had this strange stab trim problem. (Continuesly it trimmed up to max level)

The strange thing and the cause of the problem was, windows maps 2 devices when they are already plugged in, in an usb port. Thrustmaster warthhog joystick + throttle, so the system recognizes two devices. Then i usually start the script editor, then i start to run your script and then it generates the virtual combined device you programmed. Then  when this is successfully done, i start DCS.

In DCS there i see the virtual combined device (bla bla, where i can set the controls in the controls menu) there DCS lists still the Thrustmaster Joystick and the thrustmaster throttle as device and the virtual combined device, even when the Thrustmaster throttle and joystick devices where set to "disabled" in the control menu of dcs (Both disabled!). There still were mappings and axis set. They kind of still where active when you play dcs. After clearing all axis or the mapped buttons, set for trimming, the STAB TRIM PROBLEM completely dissapeared for ever.  😆

So it seems that even when devices are set to disabled in the controls menu in dcs, they are still active. So hey ED, there is a small bug there.

Sedenion and all other supporters here in the forum big greetings abnd thx, just want to inform you back that the script is running very good untill yet.

Keep up the good work


Edited by GrapeFruiT
Link to comment
Share on other sites

17 hours ago, GrapeFruiT said:

In DCS there i see the virtual combined device (bla bla, where i can set the controls in the controls menu) there DCS lists still the Thrustmaster Joystick and the thrustmaster throttle as device and the virtual combined device, even when the Windows Thrustmaster device recognition devices where set to disabled in the control menu of dcs (Both where disabled). There still had been mappings and axis set. They kind of still where active when you play dcs. After clearing all axis or the mapped buttons, set for trimming etc, the STAB TRIM PROBLEM completely dissapeared for ever.  😆

So it seems that even when devices are set to disabled in the controls menu in dcs, they are still active. So hey ED, there is a small bug there.

Great ! Anyway, what happen in your DCS is not normal behavior. On my side, DCS correctly detect devices's activation and desactivation and deletes non activated ones... Maybe there is something in your configuration, or drivers, that induce this.

Link to comment
Share on other sites

  • 4 weeks later...

Hello sedenion,

 

I really like this contribution of the .tmc!

However my throttle find and recognize all DX button, but my A-10c joystick will not recognize I haven't changed the script at all and the joystick works find in Windows joystick control panel! and it doesn't register in Device Analyzer.

Editt: It seems to work now with my joystick axis, but the only issue I've got now is the PATH/ALT/HDG and ALT switch, It recognize in device Device Analyzer but not in DCS

Kind regards

/e33et


Edited by e33et
Got it almost to work 100%
Link to comment
Share on other sites

On 2/15/2022 at 5:46 PM, e33et said:

Editt: It seems to work now with my joystick axis, but the only issue I've got now is the PATH/ALT/HDG and ALT switch, It recognize in device Device Analyzer but not in DCS

The LASTE Switch (PATH/ALT/HDG) has a special behavior in relation with the AP ENGAGE / DISENGAGE button. You can disable this behavior by setting the AP_MODULE macro to 0 in the Run_*.tmc file


Edited by sedenion
Link to comment
Share on other sites

14 hours ago, e33et said:

but my A-10c joystick will not recognize I haven't changed the script at all and the joystick works find in Windows joystick control panel! and it doesn't register in Device Analyzer.

I don't think this is a problem coming from running sedenion's script. I use my own (basic) Target scripts and on my end my throttle isn't recognized in Targets Device Analyzer either. It used to be recognized but somehow now it doesn't anymore (but works just fine). I haven't figured out why yet.

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

  • 3 weeks later...

In the past, I had the ModDX++ script working with 120 DX buttons. Due to problems with Windows, I had to delete it and start again. I have Warthog Throttle & Joystick and TFRP T.Flight Rudder. As before, I have added the "modules/ModDX++.tmh" to the "target.tmh" ,but when I press "compile", I get the following error...

Compile Error:Symbol not found: CREATE_JOYSTICK in modules/ModDX++.tmh at line 172

My ModDX++.tmh file around line 172 looks like this...

166 // The maximum possible DX button count is fixed by the driver to 120, any 
167 // greater value results in an immediate Windows BSOD. 
168 // Any value greater than 120 for 'n' parameter will be automatically clamped to 
169 // 120 to prevent crash.
170 //
171
172 int InitMoreDX(int n, alias h, int cfg=CREATE_JOYSTICK+CREATE_KEYBOARD+CREATE_MOUSE)
173 {
 174 // clamp value to 120, more than 120 cause a BSOD due to software limitation
 175 if(n > 120) n = 120;

 

I am not a coder and unfamiliar with the terminology. I would be very grateful for any help how to fix this problem.

Regards,

OWL282820


Edited by OWL282820
Spelling
Link to comment
Share on other sites

On 3/6/2022 at 8:57 PM, OWL282820 said:

I have added the "modules/ModDX++.tmh" to the "target.tmh"

That's why you have errors. You must include ModDX++.tmh file AFTER the target.tmh file, not before, and certainly not inside:

include "target.tmh"
include "modules/ModDX++.tmh"

Then, you must call the "InitMoreDX()" function (with propers parameters) instead of the "Init()" function within your main() entry. Everything is explained inside the ModDX++.tmh file, as comments.

int main()
{
  if(InitMoreDX(64, &EventHandle, CREATE_JOYSTICK)) 
    return 1;
}

In the above example, 64 is the count of buttons of the virtual joystick to create. You can create a virtual joystick with up to 120 buttons. Other parameters are the ones of the usual "Init" function. Anyway, if you are not familiar with programming, I encourage you to simply use my ready-to-use mapping script, and, if you want, modify it as your tasts :
https://www.digitalcombatsimulator.com/fr/files/3318341/


Edited by sedenion
Link to comment
Share on other sites

3 hours ago, sedenion said:

That's why you have errors. You must include ModDX++.tmh file AFTER the target.tmh file, not before, and certainly not inside:

include "target.tmh"
include "modules/ModDX++.tmh"

Then, you must call the "InitMoreDX()" function (with propers parameters) instead of the "Init()" function within your main() entry. Everything is explained inside the ModDX++.tmh file, as comments.

int main()
{
  if(InitMoreDX(64, &EventHandle, CREATE_JOYSTICK)) 
    return 1;
}

In the above example, 64 is the count of buttons of the virtual joystick to create. You can create a virtual joystick with up to 120 buttons. Other parameters are the ones of the usual "Init" function. Anyway, if you are not familiar with programming, I encourage you to simply use my ready-to-use mapping script, and, if you want, modify it as your tasts :
https://www.digitalcombatsimulator.com/fr/files/3318341/

 

Many thanks. That did  it.

Link to comment
Share on other sites

  • 2 weeks later...

Hello folks,

Currenly I've got 2 Cougar MFD's, active and then Hotas Warthog throttle enabled with sedenion scripts, when I run it I can only output one of the two MFD, has someone got it to work?

My drivers is correctly installed and tried to reinstalled as well.

I've doesn't see any error in the script editor or device analyzer!

 

Kind regards

/e33et


Edited by e33et
Link to comment
Share on other sites

  • 3 weeks later...

I'd really appreciate if someone  could help me with his mod script (if sedenion are unable to reply), if anyone has encounter the same issue and has solution for the cause, otherwise it works great both with warthog/a-10c joystick.

 

Cheers

Link to comment
Share on other sites

  • Recently Browsing   0 members

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