Jump to content

s-curves with target software question


Recommended Posts

Hi, I'm trying to setup S curves for my warthog stick.

I jsut want to setup S curves, so i just programmed the x and y axis, saved the profile, and clicked run.

Now when I'm in the plane, every button just doesn't work. I have no intention to reprogram every key button becasue itìs no sense. i have an old target version, no updated in the last 2 years.

 

Solutions?

tl dR: setup s curves only for the stick, buttons don't work in game.

Spirit is important: let him fly in the blue sky!

Link to comment
Share on other sites

Hi, I'm trying to setup S curves for my warthog stick.

I jsut want to setup S curves, so i just programmed the x and y axis, saved the profile, and clicked run.

Now when I'm in the plane, every button just doesn't work. I have no intention to reprogram every key button becasue itìs no sense. i have an old target version, no updated in the last 2 years.

 

Solutions?

tl dR: setup s curves only for the stick, buttons don't work in game.

Can you paste your script here?

Here's a basic one that works:

include "target.tmh"

int main()
{
   /////////////////// Setup and initialisation ///////////////////
   Configure(&HCougar, MODE_EXCLUDED);
   Configure(&T16000, MODE_EXCLUDED);
   Configure(&LMFD, MODE_EXCLUDED);
   Configure(&RMFD, MODE_EXCLUDED);
   // Configure(&Joystick, MODE_EXCLUDED);
   Configure(&Throttle, MODE_EXCLUDED);
   
   if(Init(&EventHandle)) return 1;
   
   SetKBRate(70, 50); // Keyboard pulse and delay times in ms
   SetKBLayout(KB_ENG);

   MapAxis(&Joystick, JOYX, DX_X_AXIS, AXIS_NORMAL, MAP_ABSOLUTE);
   SetSCurve(&Joystick, JOYX, 0, 0, 0, 0, 0);
   MapAxis(&Joystick, JOYY, DX_Y_AXIS, AXIS_NORMAL, MAP_ABSOLUTE);
   SetSCurve(&Joystick, JOYY, 0, 0, 0, 0, 0);
}
int EventHandle(int type, alias o, int x)
{
   DefaultMapping(&o, x);
}

Note that all controllers were excluded except the stick.

You might need to fiddle with configuration files if the default mapping of the "Thrusmaster Combined" isn't exactly like the Warthog stick's default, but as far as I remember you won't need that.

It's possible to do a standalone configuration for the throttle too but it's a bit trickier (in this case, check this thread).

Link to comment
Share on other sites

Hey thanks.

No I didn't use the script option, i just modified with the graphic user interface GUI.I just modified via GUI the x and y curves. In game-stick works- buttons don't. Note that I don't want to set any button via Target, as i already did it in game. I think target wants me to configure each button I intend to use but i think it's overkill.


Edited by VrValor

Spirit is important: let him fly in the blue sky!

Link to comment
Share on other sites

Have a look in the TARGET manual, seems like there is a way to tell the stick to use DX buttons so your game will recognize them while the software is running, not for sure though...

 

Edit: It is in the Script Editor rather than the GUI mode. Look in the TARGET Script Editor Manual, page 17. One would use the MapKey function to assign buttons as DX buttons.

So you would need to create a script, but you could save it say as a master and would have it for any of your modules if you wanted to do them the same way. Then all you would need to do is set the curves as you want them.

 

Personally, I have used the script editor in the past for many sims, and it is very powerful - but here lately since DCS Edge came I have just started using the in game gui and not messing with TARGET.


Edited by dburne
  • Like 1

Don B

EVGA Z390 Dark MB | i9 9900k CPU @ 5.1 GHz | Gigabyte 4090 OC | 64 GB Corsair Vengeance 3200 MHz CL16 | Corsair H150i Pro Cooler |Virpil CM3 Stick w/ Alpha Prime Grip 200mm ext| Virpil CM3 Throttle | VPC Rotor TCS Base w/ Alpha-L Grip| Point Control V2|Varjo Aero|

Link to comment
Share on other sites

Have a look in the TARGET manual, seems like there is a way to tell the stick to use DX buttons so your game will recognize them while the software is running, not for sure though...

 

Edit: It is in the Script Editor rather than the GUI mode. Look in the TARGET Script Editor Manual, page 17. One would use the MapKey function to assign buttons as DX buttons.

So you would need to create a script, but you could save it say as a master and would have it for any of your modules if you wanted to do them the same way. Then all you would need to do is set the curves as you want them.

 

Personally, I have used the script editor in the past for many sims, and it is very powerful - but here lately since DCS Edge came I have just started using the in game gui and not messing with TARGET.

Hello the DX axis assignment is made by default, so if your script is empty you'll at least have the DX buttons mapped (see my example script above).

 

However for the throttle this default DX mapping won't map all buttons because there are too. many buttons on stick+throttle. There is a workaround if you wish to get the correct default mapping for the throttle (see the link in my previous postl.


Edited by PiedDroit
Link to comment
Share on other sites

ok so with target can I use a script without declaring direct X buttons, just the 2axis for the stick?

:))

Yes but only for the stick.

If you use TARGET for both throttle and stick, all buttons on the stick will have correct DX assignment by default but throttle buttons will only get remainining free dx assignments.

Dunno if I'm clear... It's a bit confusing. Right now I'm using the phone to answer it's not very practical. I'll make a more detailed post later.

 

EDIT:

 

So, when TARGET is started, it will create a controller that has DX1-32 buttons and axis assigned by default.

Stick DX1-19 and DXHat buttons will be mapped to DX1-19 and DXHat

Throttle D1-32 will be mapped to DX19-32 (some buttons won't have a DX buttons assigned).

 

Axis will be mapped like this:

Stick JOYX (DX_X_AXIS) -> Combined (DX_X_AXIS)

Stick JOYX (DX_Y_AXIS) -> Combined (DX_Y_AXIS)

Throttle SCX (DX_X_AXIS) -> Combined (DX_XROT_AXIS)

Throttle SCY (DX_Y_AXIS) -> Combined (DX_YROT_AXIS)

Throttle THR_RIGHT(DX_Z_AXIS) -> Combined (DX_Z_AXIS)

Throttle THR_LEFT(DX_ROTZ_AXIS) -> Combined (DX_ZROT_AXIS)

Throttle THR_FC (DX_THROTTLE_AXIS) -> Combined (DX_SLIDER_AXIS)

 

If you want to use a customized Throttle that runs with TARGET and seen like a non-TARGET throttle (will all DX buttons corresponding to the non-TARGET throttle), see this post.

 

Finally, you can setup TARGET code that will run separately from your HOTAS, useful to generate keystrokes while using the HOTAS as if it was not controlled by TARGET (in that case there will be no Thrustmaster Combined and you won't be able to change any axis or DX assignment).

To do that, use the setup as in this post.


Edited by PiedDroit
  • Like 1
Link to comment
Share on other sites

Can you please help me with writing a simple script for S curves for the stick?

Just take the one above (in my first post in this thread), change the curve using the second-to-last parameter of SetSCurve calls (I suggest starting with a value of 3 or 4).

Here's an extract of the manual (page 28 of the pdf):

 

SetSCurve

 

SetSCurve is the function used to fine-tune your Joystick axis and rudder axes response.

 

Syntax:

SetSCurve(&Device, axis name, left_deadzone, center_deadzone, right_deadzone, curve, scale);

 

SetSCurve(&Throttle, SCX, 0, 30, 0, 0, -4);

Or

SetSCurve(&Joystick, JOYX,

5, //Left Deadzone set to 5%

2, //Center Deadzone set to 2%

5, //Right Deadzone set to 5%

3, //Curve set to 3

0 //Scale/zoom neutral

);

 

[..]

The Curve parameter defines the controller’s sensitivity. With this parameter, you choose to make the stick:

 Less sensitive in the center position, but more sensitive at the extreme axis values.

 More sensitive in the center position, but with more precise control at the extreme axis values.

There is a range of 40 values: -20 to +20. Negative values make the axis more sensitive around the center, while

positive values provide better control in the center position.


Edited by PiedDroit
Link to comment
Share on other sites

ok, i would set to zero left, right and center zones. Is there a technical or empirical reason to set them?

 

The S curve parameter only defines the shape? i would like to see greaphically how the curve change. I see you also setup the scale.

 

Ok, made it work tested the device. all par set to zero except for 'curve' i set it up to 10 for both axis. let's see :))) thank you so much


Edited by VrValor

Spirit is important: let him fly in the blue sky!

Link to comment
Share on other sites

ok, i would set to zero left, right and center zones. Is there a technical or empirical reason to set them?

 

The S curve parameter only defines the shape? i would like to see greaphically how the curve change. I see you also setup the scale.

That's an example from the manual ;), in your script only change the second to last parameter (others be 0), like this:

   MapAxis(&Joystick, JOYX, DX_X_AXIS, AXIS_NORMAL, MAP_ABSOLUTE);
   SetSCurve(&Joystick, JOYX, 0, 0, 0, 4, 0);
   MapAxis(&Joystick, JOYY, DX_Y_AXIS, AXIS_NORMAL, MAP_ABSOLUTE);
   SetSCurve(&Joystick, JOYY, 0, 0, 0, 4, 0);

Unfortunately there is no way to see what the curve looks like graphically (well, I suppose using the correct formula we could plot it on graph viewer like the ones on scientific calculators but I don't have the formula right now).

 

EDIT: You should use the DCS axis tuner to tune your axis (no TARGET), I think it will be easier for you (and more visual too), unless there is a specific reason for this (other sim that don't have axis tuning).

 

EDIT2:

Also, using TARGET will create a new, different controller (Thrustmaster Combined), if you already change the buttons assignments you'll have to do it again for this new controller. I definitely recommend to tune the axis inside DCS!

I personally use TARGET for some special functions (teamspeak, trackIR, remapping), but everything else I do in DCS, it's much easier to tune ;)


Edited by PiedDroit
Link to comment
Share on other sites

ok, i would set to zero left, right and center zones. Is there a technical or empirical reason to set them?

 

The S curve parameter only defines the shape? i would like to see greaphically how the curve change. I see you also setup the scale.

 

Ok, made it work tested the device. all par set to zero except for 'curve' i set it up to 10 for both axis. let's see :))) thank you so much

To answer your questions: empirical. If your device has calibration issues and/or jittering in center (or left or right) then you'd use deadzones.

Yes, S curve only defines the shape. I suggest you take a look at the target script manual for the définition of all parameters. There are also other types of curves (J curves).

 

Glad it worked, 10 might be a bit too steep - the scale is not the same as in DCS :)

Cheers


Edited by PiedDroit
Link to comment
Share on other sites

No actually i found a way to see the shape. You go in Device setting whith the script running.

Then upper corner right, there are two buttons, one of this is Create Graph. From there, you choose the axis, and click on start graph. now if you move the axis you will see the curve.

 

There, i noticed something strange: if i move the x, i notice a small offset, meaning it design a different spline for every time you move the stick in the axis. It marks two spline for the same semiaxis. Maybe is something stupid like not making the full escursion on the axis. not really, that much but It left me a sour flavour in my mouth, since the warthog stick should be very accurate.

 

3 as value for curve par is too much. i have to try with 2.

 

Seems i can't rep you again. but i will i promise :)


Edited by VrValor

Spirit is important: let him fly in the blue sky!

Link to comment
Share on other sites

I'll check that this week end (device analyser). I forgot about this feature, good find.

The sensor itself is very accurate but due to stiction you might not have a smooth motion in some places. If that's a big problem to you, you can disassemble it an polish the internal moving parts - not easy to do.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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