Jump to content

Recommended Posts

Posted

Hello,

I am going to explain my problem with a practical example.

 

DCS, Su25T and Target.

Codpit lights ON / OFF is the keyboard command "L".

In the Hotas I apply this command to a lever in the up and down positions.

I would like the lever Down to be always off and Up always on, but it,s seems to be imposible beacause there is only a keyboard comand.

 

 

Thanks and sorry for my english!

Posted

You are correct in your conclusion, that this is not possible because the module does not have discrete commands for those functions. In some modules it's possible to add some discrete switch positions by doing some LUA editing. I'm not sure about the SU-25T or other FC3 level modules.

Posted
You are correct in your conclusion, that this is not possible because the module does not have discrete commands for those functions. In some modules it's possible to add some discrete switch positions by doing some LUA editing. I'm not sure about the SU-25T or other FC3 level modules.

 

I don't know if this is solvable with LUA. What I ended up doing using Target, and now Joystick Gremlin, is to make the pulse duration of the DX button or in this case the Keyboard shortcut "L" long enough so that I can flip the switch twice within the pusle duration. This way I could resync the physical switch with the virtual one On The Fly.

 

Because if I flip the switch a second time while the first pulse duration isn't done then nothing will happen.

 

Exemple here on the APU Switch :

 

MapKey(&Throttle, APUON, CHAIN(DOWN+DX52, D(300), UP+DX52));

MapKeyR(&Throttle, APUON, CHAIN(DOWN+DX52, D(300), UP+DX52));

 

Today I don't use Target anymore, here is how I do it using Gremlin :

 

https://i.imgur.com/EkeSp4C.gifv

Posted

Yeah I would have suggested the Target code Antoine has suggested.

Hornet, Super Carrier, Warthog & (II), Mustang, Spitfire, Albatross, Sabre, Combined Arms, FC3, Nevada, Gulf, Normandy, Syria AH-6J

i9 10900K @ 5.0GHz, Gigabyte Z490 Vision G, Cooler Master ML120L, Gigabyte RTX3080 OC Gaming 10Gb, 64GB RAM, Reverb G2 @ 2480x2428, TM Warthog, Saitek pedals & throttle, DIY collective, TrackIR4, Cougar MFDs, vx3276-2k

Combat Wombat's Airfield & Enroute Maps and Planning Tools

 

cw1.png

Posted
Sorry Antonie, I don,t understand...could you put a IU Target example?

 

 

Thanks!

 

Sorry Target isn't installed anymore on my PC so I can't.

Posted
If I understand, basically you are making a long press, so you cant reposition the control where you whant, is it correct?.sorry for my English...

On each physical switch flip, either up or down, I output a "long"(300ms) pulsation of a virtual joystick button. This way I can flip the switch twice while the game will only see one pulsation. This allow me to quickly resynchronise the physical switch with the one in the plane.

Posted

Forgive my inability, but I aply to the APU Switch a press of 500 mls. When I move it twice, it performs both functions (on and off)...

What am i missing?

Posted (edited)
Forgive my inability, but I aply to the APU Switch a press of 500 mls. When I move it twice, it performs both functions (on and off)...

What am i missing?

 

Please post screenshots cause I don't really remember how we could do that with the GUI. I think we have to add several event following each other on a same input, which will create a macro (chain).

 

You could also contact me (hon0#0570) on Discord so we could screen-share.

 

Edit : In Target GUI, click on view script and copy past everything in here so we can check. Your APU line should looks similar to mine :

 

MapKey(&Throttle, APUON, CHAIN(DOWN+DX52, D(300), UP+DX52));

MapKeyR(&Throttle, APUON, CHAIN(DOWN+DX52, D(300), UP+DX52));

 

Or

 

MapKey(&Throttle, APUON, CHAIN(DOWN+DX52, D(300), UP+DX52));

MapKey(&Throttle, APUOFF, CHAIN(DOWN+DX52, D(300), UP+DX52));

 

Edit : See "Creating a chain" page 25/43.

http://ts.thrustmaster.com/download/accessories/pc/hotas/software/TARGET/TARGET_User_Manual_ENG.pdf

Edited by Ant0ine
Posted

You are really friendly give me your discord. I will add you add soon as I can. I,m not now with my PC.

Before anything, would you recommend switching to Gremlin?

Posted
You are really friendly give me your discord. I will add you add soon as I can. I,m not now with my PC.

Before anything, would you recommend switching to Gremlin?

 

Yes, Gremlin is better than Target GUI that's for sure.

Posted

That is the script:

 

 

MapKeyIOUMD(&Throttle, APUON, PULSE+'l', PULSE+'l', PULSE+'l', PULSE+'l', PULSE+'l', PULSE+'l');

MapKeyIOUMD(&Throttle, APUOFF, PULSE+'l', PULSE+'l', PULSE+'l', PULSE+'l', PULSE+'l', PULSE+'l');

 

 

 

 

I,ve only have the two swichs that activate L key.

Posted
That is the script:

 

 

MapKeyIOUMD(&Throttle, APUON, PULSE+'l', PULSE+'l', PULSE+'l', PULSE+'l', PULSE+'l', PULSE+'l');

MapKeyIOUMD(&Throttle, APUOFF, PULSE+'l', PULSE+'l', PULSE+'l', PULSE+'l', PULSE+'l', PULSE+'l');

 

 

 

 

I,ve only have the two swichs that activate L key.

 

Ok that is normal. To do the chain in Target GUI I think you have to do the following :

 

On APU ON :

PRESS L

Delay 300ms

Release L

 

On APU OFF :

PRESS L

Delay 300ms

Release L

 

Press and release are a "type" of event that you have to choose prior to add an event to the "queue".

Posted

Ok, that,s work, but know I have a new problem, this action nerver stops, so if try to do somethig like write on a document, the PC is always pressing "L" key!!

 

 

The script:

 

 

 

MapKeyIOUMD(&Throttle, APUOFF, CHAIN( D(300), DOWN+'l'), CHAIN( D(300), DOWN+'l'), CHAIN( D(300), DOWN+'l'), CHAIN( D(300), DOWN+'l'), CHAIN( D(300), DOWN+'l'), CHAIN( D(300), DOWN+'l'));

MapKeyRIOUMD(&Throttle, APUOFF, CHAIN( D(5), UP+'l'), CHAIN( D(5), UP+'l'), CHAIN( D(5), UP+'l'), CHAIN( D(5), UP+'l'), CHAIN( D(5), UP+'l'), CHAIN( D(5), UP+'l'));

 

 

MapKeyIOUMD(&Throttle, APUON, CHAIN( D(300), DOWN+'l'), CHAIN( D(300), DOWN+'l'), CHAIN( D(300), DOWN+'l'), CHAIN( D(300), DOWN+'l'), CHAIN( D(300), DOWN+'l'), CHAIN( D(300), DOWN+'l'));

MapKeyRIOUMD(&Throttle, APUON, CHAIN( D(5), UP+'l'), CHAIN( D(5), UP+'l'), CHAIN( D(5), UP+'l'), CHAIN( D(5), UP+'l'), CHAIN( D(5), UP+'l'), CHAIN( D(5), UP+'l'));

 

 

anothe question, why the script repeats on this way? (CHAIN( D(300), DOWN+'l'), CHAIN( D(300), DOWN+'l'), CHAIN( D(300), DOWN+'l'), CHAIN( D(300), DOWN+'l'), CHAIN( D(300), DOWN+'l'), CHAIN( D(300), DOWN+'l..)

 

 

Thnak you

Posted (edited)
Ok, that,s work, but know I have a new problem, this action nerver stops, so if try to do somethig like write on a document, the PC is always pressing "L" key!!

 

 

The script:

 

 

 

MapKeyIOUMD(&Throttle, APUOFF, CHAIN( D(300), DOWN+'l'), CHAIN( D(300), DOWN+'l'), CHAIN( D(300), DOWN+'l'), CHAIN( D(300), DOWN+'l'), CHAIN( D(300), DOWN+'l'), CHAIN( D(300), DOWN+'l'));

MapKeyRIOUMD(&Throttle, APUOFF, CHAIN( D(5), UP+'l'), CHAIN( D(5), UP+'l'), CHAIN( D(5), UP+'l'), CHAIN( D(5), UP+'l'), CHAIN( D(5), UP+'l'), CHAIN( D(5), UP+'l'));

 

 

MapKeyIOUMD(&Throttle, APUON, CHAIN( D(300), DOWN+'l'), CHAIN( D(300), DOWN+'l'), CHAIN( D(300), DOWN+'l'), CHAIN( D(300), DOWN+'l'), CHAIN( D(300), DOWN+'l'), CHAIN( D(300), DOWN+'l'));

MapKeyRIOUMD(&Throttle, APUON, CHAIN( D(5), UP+'l'), CHAIN( D(5), UP+'l'), CHAIN( D(5), UP+'l'), CHAIN( D(5), UP+'l'), CHAIN( D(5), UP+'l'), CHAIN( D(5), UP+'l'));

 

 

anothe question, why the script repeats on this way? (CHAIN( D(300), DOWN+'l'), CHAIN( D(300), DOWN+'l'), CHAIN( D(300), DOWN+'l'), CHAIN( D(300), DOWN+'l'), CHAIN( D(300), DOWN+'l'), CHAIN( D(300), DOWN+'l..)

 

 

Thnak you

 

There is something wrong in your chain, you have a delay, and a press event.

 

You need a press, then a delay, then a release. It should be like this :

MapKeyIOUMD(&Throttle, APUON, CHAIN(DOWN+'l', D(300), UP+'l')

Edit : And it should be exactly the same on APU OFF.

 

So, here is what my Script in Target Script Editor would look like :

 

MapKey(&Throttle, APUON, CHAIN(DOWN+'l', D(300), UP+'l');

MapKey(&Throttle, APUOFF, CHAIN(DOWN+'l', D(300), UP+'l');

 

Edit : You have multiple time the same thing because you're programming the same behavior in all layer and sub-layer.

I(In)

O(Out)

U(Up)

M(Middle)

D(Down).

Edited by Ant0ine
Posted

Ok, it,s working now! I had the relase in the prees action and the correct way is to put the release in the release action. lot,s of thank for tou help!

 

 

I would like to take the opportunity to consult you another diferente thing to you..whould you main?

Posted
Ok, it,s working now! I had the relase in the prees action and the correct way is to put the release in the release action. lot,s of thank for tou help!

 

 

I would like to take the opportunity to consult you another diferente thing to you..whould you main?

 

Sure. Go ahead, ask.

Posted

For the first time I have used the script editor to make a time function

MapKeyIOUMD (& Joystick, S2, 0, 0, 0, TEMPO ('g', 'l', 300), 0, 0);

It Works!

The problem, when I open the .tmc from TargetUI, that information gets lost.

So, once you get into the scrip editor you can't go back to the TargetUI?

 

Thank you!

Posted
For the first time I have used the script editor to make a time function

MapKeyIOUMD (& Joystick, S2, 0, 0, 0, TEMPO ('g', 'l', 300), 0, 0);

It Works!

The problem, when I open the .tmc from TargetUI, that information gets lost.

So, once you get into the scrip editor you can't go back to the TargetUI?

 

Thank you!

 

Correct, you can convert a script from Target GUI to Target Script Editor but you can't go the opposite way.

Posted

Ok, so may be a good idea is always keep two scrips and merge it when proceed...

 

 

 

The last question! I whant the DX_slider swich, the gray lever of the hotas,

to manage things like climbing down and up canyons or antennas. I,ve set up this directly inside DCS, but when I load target it dosen,t works.

Any advice?

Posted (edited)
Ok, so may be a good idea is always keep two scrips and merge it when proceed...

Or use Joystick Gremlin and do everything within its UI :thumbup:

I whant the DX_slider swich, the gray lever of the hotas,

to manage things like climbing down and up canyons or antennas. I,ve set up this directly inside DCS, but when I load target it dosen,t works.

 

Uhm.. How did you program that? In Target you remapped the axis to button/keyboard shortcut? If so, please share the script so we can check.

 

Also tell us exactly what function you're mapping it to. I'm having trouble to follow.

 

"things like climbing down and up canyons" WAT?:huh:

 

Edit : "I,ve set up this directly inside DCS, but when I load target it dosen,t works."

Make sure to map the axis AFTER the Target profile is loaded. Because if you do it before, you'll map the Warthog throttle axis. But if you do it after, you'll map the Thrustmaster combined virtual device axis, which is what you want.

Edited by Ant0ine
Posted
Ok i will look at that this afternoon.

 

 

Do you think change to Gremling is problematic? Or is it something simple?

 

For DCS it is easy, because we do not need to hide physical controller. For other game it could be a "problem", until you learn how to hide controller properly thanks to HID Guardian.

Posted

Ok, now it,s works fine. The problem was the order of the axes maping as you said.

Lots of thanks, you have helped me a lot. I am happy with the Target but I will test gremling soon.

 

 

Once again, thanks!

  • Recently Browsing   0 members

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