Jump to content
The simFlight Network Forums

Alt-F needs 3 times to show the UI window, and Hvar list is empty


AlMassimo

Recommended Posts

Hi John,  with the last release I need to press 3 times Alt-F in order to have the Fsuipc 7 window open.

The first Alt-F makes the window to flash briefly on the screen then disappear, second time nothing happens, then third time the window opens up normally. I restarted PC, MSFS, FSuipc, everything but still the same. Can you check if it is a possible bug or if is only my PC that has some issue ? What should I check ?

When the window opens, if I go under wasm, list Hvars, I get an empty panel. List Lvars populates as before with all available lvars. I'm currently using Asobo B747-8 and I am proceeding pretty well with the Opencockpits MCP and EFIS panel, almost all the main functions are active but it took me a lot of trial and error before finding the proper offset, lvars and events.

I have stored in a folder all the files I created for FBW A320 (Fsuipc7.ini, myevents.txt, A32NX.evt, SIOC.txt, A32NX.mcro) and I am creating new config files for the B747. The idea is to create many folders each with the files for a specific plane, so to be able to use my home cockpit with many different planes, just copying the appropriate files in the main folder.

The biggest issue is the lack of control over the MSFS internal vars, B, I, etc., but many things work with default offsets and custom events.

 

 

Link to comment
Share on other sites

1 hour ago, AlMassimo said:

with the last release I need to press 3 times Alt-F in order to have the Fsuipc 7 window open.

Nothing at all has changed w.r.t. the hot key.

1 hour ago, AlMassimo said:

The first Alt-F makes the window to flash briefly on the screen then disappear, second time nothing happens, then third time the window opens up normally. I restarted PC, MSFS, FSuipc, everything but still the same. Can you check if it is a possible bug or if is only my PC that has some issue ? What should I check ?

The first Alt-F will show the window, bring it to the top and remove the tray icon. It most probably disappears behind MSFS as that is then requesting to be on top. The second Alt-F will hide MSFS again to the system tray. The third Alt-F will again show the window and bring it to the top. For me, the MSFS main window will never show on top of the MSFS main window - it is always obscured unless I actually select the window itself. I'm not sure why this is, and I don't think there is anything that can be done as I am already requesting that the window be on top when its shown, but it looks like MSFS is overriding this somehow. I'm surprised ou see the window on the third Alt-F - I don't.

As I said, nothing has changed in this area and I don't think there is anything I can do, but I will take another look at some point.

1 hour ago, AlMassimo said:

if I go under wasm, list Hvars, I get an empty panel.

Hvars are loaded from *.hvar files based upon a match with the aircraft name (or possibly the aircraft.cfg folder name), and the *.hvar files must be in one of two distinct locations. Please see the Advanced User guide and check that you have the correct hvar file in the correct location and the name is a substring match to the aircraft name. If you have any difficulties, activate debug logging in the WASM and take a look at the WASM log - this should tell you what hvar files have been found and which  ones match and are loaded.

Also, rather than using hvar files, you can just create a preset to activate a hvar instead, using the myevents.txt file. This has the advantage of being directly assignable (in the assignments UI) and the hvar names do not need to be made known to FSUIPC7 via the hvar files to be used. Also see the Advanced User guide for details.

John

Link to comment
Share on other sites

Hi thanks John, I now understand a little better what could happen and why the 2nd Alt-F seems to do nothing (it hides the window) and then the 3rd makes the window to open and stay. The first Alt-F maybe is not working because I'm currently using SpaceDesk for displaying the gauges on a secondary PC. I'll try Alt-F without spacedesk and see if it works as before.

Hvars : I'll check the files. No problems for the functionality, I'm fully using myevents.txt and all works fine, I just can't see the hvars available on the panel, but they are correctly used by the program (I use SIOC and call the events as explained in advanced users guide, and some events use hvars and work perfectly). Most likely I don't have the proper .hvar file for B747-8, I'll check that.

14 hours ago, John Dowson said:

I will look into adding a 'Force Main Window to Top' option to see if this helps, as you can do with the logging console window.

Yes indeed, I was thinking the same thing! Console window stays on top and allow to see the effects when I click some control on the VC.

A big big goal could be to update lvars values automatically (without selecting list lvars again) to monitor value changes performing some action, as happens under developer mode in MSFS. This can also be done in MobiFlight assigning a variable to an output and in the interface I can see the value changing (eg. an analog value changes continuously). I know this can be done using the console log, but many times the rows scroll up so quickly that is difficult to see what happens.

 

Link to comment
Share on other sites

3 hours ago, AlMassimo said:

A big big goal could be to update lvars values automatically (without selecting list lvars again) to monitor value changes performing some action, as happens under developer mode in MSFS.

If you add the lvars to offsets, you could use the Offset monitoring facility to log the lvar changes (to the console or MSFS title bar). As the simconnect text display facility seems to be permanently broken, I am considering changing this to allow logging to be displayed in a wnd window. I could also look into adding specific lvar logging - I will add this to my list of new features to look into.

3 hours ago, AlMassimo said:

I'll check the files. No problems for the functionality, I'm fully using myevents.txt and all works fine, I just can't see the hvars available on the panel, but they are correctly used by the program

You can use hvars via executing calculator code or via presets (which are also executed as calculator code), but such hvars are not known to FSUIPC7. The only way to make them known, and so have them listed, is via the *.hvar files. But there is no need to do this, except if you want to be able to list them or use them via macros or the lua ipc hvar functions.

John

Link to comment
Share on other sites

39 minutes ago, John Dowson said:

I am considering changing this to allow logging to be displayed in a wnd window. I could also look into adding specific lvar logging - I will add this to my list of new features to look into.

Absolutely great! Thanks

 

39 minutes ago, John Dowson said:

You can use hvars via executing calculator code or via presets (which are also executed as calculator code), but such hvars are not known to FSUIPC7. The only way to make them known, and so have them listed, is via the *.hvar files. But there is no need to do this, except if you want to be able to list them or use them via macros or the lua ipc hvar functions.

Got it. As I said I am currently working with hvars, no problem, just couldn't understand why suddendly I could not see the havars list any more. Now is clear, thanks.

Link to comment
Share on other sites

Just to eliminate a doubt, I tested Alt-F without SpaceDesk and the secondary monitor, and nothing changed.

It is strange but I'm pretty sure that with the previous release of Fsuipc the window came up at first Alt-F on the keyboard. Difficult to understand why the first window doesn't stay on top and the third one does, but after all it is not a big issue, just a little bit annoying 😉

Much more interesting would be to have the window always in front as the console.

I also confirm that there is no B747-8.hvar file under wasm dir, even if B-747 does use hvars, but I cannot find a list of those hvars anywhere.

Besides, unfortunately, exploring behaviours under SDK window, I found that B737 is using some B and O vars that cannot be read or modified, and Asobo seems to ignore all requests to even consider making them accessible, what a pity for home-cockpit builders.

Today I will do some testing with MSFS keyboard controls, in order to see if they activate correctly the MCP functions on B747. If so, I could assign a keyboard shortcut to Fsuipc actions and that should work (pressing a button I should obtain the MSFS action corresponding to that shortcut). My problem though is that I have to send the shortcut via SIOC, because I can only use SIOC for my MCP. I don't know how to associate a custom offset or a control to make Fsuipc send a keypress...

Link to comment
Share on other sites

Probably I could do that in lua, using ipc.keypress(keycode) - that means, when a custom offset is changed by SIOC, then lua sends an ipc.keypress.

If the keypress works in MSFS I should obtain the same effect, bypassing the unaccessible variables or events.

I'll do some test and report the results, I think this could be interesting (maybe even obvious for some expert builders !)

 

Link to comment
Share on other sites

2 hours ago, AlMassimo said:

I also confirm that there is no B747-8.hvar file under wasm dir, even if B-747 does use hvars, but I cannot find a list of those hvars anywhere.

There is a hvar file for the B747 included under the HvarFiles folder if your FSUIPC7 installation folder. This was generated quite some time ago now so it may not contain all available hvars, but you could use that as a starting poinr and add any that you use that are currently missing.

2 hours ago, AlMassimo said:

I found that B737 is using some B and O vars that cannot be read or modified, and Asobo seems to ignore all requests to even consider making them accessible, what a pity for home-cockpit builders.

Yes. There is currently a MobiFlight request to provide access to all sych variables - you should vote for this: https://forums.flightsimulator.com/t/enhanced-api-to-access-all-aircraft-state-and-trigger-all-cockpit-functions/454608

Quote

My problem though is that I have to send the shortcut via SIOC, because I can only use SIOC for my MCP. I don't know how to associate a custom offset or a control to make Fsuipc send a keypress...

You can use offset 0x3110 to send any control, including custom controls and presets. Add-on control 1070 (Key Press and Release), 1071 (Key Press/Hold) and 1072 (Key Release) can be used to send keypresses using this offset. You can also set lvars, activate hvars and call presets using offset 0x7C50. Offset 0x3200 can also be used to send key presses.

Also, check the MoviFlight preset lust for the B747 if you haven't done this already (https://hubhop.mobiflight.com/#/list).

John

 
Link to comment
Share on other sites

Wow I couldn't remember about 1070-1072 or 3200, they look very interesting! Thanks for the advices, I'll study and test them.

In the meanwhile I solved the issue with a very simple lua code :

In SIOC I set the offset 0xA006 to 1 when the SPEED HOLD button is pressed on MPC, then lua detects the change and send Alt-R to MSFS

function AP_speed()
    if ipc.readUB(0xA006) == 1 then
        ipc.keypress(82, 16)
    end
end

event.offset(0xA006, "UB", "AP_speed")

This works pretty well, and at last I succeeded in managing AP SPEED HOLD. Looking on the console the MSFS command sends 3 controls, I tried to replicate them in an event under myevent.txt

AM_B747_SPD_HOLD#0 (>K:AP_AIRSPSPEED_HOLD) 1 (>K:AP_MANAGED_SPEED_IN_MACH_OFF) 1 (>K:SPEED_SLOT_INDEX_SET)

but for some reason this seems not to work. I can't see the command being sent in the console, and I don't get the expected effect in the simulator. I can't find an error in my custom event, but maybe is uncorrect. I would prefer to control the events with this "calculator code" instead of sending keypresses, it makes me feel more "in control" of what I am doing. But on the other hand, sending keypresses leave the "dirty work" to MSFS, and should work with different planes, so I probably will go on with this solution, either in lua or with 1070 or 3200 offsets (or controls ?).

1070 Key Press and Release (param is Keycode + 256*Shift code, or JsBk)

To what I understand I should use 3110 and 3114 offsets to send the control and parameter

Var 0001 name FS_CONTROL Link FSUIPC_OUT Offset $3110 Length 4
Var 0002 name FS_PAR Link FSUIPC_OUT Offset $3114 Length 4

and then use 1070 as control number and (e.g. for Alt-R  82 + 256 * 16 = 4178) as parameter, is this correct ? I'll try this in SIOC.

 

 

Link to comment
Share on other sites

Thanks John, I tested 1070 control and it worked perfectly, this simplifies the code, I don't need a custom offset and lua code, it is very straightforward.

var 0248, name I_SPEED, Link IOCARD_SW,  Input 31
{
  IF &I_SPEED = 1
  {
       &FS_PAR = 4178 // Alt+R = (alt)16*256 + 82(R)
       &FS_CONTROL = 1070  // send keypress
       &FS_CONTROL = DELAY 0 10
   }
}

And this should work for every custom plane I think.

I also found the B747-8.hvar file in Fsuipc7 folder and copied it to Fsuipc\Wasm folder.

Link to comment
Share on other sites

  • 4 weeks later...

Hi John, I saw that was available a new release of Fsuipc 7 so I hurried up installing it, but the program icon shows up a bit in the program bar in W10,

then after some seconds (maybe 20-30 secs) it disappears and the program is no longer running.

I tried to launch it from the installation folder (without MSFS running) and it does exactly the same.

The log file is very short and ends just after

      141 Preset file 'D:\FSTools\FSUIPC7\events.txt' not found [info only]
      141 2 Calculator Code presets loaded

No warning or error messages, all seems Ok (same rows as in the previous log working).

I installed the 18 april version and it runs perfectly as before, no issue at all.

I am going on with the previous release, just want to report this strange behaviour of new release on my PC...!

 

 

Link to comment
Share on other sites

Hi mtjoeng your hint worked, now FSUIPC7 3.4 woks fine, tank you, I owe you a beer 😉

Now finally also the triple-Alt-F issue is solved, the interface opens up just hitting Alt-F once, as it was before.

Apparently Fsuipc7.ini seems identical to the previous one, but surely there is some difference somewhere, I'll check the 2 files more deeply.

THANKS

Link to comment
Share on other sites

11 hours ago, AlMassimo said:

Apparently Fsuipc7.ini seems identical to the previous one, but surely there is some difference somewhere, I'll check the 2 files more deeply.

That sounds strange. Do you not have any assignments? I see you are not using the events.txt file but have 2 events in your myevents.txt file.
Maybe try again with your previous ini to see if that still gives issues and if so post it here and I will take a look.

Link to comment
Share on other sites

Yes John, I rename events.txt to events.tx0 in order to have myevents.txt with all and only the required events. and easy numbering, this works fine for me.

I use events.txt only for finding the useful code, then I transfer it to myevents.txt (specific for each different plane).

I created a folder for every plane, with : FSUIPC.ini, SIOC_ACTIVE.txt, MF_active.mcc, myevents.txt, planexx.lua, ipcready.lua.

When I decide to use that plane I just copy the specific files in their normal folders and all the cockpit is reconfigured for that plane.

I enclose the FSUIPC7.ini I had before installing the new release. I could copy it again and repeat the test with the new release.

The strange is that FSUIPC7 just stopped after loading the events files (at least according to .log file) but maybe some of the files were not present in the folder at the moment, without giving any message.

Unfortunately I didn't save the complete .ini file that did not work, but the first part seemed totally normal to me.

 

FSUIPC7.ini

Link to comment
Share on other sites

The different versions of fsuipc7.ini I created differ almost only for the "[LvarOffsets]" section, since I'm using myevents.txt also for hvars,

instead of using .evt files. With myevents.txt I can use all kind of variables and controls, so it is more powerful, the only limitation

seems to be that I cannot assign values to offsets as calculator code (AFAIK), so when I have to do that I use SIOC code instead

and LVARS declaration in fsuipc7.ini

 

 

Link to comment
Share on other sites

The ini you attached is from 7.3.3, and looks fine and loads ok here.
Do you have a problem now or not? Not sure if I am supposed to be looking into anything...

2 hours ago, AlMassimo said:

the only limitation seems to be that I cannot assign values to offsets as calculator code (AFAIK)

That's not possible as calculator code runs in the FS and offsets are part of FSUIPC (and in a separate process). However, if you want the value of a calculator code expression to go into an offset, you can create your own lvar, asddthat to an offset, and then update the calculator code to write the value to that lvar.

 

Link to comment
Share on other sites

Hi John, Fsuipc7 3.4 is working fine after I reinstalled it having deleted the .ini file (as I said I haven't saved a copy of the .ini file modified by the first installation of 3.4

Deleting .ini and reinstalling 3.4 solved the problem.

9 minutes ago, John Dowson said:

you can create your own lvar,

WOW this is something I really think will be useful, didn't know about that, I'll try ASAP. To create an Lvar I define it in the ini file ?

eg

[LvarOffsets]
1=AM_testLvar01=UBA000

and then I can use it in calculator code ? That would be great.

 

Link to comment
Share on other sites

47 minutes ago, AlMassimo said:

To create an Lvar I define it in the ini file ?

eg

[LvarOffsets]
1=AM_testLvar01=UBA000

and then I can use it in calculator code ?

No. You would have to use the lua ipc.createLvar() function (or create it via offsets), and then issue an ipc.reload() to reload all lvars (although I'm not sure that is necessary as it may be done by the function itself - I would need to check). I'm also not sure the the [LvarOffset] sections is reprocessed on a reload() command...they should be, but if not then you would need to add an event.Lvar function to and add/update the offset in the handling function. 

Link to comment
Share on other sites

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.