Jump to content
The simFlight Network Forums

Recommended Posts

Posted
On 2/7/2022 at 3:58 PM, John Dowson said:

There is a version available, v7/2/16c, including an updated WASM, that has a 1k limit for the calculator code if you would like to try it. It can be found here:
    http://www.fsuipc.com/download/Install_FSUIPC7v7.2.16c.zip

John

Tried it with 
 

@ 10.23 / {value} max 100 min 88 (>K:2:LIGHT_POTENTIOMETER_SET) @ 10.23 / {value} max 100 min 89 (>K:2:LIGHT_POTENTIOMETER_SET) @ 10.23 / {value} max 100 min 8 (>K:2:LIGHT_POTENTIOMETER_SET) @ 10.23 / {value} max 100 min 92 (>K:2:LIGHT_POTENTIOMETER_SET) @ 10.23 / {value} max 100 min 93 (>K:2:LIGHT_POTENTIOMETER_SET)

wich is >255 chars for CPT PFD, ND, ECAM1 and ECAM2 and works like a charm. Thanks a lot John!

Posted

@joeherwig FY, I have just released v7.2.16, which allows you to define parameterized presets to assign and execute calculator code on a button press without needing to use lua. The MobiFlight presets are also included. Please see the Advanced User guide for details.

John

Posted

Hi Joe,

Please do, and if you haven't done this already, check out the MobiFlight HubHop website for presets/calculator code, and consider submitting any additional code there. It is the main community resource for MSFS calc code.

Cheers,

John

 

  • 7 months later...
Posted

Since John added already the capability to use parameterized CalculatorCode Presets on axes as well i just added the dimmers now based on that standard mode:

Just add the lines for your myevents.txt

A32NX_LIGHT_POTI_CPT_PFD#@ 10.23 / $Param 16384 + 327.86 / max 100 min 88 (>K:2:LIGHT_POTENTIOMETER_SET)
A32NX_LIGHT_POTI_CPT_ND#@ 10.23 / $Param 16384 + 327.86 / max 100 min 89 (>K:2:LIGHT_POTENTIOMETER_SET)
A32NX_LIGHT_POTI_CPT_WX_TERR#@ 10.23 / $Param 16384 + 327.86 / max 100 min 94 (>K:2:LIGHT_POTENTIOMETER_SET)
A32NX_LIGHT_POTI_CPT_CONSOLE#@ 10.23 / $Param 16384 + 327.86 / max 100 min 8 (>K:2:LIGHT_POTENTIOMETER_SET)
A32NX_LIGHT_POTI_FO_PFD#@ 10.23 / $Param 16384 + 327.86 / max 100 min 90 (>K:2:LIGHT_POTENTIOMETER_SET)
A32NX_LIGHT_POTI_FO_ND#@ 10.23 / $Param 16384 + 327.86 / max 100 min 91 (>K:2:LIGHT_POTENTIOMETER_SET)
A32NX_LIGHT_POTI_FO_WX_TERR#@ 10.23 / $Param 16384 + 327.86 / max 100 min 95 (>K:2:LIGHT_POTENTIOMETER_SET)
A32NX_LIGHT_POTI_CPT_CONSOLE#@ 10.23 / $Param 16384 + 327.86 / max 100 min 9 (>K:2:LIGHT_POTENTIOMETER_SET)
A32NX_LIGHT_POTI_FCU#@ 10.23 / $Param 16384 + 327.86 / max 100 min 87 (>K:2:LIGHT_POTENTIOMETER_SET)
A32NX_LIGHT_POTI_ECAM_UPPER#@ 10.23 / $Param 16384 + 327.86 / max 100 min 92 (>K:2:LIGHT_POTENTIOMETER_SET)
A32NX_LIGHT_POTI_ECAM_LOWER#@ 10.23 / $Param 16384 + 327.86 / max 100 min 93 (>K:2:LIGHT_POTENTIOMETER_SET)
A32NX_LIGHT_POTI_DISP+INTEGLT#@ 10.23 / $Param 16384 + 327.86 / max 100 min 88 (>K:2:LIGHT_POTENTIOMETER_SET) @ 10.23 / $Param 16384 + 327.86 / max 100 min 89 (>K:2:LIGHT_POTENTIOMETER_SET) @ 10.23 / $Param 16384 + 327.86 / max 100 min 93 (>K:2:LIGHT_POTENTIOMETER_SET) @ 10.23 / $Param 16384 + 327.86 / max 100 min 92 (>K:2:LIGHT_POTENTIOMETER_SET) @ 10.23 / $Param 16384 + 327.86 / max 100 min 87 (>K:2:LIGHT_POTENTIOMETER_SET) @ 10.23 / $Param 16384 + 327.86 / max 100 min 85 (>K:2:LIGHT_POTENTIOMETER_SET) @ 10.23 / $Param 16384 + 327.86 / max 100 min 86 (>K:2:LIGHT_POTENTIOMETER_SET)

and then assign it in FSUIPC directly:
LightPotentiometer_range.png.16e8a573b9ffd58a0712da544eba372e.png

  • Like 1
Posted

Thanks @joeherwig. I thought I had removed axes assignments to presets as I wasn't sure if this was that useful and am uncertain about the performance when controlling an axis using calculator code. I added the preset checkbox to allow presets to be used in the right-hand side, but this also has the effect of allowing the preset to also be assigned to the axus input. This isn't an issue in itself, but I think there may be some issues when reviewing an axis assignment to a preset - I will check this and also update the documentation for this.

Cheers,

John
 

Posted

Hi John,

If you keep that "side effect" it would be very nice. 👍
If you can adjust it to refer to the name instead of the line index (or whatever it is) it would be perfect. 👍👍👍🧡

As at least on my quite old system with quad core and 1080ti only i cannot notice any performance impact even with the really long combination of multiple calculator codes.

Joe

Posted
1 hour ago, joeherwig said:

If you can adjust it to refer to the name instead of the line index (or whatever it is) it would be perfect. 👍👍👍🧡

Could you try the attached beta please, 7.3.9e. This should automatically re-write your ini to use the preset name when assigned to an axis, although you may have to go into the axis assignment dialog and click 'OK' to update.

Thanks,

John

FSUIPC7.exe

  • Thanks 1
Posted
1 hour ago, John Dowson said:

Could you try the attached beta please, 7.3.9e. 

Wow! That's been awesome fast. Thanks. I'll check it tonight if the Su10 download doesn't block me too long. 

Posted
20 hours ago, John Dowson said:

Could you try the attached beta please, 7.3.9e. This should automatically re-write your ini to use the preset name when assigned to an axis, although you may have to go into the axis assignment dialog and click 'OK' to update.

Hi John,

Works like a charm in 7.3.9e.
Thanks a lot!

0=DX,256,F,PA32NX_LIGHT_POTI_DISP+INTEGLT,0,0,0	-{ TO SIM: Preset Control }-
11=DY,256,F,PA32NX_LIGHT_POTI_FO_PFD,0,0,0	-{ TO SIM: Preset Control }-

 

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.