Falcon BMS Forum
    • Register
    • Login
    • Search
    • Categories
    • Unread
    • Recent
    • Unsolved
    • Popular
    • Website
    • Wiki
    • Discord

    DX or Target Profile

    Warthog
    4
    21
    964
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D
      D_Fens last edited by

      Hello fellow aviators,
      So after fixing the potentiometer two times now, and getting the cable for the pinky soldered once, my beloved X52 has finally died on meand this time i decided to not take any compromises and went for the Warthog.
      It will probably arive tomorrow and i’m really eagerly looking forward to it.
      There’s one thing, that’s still confusing me. In the Saitek section of the forum it seems to be common sense to program the stick via DX commands rather than to use the SST software since keyboard emulation is most likely to cause conflicts.
      But reading through the Warthog section it seems like a lot if not most users are using the Target software by thrustmaster.
      Since Kolbe’s spreadsheet has a Warthog section i guess that you can configure the stick via DX programming just like the Saitek. So where are the advantages of the Target software? Could anybody give me an example of a function that wouldn’t be possible with DX commands?

      Regards D_Fens

      1 Reply Last reply Reply Quote 0
      • Shadow
        Shadow last edited by

        Setting Axis curves, saturation and dead zones. Set a delayed response to a function and/or multi function to a single input.

        Most of my Hog I have converted to DX over years but still use some Target functions.

        F 1 Reply Last reply Reply Quote 0
        • F
          Frederf @Shadow last edited by

          TARGET is very programmable. I can make this button = DX17 even if normally it is DX5. So it can do programming and still never do “virtual keyboard” crap.

          This is my BMS TARGET script. You can see very interesting programing and I only made a very small number of virtual keyboard type binds. Otherwise it is all DX.

          include "target.tmh"
          
          int main()
          {
          	Configure(&HCougar, MODE_EXCLUDED); //Exclude all but WH Throttle
          	Configure(&Joystick, MODE_EXCLUDED);
          	Configure(&T16000, MODE_EXCLUDED);
          	Configure(&LMFD, MODE_EXCLUDED);
          	Configure(&RMFD, MODE_EXCLUDED);
          
              if(Init(&EventHandle)) return 1;
          
          	SetKBRate(250, 50);
          	SetKBLayout(KB_ENG);
          
            	//Cursor Axes
            	MapAxis(&Throttle, SCX, DX_X_AXIS);
            	SetSCurve(&Throttle, SCX, 0, 75, 0, 0, 0);
           	MapAxis(&Throttle, SCY, DX_Y_AXIS,AXIS_REVERSED);
           	SetSCurve(&Throttle, SCY, 0, 75, 0, 0, 0);
          
            	//Throttle Axes
            	//Left Throttle (4%-100% w/ 65-75 plateau @ 90%)
          	MapAxis(&Throttle, THR_LEFT, DX_THROTTLE_AXIS);
            	SetCustomCurve(&Throttle, THR_LEFT, LIST(0,4, 65,90, 75,90, 100,100));
          	//Cutoff Stepping
          	MapKey (&Throttle, IDLELON,	EXEC("TrimDXAxis(DX_THROTTLE_AXIS, 82);"));
          	MapKeyR (&Throttle, IDLELON, EXEC("TrimDXAxis(DX_THROTTLE_AXIS, SET(0));"));
            	//Right Throttle (Same profile as left)
          	MapAxis(&Throttle, THR_RIGHT, DX_Z_AXIS);
          	SetCustomCurve(&Throttle, THR_RIGHT, LIST(0,4, 65,90, 75,90, 100,100));
          	//Cutoff Stepping 
          	MapKey (&Throttle, IDLERON,	EXEC("TrimDXAxis(DX_Z_AXIS, 82);"));
          	MapKeyR (&Throttle, IDLERON, EXEC("TrimDXAxis(DX_Z_AXIS, SET(0));"));
          
          	//Button-Driven Axes
          	//Field of View
          	MapKey(&Throttle, MSR, AXIS(DX_XROT_AXIS,-250,10));
          	MapKey(&Throttle, MSL, AXIS(DX_XROT_AXIS, 250,10));
          	//Range Knob
          	MapKey(&Throttle, MSU, AXIS(DX_YROT_AXIS,-200,10));
          	MapKey(&Throttle, MSD, AXIS(DX_YROT_AXIS, 200,10));
          	//Antenna Elevation
          	MapKey(&Throttle, CHF, AXIS(DX_ZROT_AXIS, 75,10));
          	MapKey(&Throttle, CHB, AXIS(DX_ZROT_AXIS,-75,10));
          
          	//Gear Lever
          	KeyAxis(&Throttle, THR_FC, 0, AXMAP2(3, DX24, 0, DX5));
          
          	//Throttle Handle Binds
          	MapKey(&Throttle, SC, DX1); //Cursor Enable
          	MapKey(&Throttle, MSP, DX2); //Uncage
          	MapKey(&Throttle, SPDF, DX7); //Speedbrake
          	MapKey(&Throttle, SPDB, DX8);
          	MapKey(&Throttle, BSF, DX9); //DGFT/MRM
          	MapKey(&Throttle, BSB, DX10);
          	MapKey(&Throttle, PSF, PULSE+LED(&Throttle, LED_INTENSITY, 0)); //Backlight Control
          	MapKey(&Throttle, PSM, PULSE+LED(&Throttle, LED_INTENSITY, 43));
          	MapKey(&Throttle, PSB, PULSE+LED(&Throttle, LED_INTENSITY, 86));
          	MapKey(&Throttle, LTB, DX15); 			//Slap Switch
          	MapKey(&Throttle, APUON, DX13); 		//Master Arm
          	MapKey(&Throttle, APUOFF, PULSE+DX14); 	//Pulse to Allow Sim Use
          	MapKey(&Throttle, LDGH, 'h'); 			//Gear Horn
          	MapKey(&Throttle, CSU, DX29); 			//COMM Switch
          	MapKey(&Throttle, CSR, DX30);
          	MapKey(&Throttle, CSD, DX31);
          	MapKey(&Throttle, CSL, DX32);
          	MapKey(&Throttle, FLAPD, DX22);			//AVTR Switch
          	MapKey(&Throttle, FLAPU, DX23);
          	MapKey(&Throttle, FLAPM, DX3);
          	MapKey(&Throttle, EFLNORM, DX4); 		//Pitot Heat
          	MapKey(&Throttle, EFLOVER, DX16);
          	MapKey(&Throttle, EFRNORM, DX18); 		//Radar Quiet
          	MapKey(&Throttle, EFROVER, DX19);
          	MapKey(&Throttle, EOLIGN, DX11); 		//MPO
          	MapKey(&Throttle, EORIGN, DX12);		//E-J
          	MapKey(&Throttle, EACON, DX20);			//Master Lights
          	MapKey(&Throttle, EACOFF, DX21);
          	MapKey(&Throttle, RDRNRM, DX25);		//Radar Altimeter
          	MapKey(&Throttle, RDRDIS, DX6);
          	MapKey(&Throttle, APENG, DX26);			//AP L (Cycle)
          	MapKey(&Throttle, APPAT, DX27); 		//AP R Mode
          	MapKey(&Throttle, APAH, DX17);
          	MapKey(&Throttle, APALT, DX28);
          }
          
          //event handler
          int EventHandle(int type, alias o, int x)
          {
              DefaultMapping(&o, x);
          
          	//add event handling code here
          }
          
          
          D 1 Reply Last reply Reply Quote 0
          • D
            D_Fens @Frederf last edited by

            Ok, thanks for the responses.
            If my memory serves me right, I’ve read somewhere in this forum, that it would be a good idea to create a target profile for the throttle only and a separate DX-profile for the stick, but can’t find that post anymore. Would that be a good idea?
            I am almost as new to flight sims as i am to my warthog so i would like to create my profile step by step as i get more experienced with both, the sim and the target software. Using pre created profiles nether really worked out for me. So any tips would be appreciated.

            Regards D_Fens

            F 1 Reply Last reply Reply Quote 0
            • F
              Frederf @D_Fens last edited by

              I do that (see above script). The only thing that is good about it is “Target Virtual Device” only has 32 DX buttons, 1 POV, and 8 axes maximum. Warthog joystick has 23 buttons on it so only 11 would be left for the throttle side if you wanted normal joystick function. So if you are happy with TMWH joystick natural (no scripting needs) then leave it and let TARGET virtual device be 100% throttle. What is better and I wish Thrustmaster would do is have multiple virtual devices possible so 32/8 limitation doesn’t matter. Some day.

              Making your own is a good idea. Take the above and delete all the middle guts from it. Make a copy of BMS.key as D_Fens.key and get customizing. Start from nothing and all in buttons as you need them. Can’t fail.

              D 1 Reply Last reply Reply Quote 0
              • D
                D_Fens @Frederf last edited by

                I guess i wont be able to use Kolbe’s Spreadsheet for both the throttle and the Joystick if i choose this “hybrid setup” right?
                Otherwise i would just create a keyfile using his Spreadsheet to create a keyfile with the dx-commands for the warthog.

                F 1 Reply Last reply Reply Quote 0
                • F
                  Frederf @D_Fens last edited by

                  Once you have the TARGET script spitting out DX commands (or, shudder, keystrokes) you’re 99% done. Pairing commands to callbacks is the easy part.

                  I had to look up Kolbe’s spreadsheet thing. It’s impressive but thanks but no thanks. You know how there are ~1000 lines in the generated keyfile? My keyfile is 192 lines long and it could be shorter. Look at the callbacks present by default: SimHUDVelocityTAS, SimReticleStby, SimILSOn, etc. It’s too much! I have TrackIR and a mouse, that is plenty. First thing is did was delete all the stuff I don’t use which was much of it. Over weeks and months I added back in maybe 3-4 commands as I needed them.

                  So not including the keyboard-radio AI menu and the DX section I have 100 lines. Not such a big job now is it?

                  D 1 Reply Last reply Reply Quote 0
                  • D
                    D_Fens @Frederf last edited by

                    Ok so far the idea of having to write a an actual code scared me off.
                    So if I have a TARGET script for my throttle only and want to assign additional DX-commands to the joystick, how do I do that?
                    I guess if i would use TARGET for the throttle and the spreadsheet for the joystick i might into some compatibility problems?
                    Guess i will spend the next week learning to write a target script and use mud’s profile for the time, since it seems very easy to use.
                    Be advised i will probably come back here to ask more annoying questions 😕
                    Thanks for the great help so far 😄

                    F 1 Reply Last reply Reply Quote 0
                    • F
                      Frederf @D_Fens last edited by

                      Go into setup>controls and click an entry then press the appropriate joystick button. Repeat for all entries to bind to the joystick. Of course load your .key file before that and save it after. When the joystick is excluded from the TARGET Combined Device it’s “natural” like TARGET wasn’t running at all. Looking at the .key file in notepad the results are pretty obvious.

                      D 1 Reply Last reply Reply Quote 0
                      • D
                        D_Fens @Frederf last edited by

                        Ok, so if i want to add functions, i can just use Kolbe’s Keyfile to generate the DX entries?
                        I’d like to add shifted functions for throttle and stick and am wondering if that might cause conflicts.
                        Just as an example: Let’s say i want to have Trim Reset on the pushbutton of the left throttle (unshifted) and wheelbrakes (shifted), throttle is programmed via TARGET script editor. As Shift button i want to use the button behind the paddle switch (sry don’t know the names of all buttons yet) as shift button, stick is programmed via DX commands in the keyfile.
                        Will that work?
                        Sry for bothering again.

                        F 1 Reply Last reply Reply Quote 0
                        • F
                          Frederf @D_Fens last edited by

                          The spreadsheet? I don’t know too much about it but it seems to procedurally generate the appropriate lines for the .key file but then again so does the game itself in 97% of use cases. So it comes down to what tool you are comfortable with that does the job.

                          Personally I would say ain’t no thing as trim reset in the real jet so ignore it and for wheel brakes buy pedals or use the keyboard but I’m not here to dictate taste in controls setup and this is a great situation to describe. Working from your concrete example you want to use the “SSC pinky” as a shift button. My first thought is because the smartest way to use TARGET is to exclude the joystick you want to exclude the joystick. Of course excluding the joystick prevents you from applying custom TARGET profile behavior. No problem! BMS has built into it a special shift callback already called SimHotasPinkyShift. So you would bind SimHotasPinkyShift to the switch on your joystick. Easy. If you “short press” this button it operates the pinky function in the F-16 and if you “long press and hold” it shifts all the DX numbers on your gear up by 256.

                          OK now we want to bind the Left Throttle Button on the throttle controller to two functions, one shifted, one not. Unshifted is easy. There is a line in the TARGET script something like
                          MapKey(&Throttle, LTB, DX3);

                          So you press LTB and the DX3 input is made. You go into the game setup>controls, find “trim reset” and press this button. Save key file. Check key file you find this line at the bottom.
                          AFResetTrim 2 8 -2 0 0x0 0

                          This is ID #2 (DX3) bound to this callback. Good so far.

                          Now we want to bind wheel brakes to ID 258 (2+256). But we cannot do that in the setup>controls section because it’s impossible to press button ID 258. So we use Notepad to text edit the .key file. We make a copy of the trim reset line, change the callback and ID number.

                          AFResetTrim 2 8 -2 0 0x0 0
                          SimWheelBrakes 258 8 -2 0 0x0 0

                          Almost done. Because pinkyshift callback raises all DX ID by 256, it also raises itself. For example say that the pinky button had DX ID 13 (It was button DX14). The problem is once the DX IDs are raised it is impossible to release button 14 because it doesn’t exist anymore. All you have is button 14+256. The fix is to have two binds for SimHotasPinkyShift, one for each ID that this button can be. If you don’t then you find that pinky “sticks” and never receives release event.

                          SimHotasPinkyShift 34 8 -2 0 0x0 0
                          SimHotasPinkyShift 290 8 -2 0 0x0 0

                          OK now done.

                          D 1 Reply Last reply Reply Quote 0
                          • D
                            D_Fens @Frederf last edited by

                            Sry for the late reply, almost forgot about this thread, since i flew with morphine’s profile for the last weeks.
                            Thanks for the great explanation. Ok, so i guess for now i’ll just edit my keyfile and add the hotas keys in there and come back to target scripting when i need more advanced functionalities. I guess that i once more made things more complicated than need be, it’s one of my few talents:rolleyes:
                            Thanks a lot for helping and clearing things up.

                            Regards D_Fens

                            D 1 Reply Last reply Reply Quote 0
                            • D
                              D_Fens @D_Fens last edited by

                              Tried morphine’s profile but it didn’t work for me and i usually prefer creating my own profiles anyway.
                              Ok, so i thought i’d give it a try and created a profile using only DX-commands with the keyfile.
                              But i’d like to keep the idle cutoff functionality and the throttle axis as programmed in his target file. I removed the key mapping and everything but the axis. Now when i run the script i don’t have the dx mappings from my keyfile anymore 😞
                              Do i have to map the keys for the throttle within the script editor or did i just mess up the syntax or something?

                              Regards Stranger

                              F Morphine 2 Replies Last reply Reply Quote 0
                              • F
                                Frederf @D_Fens last edited by

                                First check if your TARGET device is outputting any DX values at all by looking at TARGET’s device analyzer. The left side is the input from controller; the right is DX output. If nothing is being output then BMS has no hope to recognize it.

                                With good output you go into BMS>Setup>Controls list and press a button like “DMS down” if it shows “DMS down” below the list .key file is correct. If not DX input must be bound to callback.

                                1 Reply Last reply Reply Quote 0
                                • Morphine
                                  Morphine @D_Fens last edited by

                                  @D_Fens:

                                  Tried morphine’s profile but it didn’t work for me and i usually prefer creating my own profiles anyway.
                                  Ok, so i thought i’d give it a try and created a profile using only DX-commands with the keyfile.
                                  But i’d like to keep the idle cutoff functionality and the throttle axis as programmed in his target file. I removed the key mapping and everything but the axis. Now when i run the script i don’t have the dx mappings from my keyfile anymore 😞
                                  Do i have to map the keys for the throttle within the script editor or did i just mess up the syntax or something?

                                  Regards Stranger

                                  To use the Idle Cutoff and the Throttle Axis functionality you have to use TARGET. However, the remainder of your profile can still be all Direct X.

                                  The first thing you would need to do is remove the Joystick from the TARGET profile so that it’s seen as a separate DX Device. You will then need to adjust your DX mappings in BMS as it will now “see” two devices (a separate joystick and a separate throttle called TM Combined). I created a profile (keyfile and TARGET script attached) similar to what you are wanting to do that you can use for ideas/starting point. I moved a couple of the DX numbers around to be able to use the Hat as a DX button as BMS only recognizes one 8 way HAT at a time. The key file is essentially Kolbe’s Full keyfile so refer to that for key mappings.

                                  D 1 Reply Last reply Reply Quote 0
                                  • D
                                    D_Fens @Morphine last edited by

                                    Hi Morphine,
                                    Thanks a lot for your help and the profiles.
                                    Yesterday i got it to work for a short time, but still ran into some trouble.
                                    If I use your keyfile BMS still doesn’t recognize input frome the throttle but I guess that’s just some problem with the device numbers. The throttle alias Thrustmaster combined is listet as the first, the joystick as the second device. I just copy pasted my dx commands as created with Kolbe’s spreadsheet into his Keyfile and in conjunction with your target profile it worked.

                                    Problem is that BMS doesn’t recognize certain switch positions. For example only the ARM position of the EAC switch is recognized. Obviously the problem is, that only this poition is recognized as a DX button. I realize that this is a windows/BMS related problem.
                                    But i would really want to use the switches in all positions listed in the spreadsheet.
                                    I also realize that I (probably) have to use a target profile to make the switches work as i want them to. And i’m definitely willing to learn how to use the script editor to make the most use of my warthog. There’s only two things that i’d like to avoid: First making things more complicated than need be and more important: to spend hours learning how to use the editor and creating a script just to see that i’m trying to make something work, that’s just not possible due to limitations.

                                    I have attached my desired profile. Sry for the size but i didn’t know how to export it more “readable” from the spreadsheet :wfish:

                                    1: Are functions like the ones mapped to the flapu switch or the ENG OPER switches actually possible as mapped in the picture below?

                                    2: Looking at your profile i see that for example you managed to make both “physical” positions of the EAC work. How did you achieve this?
                                    My idea would be that there’s one command for the ARM position which gets recognized as a button press by windows and then in the script an additional command for the button release when switching to the OFF position. Would that actually work?

                                    Sry for the long post and all the questions. Brief answers should suffice. Actually i only want to have some verifications to avoid wasting days of work just to realize, that i have been trying to achieve something impossible or that i make things unnecessarily complicate.
                                    I promise to try and bother you as less as possible in the future:rolleyes:
                                    Help would really be appreciated.

                                    Regards D_Fens

                                    F 1 Reply Last reply Reply Quote 0
                                    • F
                                      Frederf @D_Fens last edited by

                                      BMS doesn’t recognize anything but keyboard and DX. It is possible to program TARGET so it gives a DX# on EACON or EACOFF or both or neither pulsed or held. With TARGET anything is possible.

                                      The problem with assigning DX1 with EACON and DX2 with EACOFF is it takes two DX# and you only have 32. For simple 2-position switches if you have a callback which is a toggle (SimSwitchToggle instead of SimSwitchOn SimSwitchOff) then you can map MapKey EACON PULSE+DX1 and MapKey EACOFF PULSE+DX1 (or MapKeyR EACON PULSE+DX1). Then you bind DX1 to SimSwitchToggle. So no matter if you are flipping EAC switch up or down it sends DX1 and BMS knows that DX1 is SimSwitchToggle. The only problem is if they get out of sync (joystick switch is up, cockpit switch is down) but that is fixed by flipping the switch once by mouse.

                                      TARGET understands all states of all switches FLAPM FLAPU FLAPD for example. The default mapping of DX# to the FLAPM is non-existent by default but that doesn’t mean it has to be. With a custom TARGET script you can make FLAPM do something.

                                      D 1 Reply Last reply Reply Quote 0
                                      • D
                                        D_Fens @Frederf last edited by

                                        Frederf, thanks a lot, that seems like a great solution :bowd:
                                        Could have come across that myself but well, as i said i have that tendency to make simple things complicated.
                                        My idea would have been to add additional lines with key presses for the missing positions, but your idea sounds much more elegant and easier to apply.
                                        Only problem would be switches like the MRM and DF override function which don’t have toggle functionality. But i think that could be solved by using a “hybrid method”.
                                        For functions like the ones on the FLAPU switch just the DX buttons as suggested by you and key presses where there is no toggle functionality.
                                        As for the sync problem, i don’t think that it actually is to much of a problem if you check, if your switches are in sync at rampstart, or any procedure where you would have to check the correct position of the switches anyway. Plus actually having to check the position of an actual physical switch should add a lot to immersion.

                                        The versatility of this hotas is really amazing. Especially in combination with this forum and all those great guys helping out newbies 😄

                                        Thanks a lot for all your guys help :bowd:

                                        F 1 Reply Last reply Reply Quote 0
                                        • F
                                          Frederf @D_Fens last edited by

                                          For the very specific case of the DGFT/MRM switch there is an option in BMS where MRM or DGFT are only engaged while the button/key for that mode is being held down.
                                          set g_bHotasDgftSelfCancel 1 // set to 1 = SRM and MRM override callbacks will call the override cancel callback for you

                                          So whatever switch you’re using (say BOAT) you just have forward hold down DX# and aft hold down DX$ and the middle position does nothing. If neither override buttons are being held it self-cancels. It saves a DX to keep under the 32 limit.

                                          3-pos switches like the autopilot pitch channel you can program in clever uses of the cycle to save a DX but I cashed in my 32-limit savings to bind each position of the switch with the callback for that specific switch pos. I was getting some funky desync trying to make macros.

                                          Morphine 1 Reply Last reply Reply Quote 0
                                          • Morphine
                                            Morphine @Frederf last edited by

                                            @D-Fens… Lots of good advice and instruction from Frederf.

                                            One other thing I forgot to mention is that when selecting the “controller” in the BMS configuration screen, make sure you select the Thrustmaster Joystick and not the Thrustmaster Combined. This makes the Joystick the primary controller and enables the POV hat to work properly. Then select the appropriate controller in the subsequent Axis Setup screens as needed.

                                            D 1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            55
                                            Online

                                            11.2k
                                            Users

                                            21.3k
                                            Topics

                                            352.2k
                                            Posts

                                            Benchmark Sims - All rights reserved ©