Jump to content
The simFlight Network Forums

FSUIPC v7.2.0 beta support: Adding Lvars to Offsets


John Dowson

Recommended Posts

Thinking about this further, I think this is due to the fact that, as the text  hasn't changed, setting the same text again won't be picked-up on the WASM as only changes to the CDA contents trigger the event to process. So, if you are setting the same text, this will not happen.

I can think a couple of ways around this:
   - automatically zero-ing the calculator code text sent (in the CDA) after updating, and ignoring this in the WASM
   - add some sort of count index to the calculator code CDA structure, so that the contents of the CDA is changed even if the c.code is the same.

I will investigate both options and post you and update to try in the next day or two.

John

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

Hello,

I try to control some Lvars via offset, but I can't make it work.

here what I did

while running the sim, I pull the list of available Lvars for my aircraft

for example lets take the following one

269563   [INFO]:     ID=003 B738_Landing_Light_Left = 0.000000

then I add it to the FSUIPC.ini like this

[LvarOffsets]
0=B738_Landing_Light_Left=66C0

i didn't precise the lengths of the offset because I don't know it.

after I modify my SIOC code to use joystick emulation function

Var 0198, Link IOCARD_SW, Device 2, Input 42 // Light Main Fixed L On
{        
    &joystick64 = changebit 29 v0026
}

the joystick emulator part works fine because I use it in other parts of the code

now, I'm not sure what to assign to the virtual button, offset byte set, offset word set...

i try several, and in the declaration as well but I never make it work.

I think I'm missing something important but I don't know what.

another thing, on this version of FSUIPC I didn't find the way to display offset in real time (in FSX it could be display on game) but I don't understand what is the method now.

thanks for your help.

Link to comment
Share on other sites

32 minutes ago, bertranda said:

now, I'm not sure what to assign to the virtual button, offset byte set, offset word set...

By not specifying the offset type/size, it defaults to an 8 byte (64 bit) floating point double. To use an FSUIPC offset control you need to choose an apprpriate size and type.

In this case I assume it is just a switch which is on or off, so probably have values 0 for off and 1 for on. So you only need the smallest offset -- a byte. So:

[LvarOffsets]
0=B738_Landing_Light_Left=UB66C0

Then you can assign to the Offset Byte Set control with a parameter of 0 for off and 1 for on, or if you just need a toggle, Offset Byte Togglebits with a parameter of 1.

32 minutes ago, bertranda said:

on this version of FSUIPC I didn't find the way to display offset in real time (in FSX it could be display on game) but I don't understand what is the method now.

It's the same, but under the "Offsets" menu option.

Pete

 

Link to comment
Share on other sites

On 5/30/2021 at 3:30 PM, bertranda said:

thanks Pete,

it works with some Lvars from default plane.

unfortunately it is not working with the flight model I want to use, so I conclude it is due to flight model.

 

BR

You can list and identify all custom 3rd party Lvars in your aircraft from within the WASM menu.
If the particular one you seek isn't exposed, you can take a peek at the XML/HTML/JS configuration file of whatever you are dealing with and spot the HTML variables of whatever you wanna manipulate. Then manipulate those the same way as Lvars.
You can also make a list of your custom HVars that you make a .hvar file of and place in %..%\Community\fsuipc-lvar-module\modules folder so that they are easily accessible from the WASM menu for your plane..

  • Like 1
Link to comment
Share on other sites

I have released another beta, v7.2.0d. Please see the Announcement: 

Hopefully this will be the final beta. I am planning to update the documentation (to include an example on how to use the lvar offsets functionality as it seems not to be clear) and will make this the official version later this week (or over the weekend).

John

 

Link to comment
Share on other sites

On 6/2/2021 at 5:34 AM, Milan Putnik said:

You can list and identify all custom 3rd party Lvars in your aircraft from within the WASM menu.
If the particular one you seek isn't exposed, you can take a peek at the XML/HTML/JS configuration file of whatever you are dealing with and spot the HTML variables of whatever you wanna manipulate. Then manipulate those the same way as Lvars.
You can also make a list of your custom HVars that you make a .hvar file of and place in %..%\Community\fsuipc-lvar-module\modules folder so that they are easily accessible from the WASM menu for your plane..

thanks for your answer,

the Lvars I want to manipulate are listed under the wasm menu, but for some reason it's not working.

I'm not High level IT guy, so I don't really understand your explanation.

I will continue to think about it and test.

anyway, thanks for the help.

 

BR

Link to comment
Share on other sites

10 hours ago, bertranda said:

the Lvars I want to manipulate are listed under the wasm menu, but for some reason it's not working

Which aircraft and lvar are you talking about? If you let me know I could possibly check it here - as long as its not an add-on aircraft.

Note that not all lvars are writeable - some are read only, but its not possible to tell which without trying them (as far as I'm aware).

Link to comment
Share on other sites

11 minutes ago, John Dowson said:

Which aircraft and lvar are you talking about? If you let me know I could possibly check it here - as long as its not an add-on aircraft.

Note that not all lvars are writeable - some are read only, but its not possible to tell which without trying them (as far as I'm aware).

Hello,

it is addon aircarft.

this is specific situation, so maybe don't bother too much about this.

Regards.

Link to comment
Share on other sites

On 6/4/2021 at 10:18 AM, bertranda said:

Hello,

it is addon aircarft.

this is specific situation, so maybe don't bother too much about this.

Regards.

Allright, what's the name of the aircraft - and point out the LVars you require but are having troubles with. 
I'd like to check it out.

Link to comment
Share on other sites

14 hours ago, Milan Putnik said:

Allright, what's the name of the aircraft - and point out the LVars you require but are having troubles with. 
I'd like to check it out.

Hello, I use prosim with the beta flight model 737-800.

this flight model is to be used only with prosim, since it has no virtual cockpit.

this flight model is intended to be used with prosim V3, and provided with it's own wasm module.

but I use prosim V1 and it is not supported with this flight model. it works for me, except some functions like individual lights, door system, retractable light animation...

it is communicating directly with simconnect i think. that's why I thought that, with this new function of FSUIPC, I could make it work instead of using the wasm module provided, but no...

that is the story.

I don't expect any support from prosim because V1 is not supported anymore.

Regards.

Link to comment
Share on other sites

9 hours ago, bertranda said:

Hello, I use prosim with the beta flight model 737-800...

I understand. Prosim simvars are not a problem since I got the complete list of old Prosim variables from back in the day when it's been my FTD design preference over other solutions for almost every certification level. I think you should also have all of them with the software.
But the V1 exposes different simvars compared to V3, there will not be any reaction - you are right.

Link to comment
Share on other sites

10 minutes ago, papanebo said:

Is the WASM module a requirement in order to read Lvars (using the FSUIPC7.ini method)?

Yes. There's no access to LVars through normal SimConnect functions, so FSUIPC needs the internal module (the WASM) to obtain them and supply them through data facilities in SimConnect.

Why the question? The WASM module does no harm.

Pete

 

Link to comment
Share on other sites

Is it possible to also assign hvars to offsets? for example, to be able to assign  MCDU or FCU switches to  hardware buttons.

Or at the moment only lvars can be  accessed this way.

I do not really understand the differense between lvars and hvars, but i can see that  there are hvars for mcdu and fcu buttons for the a320.

Thank you

Link to comment
Share on other sites

Just now, parsa said:

Is it possible to also assign hvars to offsets? for example, to be able to assign  MCDU or FCU switches to  hardware buttons.

Or at the moment only lvars can be  accessed this way.

Only lvars can be accessed via offsets. I wasn't planning on adding hvars to offsets - there is no point really as they don't have a value (so could only be used for activating). I am planning to add an FSUIPC control to activate hvars, which would allow you to assign hvar activation to buttons and switches. But, for the time being, you will have to use either a macro file or lua to achieve this.

  • Like 1
Link to comment
Share on other sites

   

Hello Pete, hello John

******** FSUIPC7, Version 7.2.0 (8th June 2021) by John Dowson *********

Lvar list by fusipc :

746594   [INFO]:     ID=022 XMLVAR_YokeHidden1 = 0.000000

in fsuipc.ini   

[LvarOffsets] 
0=XMLVAR_YokeHidden1=SW UB 0x66C0     

log file 

    8406 SimObjects\Airplanes\Asobo_CJ4\aircraft.CFG
     8406 User Aircraft ID 1 supplied, now being used
     8468 Aircraft loaded: running normally now ...
     8984 Aircraft="Cessna CJ4 Citation FFK"
     8984   [INFO]: **** Starting FSUIPC7 WASM Interface (WAPI) version 0.5.1
     8984   [INFO]: Connected to MSFS
     8984 **** Lvar 'XMLVAR_YokeHidden1' not found: cannot add to offset 0x
     8984 System time = 11/06/2021 15:51:44, Simulator time = 15:24:13 (19:24Z)
 

What am I doing wrong?

Yves from Canada

 

Link to comment
Share on other sites

John,

  Here, as well as on your announcements page, you describe v7.2.0 as 'beta', however on the official software page (where to get the software), it is posted, but not listed as 'beta'.

  As I'm still a bit of a nooby with your software (although I expect to gain knowledge over time), I've been reluctant to update my (purchased) FSUIPC software until you have released a new, fully tested, version (non-beta).

  Is v7.2.0 no longer 'beta'?

Thanks

Link to comment
Share on other sites

John,

  Here, as well as on your announcements page, you describe v7.2.0 as 'beta', however on the official software page (where to get the software), it is posted, but not listed as 'beta'.

  As I'm still a bit of a nooby with your software (although I expect to gain knowledge over time), I've been reluctant to update my (purchased) FSUIPC software until you have released a new, fully tested, version (non-beta).

  Is v7.2.0 no longer 'beta'?

Thanks

Link to comment
Share on other sites

11 hours ago, yvesb said:

in fsuipc.ini   

[LvarOffsets] 
0=XMLVAR_YokeHidden1=SW UB 0x66C0     

First, the format is incorrect - The offset cannot be both a signed word (SW) and an unsigned byte (UB). PLEASE see the documentation in the Advanced User guide for the format. I am not going to explain this yet again....

Second, you have added the lvar in  general section (i.e. not profile specific) so it will try and get that lvar for every aircraft. It certainly won't exist for every aircraft, so you will get an error if the lvar cannot be found. Try listing the available lvars for your loaded aircraft using the Add-ons->WASM->List Lvars menu option.

 

Link to comment
Share on other sites

11 hours ago, grwinski said:

Here, as well as on your announcements page, you describe v7.2.0 as 'beta', however on the official software page (where to get the software), it is posted, but not listed as 'beta'.

  As I'm still a bit of a nooby with your software (although I expect to gain knowledge over time), I've been reluctant to update my (purchased) FSUIPC software until you have released a new, fully tested, version (non-beta).

  Is v7.2.0 no longer 'beta'?

Yes, v7.2.0 is no longer in beta - it is now the latest and only supported version.

  • Like 1
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • 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.