Jump to content
The simFlight Network Forums

Recommended Posts

Posted (edited)

Hi Pete,

Thanks for your wonderfull program.

I have a (maybe dumb) question.

In my FSUIPC.ini make use of the Cyclic Byte Increment and decrement functions to incr/decr. user offset, which i then use as conditions in Button assignments.

But is it not possible to send the Value of this offset directly in FSUIPC.ini as parameter to the control assigned to a button press instead of using it as a condition which would save a lot of lines in my .ini file because i make extensive use of it. Also I don't like using LUA scripts, seems to me that this is at the cost of Performance (one more thing to load and execute).
Fastest way is directly in the button assignment in my humble opinion.

As example:

350=CP(+64,4)(+Y,8)(+Y,16)Y,2,Cx510066C0,x00070001     -{offset byte cyclic inc, offset 66C0 (Incr=1, Limit=7)}-
351=CP(+64,4)(+Y,8)(+Y,16)Y,3,Cx610066C0,x00070001     -{offset byte cyclic dec, offset 66C0 (Decr=1, Limit=7)}-
352=B66C0=0 CP(+64,4)(+Y,8)(+Y,16)Y,2,C69993,0     -{Custom control: <69993>}-   ;EFIS ND Scale
353=B66C0=0 CP(+64,4)(+Y,8)(+Y,16)Y,2,C70049,0     -{Custom control: <70049>}-
.....
366=B66C0=7 CP(+64,4)(+Y,8)(+Y,16)Y,2,C69993,7     -{Custom control: <69993>}-
367=B66C0=7 CP(+64,4)(+Y,8)(+Y,16)Y,2,C70049,7     -{Custom control: <70049>}-
368=B66C0=0 CP(+64,4)(+Y,8)(+Y,16)Y,3,C69993,0     -{Custom control: <69993>}-
369=B66C0=0 CP(+64,4)(+Y,8)(+Y,16)Y,3,C70049,0     -{Custom control: <70049>}-
.......
382=B66C0=7 CP(+64,4)(+Y,8)(+Y,16)Y,3,C69993,7     -{Custom control: <69993>}-
383=B66C0=7 CP(+64,4)(+Y,8)(+Y,16)Y,3,C70049,7     -{Custom control: <70049>}-

Wouldn't it be nice to replace it with:
350=CP(+64,4)(+Y,8)(+Y,16)Y,2,Cx510066C0,x00070001     -{offset byte cyclic inc, offset 66C0 (Incr=1, Limit=7)}-
351=CP(+64,4)(+Y,8)(+Y,16)Y,3,Cx610066C0,x00070001     -{offset byte cyclic dec, offset 66C0 (Decr=1, Limit=7)}-
352=CP(+64,4)(+Y,8)(+Y,16)Y,2,C69993,<VALUE OF B66C0>     -{Custom control: <69993>}-   ;EFIS ND Scale
353=CP(+64,4)(+Y,8)(+Y,16)Y,3,C69993,<VALUE OF B66C0>     -{Custom control: <69993>}-

Hope you can help me out here.

Thanks anyway for your time and great program!

Edited by LeoSchoonbroodt
Posted
1 hour ago, LeoSchoonbroodt said:

But is it not possible to send the Value of this offset directly in FSUIPC.ini as parameter to the control assigned to a button press

No: you are correct. No such facility exists.

1 hour ago, LeoSchoonbroodt said:

As example:

You are inrementing or decrementing 66C0 between 0 and 7 but only using value 0 and 7? Why not just have t toggline between 0 and 1?

1 hour ago, LeoSchoonbroodt said:

Wouldn't it be nice to replace it with:

No, not in my opinion. I wish I hadn't added any button programming features to the INI as it is, without making it even more complicated and arcane. I added the Lua plug-in facilities specifically to avoid all that complication. what you want to do would be far cleaner and easy to understand in a simple plug-in.

Pete

 

Posted

Hi Pete,

 inrementing or decrementing 66C0 between 0 and 7 but only using value 0 and 7? Why not just have t toggline between 0 and 1?

No, i am using all the values for Incrementing and decrementing the Scale of the ND Display as you can see from the linenumbers, I just didn't want to clutter the post with all these lines.

Doesn't loading and executing a Lua plugin cost extra performance? The PMDG 737 eats already a lot of the performance of my system.

 

Anyway thanks for your time, maybe i will start experimenting with Lua.

Posted
3 minutes ago, LeoSchoonbroodt said:

Doesn't loading and executing a Lua plugin cost extra performance?

No. If anything, because the plug-ins run in their own, separate, threads (not in the main thread like your Button programming), it would tend to be less. And you can have plug-ins loaded once (eg via an [Auto] entry in the INI, of using ipcReady.lua to load them), and just responding to events just like the button assignments. Of course it can be easier just to assign a Lua to a button so it loads and unloads then, but considering there's a limit on how quickly you can press buttons that's pretty neglibible too.

Pete

 

Posted
26 minutes ago, LeoSchoonbroodt said:

But think many examples can be found on Internet.

For FSUIPC application mostly it's just library function calls, so the Lua package supplied in your FSUIPC Documents folder should be the biggest help -- there are a lot of examples there too. And check some of the threads in "User Contributions" subforum too.

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.