Jump to content
The simFlight Network Forums

Any possibility to control e.g VS?


guenseli

Recommended Posts

Hello,

 

first thanks for your great work!

 

I still trying to interface MSFS with LUA.

Most simple controls do work, many for the AP fortunately.

But I can't get to have VS (hold) working. (up and down works)

 

Is there any possibility to make VS working with FSUIPC?

 

many thanks

Link to comment
Share on other sites

thank you for your answer.

 

The last topic you linked for me is exactly my problem, FLC and VS are the same which are not accessible currently it seems. So, we have to wait.

 

So, with the list provided in the MSFS SDK --> Dokumentation (EventIds or Simulation Variables) we could also not work currently? (hope that is not a dumb question - but I have no clue)

 

thx!

Link to comment
Share on other sites

8 hours ago, guenseli said:

So, with the list provided in the MSFS SDK --> Dokumentation (EventIds or Simulation Variables) we could also not work currently?

Some work, some don't, and others have issues. We report the ones that we find problems with (that FSUIPC use) to Asobo and hopefully they will be fixed in a future update.

I haven't tried the Flight Level Change sim variable yet though, as although its listed in the variable list, its not listed in the simconnect variable list. I'll check it tomorrow.

Link to comment
Share on other sites

I tried adding this simvar to FSUIPC7. It updates correctly when toggling the button in the UI for the aircraft, but changing this externally seems to have no affect (i.e. its ok for read but not for write).

There are currently quite a few reports on autopilot functionality not working via simconnect (especially for the G1000), so i think we need to wait for  a simconnect update to get these fixed.

Link to comment
Share on other sites

Btw, which aircraft are you using? Is this a general problem or an issue with a specific aircraft?

And have you tried the AP Vs Var Set English/Metric controls? Or offsets 0x07EC / 0x07F2? I was wondering if these have the same issue as the AP_ALT_VAR_SET_ENGLISH event /  AUTOPILOT ALTITUDE LOCK VAR simulator variable that needs to be reported.

Link to comment
Share on other sites

I tried all the above controls and offsets you suggested and some more ... (AP_Panel_VS_on/off etc). Nothing works.

 

I tested it with the TBM and the Cessna Caravan.

Haven't tested other so can't say if its tied to these two only. Don't think so.

 

If I send the control I get the following error:

   816485 LUA.5: LINDA:: [F] FSX control: 65890  param: 1
   816485 Exception 1 "ERROR", Ref 3678, Index param 2 on TransmitClientEvent, object=0, id=65890 (????), data=1

 

Link to comment
Share on other sites

65890 is AP_PANEL_VS_HOLD, which is not available in MSFS, at least according to the documentation. In fact, it seems that non of the AP VS controls are available, except for the incr/decr and var set metric. I'll try enabling the old VS controls (ON,OFF, Set Hold), including the panel versions, here to see if they are recognised. If so, I'll add them back in and let you know. Otherwise I'll report to Asobo.

Link to comment
Share on other sites

I've added them back and they don't give any 'unrecognized' errors, which is a good sign. Not sure if they work or not though. Could you try the attached build and let me know.
I've added back the following controls:
    AP Panel VS Hold
    AP Panel VS Off
    AP Panel VS On
    AP Panel VS Set
    AP VS Hold
    AP VS Off
    AP VS On
    AP VS Set

FSUIPC7.exe

Link to comment
Share on other sites

YES!!!

 

All the above is working!

So, if you could implement FLC also, we have covered the most important AP functions!

 

I seek also for Map Range/Zoom for the Garmins, but as it isn't also implemented in the default assignments, I do not think theres a possibility?!

 

Many thx!!!

Link to comment
Share on other sites

1 minute ago, guenseli said:

All the above is working!

Ok, thats good to know, thanks. I'll leave them in for the next build release.

1 minute ago, guenseli said:

So, if you could implement FLC also, we have covered the most important AP functions!

For FLC, I've added a new offset at 0x0B49, 1 byte, for sim variable 'AUTOPILOT FLIGHT LEVEL CHANGE'. However, this only appears to be read-only and not settable. I've already asked about this over on the Asobo forums (as well as VNAV/VNV)

4 minutes ago, guenseli said:

I seek also for Map Range/Zoom for the Garmins, but as it isn't also implemented in the default assignments, I do not think theres a possibility?!

No, probably not at the moment. There seem to be quite a few functions of the garmins (especially the G1000) which are not available via SimConnect at the moment.

Actually, looking at the older controls list (not yet added to MSFS or in their documentation), I can see these
    GPS_VNAV_BUTTON
    GPS_SETUP_BUTTON
    GPS_BUTTON1 (also 2,3,4,5)

I'll add these back to see if they are recognized and do anything when I get a chance...

 

Link to comment
Share on other sites

7 hours ago, John Dowson said:

I've added them back and they don't give any 'unrecognized' errors, which is a good sign. Not sure if they work or not though. Could you try the attached build and let me know.
I've added back the following controls:
    AP Panel VS Hold
    AP Panel VS Off
    AP Panel VS On
    AP Panel VS Set
    AP VS Hold
    AP VS Off
    AP VS On
    AP VS Set

FSUIPC7.exe 586.5 kB · 2 downloads

That works on my system. Now I can program via FSUIPC for the VS ENG button to use the AP Panel VS On to activate VS mode with my PFC Cirrus II radio console. Thank you.

Z

Link to comment
Share on other sites

2 hours ago, zfehr said:

That works on my system. Now I can program via FSUIPC for the VS ENG button to use the AP Panel VS On to activate VS mode with my PFC Cirrus II radio console. Thank you.

Z

 

10 hours ago, John Dowson said:

I've added them back and they don't give any 'unrecognized' errors, which is a good sign. Not sure if they work or not though. Could you try the attached build and let me know.
I've added back the following controls:
    AP Panel VS Hold
    AP Panel VS Off
    AP Panel VS On
    AP Panel VS Set
    AP VS Hold
    AP VS Off
    AP VS On
    AP VS Set

FSUIPC7.exe 586.5 kB · 2 downloads

I can set the target AP vertical speed value in the G1000 with a Lua script using the above version of FSUIPC7 by writing the VS value to offset 0x07F2.

EDIT: It now seems I first have to use the AP VS SET 66102 control first at least once, and then repeated writes to Offset 0x07F2 seem to work. Strange.

Al

Link to comment
Share on other sites

11 hours ago, ark1320 said:

It now seems I first have to use the AP VS SET 66102 control first at least once, and then repeated writes to Offset 0x07F2 seem to work. Strange.

Thats interesting - and strange! The units for offset 0x07F2 are ft/min. What are the units you are using for the parameter of the AP VS SET command? I could automatically do this in FSUIPC7 maybe. Presumably it needs to be sent on each change of aircraft or new flight, no?

Link to comment
Share on other sites

6 hours ago, John Dowson said:

Thats interesting - and strange! The units for offset 0x07F2 are ft/min. What are the units you are using for the parameter of the AP VS SET command? I could automatically do this in FSUIPC7 maybe. Presumably it needs to be sent on each change of aircraft or new flight, no?

Today I'm getting the 0x07F2 offset to work, but not the AP VS SET control - nothing seems repeatable!  I will do some more testing and get back to you. The units for the AP VS SET control I used were ft/min. Note in the P3D SDK there are two K events available:  KEY_AP_VS_VAR_SET_ENGLISH and KEY_AP_VS_VAR_SET_METRIC.

Al

Link to comment
Share on other sites

3 minutes ago, ark1320 said:

Note in the P3D SDK there are two K events available:  KEY_AP_VS_VAR_SET_ENGLISH and KEY_AP_VS_VAR_SET_METRIC.

These are also available in FSUIPC7, and should be listed in the controls drop-down menus.

4 minutes ago, ark1320 said:

Today I'm getting the 0x07F2 offset to work, but not the AP VS SET control - nothing seems repeatable!

Hmm. Very strange and worrying. Same or different aircraft? It seems that the various aircraft implement things differently, so what works in one may not necessarily work in another.

6 minutes ago, ark1320 said:

I will do some more testing and get back to you

Please do.

Link to comment
Share on other sites

4 hours ago, John Dowson said:

Please do.

Hi John,

Ran some more tests.  Here's what I find (at least for today)!

1. Start the sim, load the Baron58 with the G1000. The sim has the focus for all the below.

2. Run a one line test script: ipc.writeSW(0x07F2, 1200)  but nothing shows up on the G1000 at the top of the VS scale (even if I rerun the script a few times).

3. Run a one line script using the AP VS SET control: ipc.control(66102, 900)  but what shows up on the G1000 is not 900 but the 1200 from the previous script as shown below on the top of the VS scale!

4. Thereafter, every time I run the one line ipc.writeSW(0x07F2, ....) script, but with different VS values each time, the correct values show up on the G1000 each time.

5. If I go back and run the one line AP VS SET control script, it still doesn't work.

So, writing to offset 0x07F2 only works it you run the AP VS SET control first at least once even though the control itself doesn't seem to work!

I have repeated the above test sequence at least five times, restarting the sim each time. I hope you have some ideas on what might be going on, because I sure don't!

Al

 

Baron G1000.png

Link to comment
Share on other sites

13 hours ago, ark1320 said:

I have repeated the above test sequence at least five times, restarting the sim each time. I hope you have some ideas on what might be going on, because I sure don't!

This is also how it works in the A320Neo, but its different in the Boeings. I've already queried this with Asobo (2 weeks ago, as of yet no reply):

Quote

The A320 Neo looks to be using the AP_ALT_VAR_SET_ENGLISH event when incrementing/decrementing the AP altitude. However, these updates are not reflected in the AUTOPILOT ALTITUDE LOCK VAR simulator variable until the AP Alt is set. This should be updated dynamically, as is done in the Boeing 747, although that is using the AP_ALT_VAR_DEC and AP_ALT_VAR_INC events.

I think@guenseli may be right and this is expected behavior, although I'm not sure.

Link to comment
Share on other sites

Discussed this with @Thomas Richter :

Quote
General Aviation have a different system than Airliners and as well systems like G1000 differ in options included and which AP system is used with it.
I saw people are getting mixed up. There are AP's they take on activation the current VS, not pre-selectable, and others you can pre-select. Same is true for Boeing and Airbus, completely different systems as they follow a different strategy.

So it seems that this is just due to the way the different AP systems work.

Link to comment
Share on other sites

1 hour ago, John Dowson said:

Discussed this with @Thomas Richter :

So it seems that this is just due to the way the different AP systems work.

Yes, in some a/c the AP VS is set simply by capturing the aircraft's current VS (the Learjet 35A does this). In others, you dial in a target VS for the AP.

My concern with the tests described above, which I conducted with the a/c sitting on the ground,  is the working of Simconnect. As you can see in the picture I posted, the Baron58/G1000 in MSFS has a blue VS bug that can be set. The value of the bug is also shown at the top of the VS scale. This is the target VS for the AP,  not necessarily the current VS.  While the tests showed the VS bug can be set by writing to Offset 0x07F2 , the question is why does this only work if you first execute (write) the non-working AP VS SET control (66102) at least once?  Does this indicate a problem with Simconnect, or with FSUIPC7, or with the sim itself somehow?

Thx,

Al

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.