Jump to content
The simFlight Network Forums

Recommended Posts

Posted

Hi Pete,

when I set up an axis in more zone on the right-hand of the "Axis assignment", I need that the command is produced only if the value of the axis remains for some time (for example 1/2 sec) in the range, otherwise any command should not come out.

Why in this section the LUA commands don't work?

Thanks

Fabio Grappasonni

Posted

when I set up an axis in more zone on the right-hand of the "Axis assignment", I need that the command is produced only if the value of the axis remains for some time (for example 1/2 sec) in the range, otherwise any command should not come out.

The detection is based on normal polling rates on the joystick. but if the axis values are changing, any very small zone could be missed. You probably need to widen the zones. You could try increasing the poll rate (descrease the poll interval parameter) but take care or you risk affecting FS performance.

Why in this section the LUA commands don't work?

Please explain. Who says they don't? The internal handling is the same for assignments no matter where they are made.

Regards

Pete

Posted

Please explain. Who says they don't? The internal handling is the same for assignments no matter where they are made.

Regards

Pete

[buttons.LSH MD-82 McDonnell Douglas]

0=P0,13,CL6:R,0

1=P0,14,CL7:R,0

[LuaFiles]

4=tcas+c

5=tcas+d

6=tcas+m

7=tcas+u

[Axes.LSH MD-82 McDonnell Douglas]

0=1Y,500

1=1Y,U,1000,5500,L7:R,0

2=1Y,U,5500,9500,L5:R,0

3=1Y,U,9500,13000,L4:R,0

4=1Y,U,13000,16383,L6:R,0

In this example, the LUA command work in the buttons , but it does not work in the axis. Why?

Posted

[buttons.LSH MD-82 McDonnell Douglas]

In this example, the LUA command work in the buttons , but it does not work in the axis. Why?

I don't know. should be okay. i'll check here and get back to you.

Can you please tell me exactly what version of FSUIPC you are using, just in case there are differences?

Pete

Posted

0=1Y,500

1=1Y,U,1000,5500,L7:R,0

2=1Y,U,5500,9500,L5:R,0

3=1Y,U,9500,13000,L4:R,0

4=1Y,U,13000,16383,L6:R,0

In this example, the LUA command work in the buttons , but it does not work in the axis. Why?

I've tried all sorts of combinations here with FSUIPC4 and it works fine there. I'm just loading up FS9 to try there ...

.. Yes, you are correct. There's a bug in what should be pretty much identical code in FSUIPC3!

I'll attend to it directly.

Regards

Pete

Posted

In fact, I use FS2004.

That's why I needed to test in FS9. It works okay in FSX with FSUIPC4. ;-)

FS9 = FS2004.

Do you correct the error the next update?

It is corrected already. It was a typo. Please see the Download Links subforum. Download FSUIPC 3.989q.

Regards

Pete

Posted

The detection is based on normal polling rates on the joystick. but if the axis values are changing, any very small zone could be missed. You probably need to widen the zones. You could try increasing the poll rate (descrease the poll interval parameter) but take care or you risk affecting FS performance.

Please explain. Who says they don't? The internal handling is the same for assignments no matter where they are made.

Regards

Pete

[Axes.LSH MD-82 McDonnell Douglas]

0=1Y,500

1=1Y,B,1000,5500,L7:R,0

2=1Y,B,5500,9500,L5:R,0

3=1Y,B,9500,12500,L4:R

4=1Y,B,12500,16383,L6:R,0

In this setup, the command should go out only if the value of the axis remains inside for more than a certain time, otherwise it must be produced no command (i.e. axis value 6000 for 100 msec, no exit command; axixs value 6000 for 500 msec command LUA 5).

how can I do?

thanks

Fabio

Posted

In this setup, the command should go out only if the value of the axis remains inside for more than a certain time, otherwise it must be produced no command (i.e. axis value 6000 for 100 msec, no exit command; axixs value 6000 for 500 msec command LUA 5).

how can I do?

I can only think of two ways to do this:

1. You could, in the Lua plugin, have an ipc.sleep for 100 mSecs, then, before doing the action, check one of the Lua flags for that plugin. If it is set, don't perform the action. In FSUIPC assignments program the exit from the zone to set that flag.

or

2.Just as above, but program the exit from the zone to Kill the Lua plug in.

The second isn't a "nice" way though, so try the first.

Regards

Pete

Posted

I can only think of two ways to do this:

1. You could, in the Lua plugin, have an ipc.sleep for 100 mSecs, then, before doing the action, check one of the Lua flags for that plugin. If it is set, don't perform the action. In FSUIPC assignments program the exit from the zone to set that flag.

or

2.Just as above, but program the exit from the zone to Kill the Lua plug in.

The second isn't a "nice" way though, so try the first.

Regards

Pete

Thanks for the information, Pete.

I tried the "2" but not working well....

I want to try the "1" but I don't know the LUA command for read the axis.

In my case is: joy 1 axis Y. Can you give me an example of the LUA programming?

Thanks

Fabio

Posted

I want to try the "1" but I don't know the LUA command for read the axis.

Why do you want to read the axis? I'm now confused. If you aren't already reading the axis why should you want to to implement these changes?

Pete

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.