Jump to content
The simFlight Network Forums

Carenado Hawker 850XP FSX VS MODE won't turn ON


Recommended Posts

Hi,

I have a second question just about to finish with my home cockpit. The Autopilot VS MODE doesn't turn ON just switch to OFF and when I push the button again it won't switch back to ON. I can't find other variable to correct the Macro command. What I'm doing wrong, anyone here had same problem?

[Macros]

1=L:ALT_VS_SEL_ON=Set

List of variables with VS:

L:ALT_VS_SEL_ON = 0.000000, L:AP_VS_VAR_SET_ENGLISH = 0.000000, L:ASD_BTN_850XP_VS = 0.000000, L:CUSTOM_AP_VS_VAR = 0.000000, L:VS_HOLD_ALT = 0.000007,L:AIRSPEED_VS_850XP,

Thank you in advance,

Link to comment
Share on other sites

10 hours ago, gustavousanj said:

1=L:ALT_VS_SEL_ON=Set

With that definition, you need to give your assignment to that a parameter of 1 to turn on, and 0 to turn off.
If this is an on/off (1/0) lvar, you can use Toggle instead, i.e.

     1=L:ALT_VS_SEL_ON=Toggle
And just assign to that.

Link to comment
Share on other sites

Hi John, thx once again!
 

I tried with “Toggle” but it works same as Set for this option, switch goes to OFF and nothing happens if I push button again...

 

I forgot to mention, when I push the option again ( VS button) it flashes the annunciator, I thin it changes from ON to OFF fast but can’t hold the command....

thank you,

Link to comment
Share on other sites

27 minutes ago, gustavousanj said:

I tried with “Toggle” but it works same as Set for this option, switch goes to OFF and nothing happens if I push button again...

I forgot to mention, when I push the option again ( VS button) it flashes the annunciator, I thin it changes from ON to OFF fast but can’t hold the command....

Try logging buttons & switches and events, then activate your button and you should be able to deduce what is happening from the log (use the open console menu entry to see in real time).


If not, attach your log file here (with logging enabled) as well as your ini and I'll take a look.

But it really isn't that difficult, and how you assign also depends on what type of button it is - is it a temporary on/off button, or a sticky button (stays on until you press again) or a switch )similar to a sticky button). For example, for a sticky button or switch, you should use the set command but with a parameter of 1 for the press (to switch on) and a 0 to release.

Of course, it also depends upon the lvar. I presume it takes values 0 for off and 1 for on. You should check your documentation for that (or log the lvar values when its on and off to verify).

 

Link to comment
Share on other sites

Been looking at this one, off & on with the morning coffee 😉
This one may take a little more than just a L:Var Macro, either a support XML gauge w/ L:Var Macro -or- Lua should do it.
The thing about VS hold in flight sim ( since FS2002 ) is that the supplied VS Hold commands never worked. Designers have been using altitude hold and background logic to make their own & separate the actual ALT hold from VS hold in this logic.
BTW - It seems all those L:Vars have nothing to do with the actual control of the VS hold in this aircraft, more so that they are there as an interface between the C++ AP gauge and the animation/displays in the VC.

Here's what should ( seems reasonable ) be done to have a hardware interface for the VS hold mode.
Note, at the time of engagement the "current" VS is put into the command AP_VS_VAR_SET_ENGLISH.

Image2.jpg.50dbc64863b64d4f1e52882f29759be5.jpg
 
Roman    

Link to comment
Share on other sites

I got it! 😄  I'm using the 1=L:ALT_VS_SEL_ON=Toggle. Will send a picture of how I had to set the L:Var. Had to do the same with VNAV button.

Forgot to mention: For the VS and VNAV when starting with the airplane give one click on the VS and VNAV button, after the first click both will work with ON and OFF push button.

Thank you x1000 again! 

 

FSUIPC VS Carenado Hawker.jpg

Edited by gustavousanj
"Set" changed to Toggle
Link to comment
Share on other sites

Ok, glad its working. But from your description and image it doesn't make sense (and especially when taking into account Roman's comment) - your lvar macro is using set with no parameter (so expecting input from the assignment), and you assignment is to a toggle macro with no parameter....? Could you post your latest macro and ini files so I can take a look?

John

Link to comment
Share on other sites

Sorry, I just corrected the post now. I'm using the Toggle option.

you are right about it, switch works with OFF/ON once I manually first set it ON but I can’t get to the PTCH or VPTCH. I can see ON and OFF but I think modes are not correctly working. 😞


Update 1:

I think it's working when sent command to the FSX Controls and FSUIPC same time.

1- FXS Settings Control: Autopilot Altitude hold (ON/OFF), Button

2 - FSUIPC = Control sent when button pressed: 1=L:ALT_VS_SEL_ON=Toggle

Looks like I can get the pitch mode now and I can see the ON and OFF on the VS button.

Update 2:

VS and FLC looks like both working normal but if switching modes you will need to manually turn-OFF the actual mode (VS or FLC), otherwise you will visually merge the 2 modes in the mode annunciator.

 

Edited by gustavousanj
Link to comment
Share on other sites

Whoah!! This may be much tougher than thought.
The actual AP panel gauge is in XML but is compiled in SimPropBinary. (*.spb)
Inside this .spb are XML style calls to a macro eg. @MacroName, which are slightly exposed, and in some cases, very, very important!
Also, there are XML style "C" calls to an external Carenado module eg. (C:<module name>:<variable>)
Attempting to use L:Var macros or direct FS Controls, in most of the cases, will be overridden by the autopilot gauge itself.
About the only thing I can think of doing for a hardware interface is to transpose the exposed code from the spb to a xml gauge then accept L:Vars thru FSUIPC L:Var macros as the trigger instead of a mouse gesture. 

Trying a few things out..
Roman

Link to comment
Share on other sites

I think I could make the autopilot work but not as the real thing, when changing modes VS/FLC/FLC/VS I have to turnoff the mode in use and then select the other mode but when selecting FLC VNAV goes OFF and need to engage again.

Also need to change to ON VS and FLC when loading the airplane to make functions work.

6F09B40A-7CD8-457E-9270-5121010CED9D.jpeg

764B75DF-4048-4EFE-8628-1F415273705B.jpeg

44D49123-FF0A-40B2-BCB6-76D04CA84189.jpeg

Link to comment
Share on other sites

Have it going & it works, just to give an idea of the background logic here's just the press of the VS button. There's also the release.
The AP master and VNAV are even more complicated! 

			<!-- VS Press, Param = 5 -->
			(L:XP850_HW_IF, number) 5 == if{ 
				1 (>L:BUFFER_BTN_FMC,number)  
				0 (>C:carenado:AutoPilotAltitudeEnabled) 
				(A:AUTOPILOT MASTER,BOOL) 0 != (C:carenado:AutoPilotAltitudeEnabled) 0 == and if{ 				
					1 (>L:ASD_BTN_850XP_VS,number) 
					(A:Autopilot Nav1 Lock,bool) (>L:NAV,bool) 
					(A:Autopilot Heading Lock,bool) (>L:HDG,bool) 
					(L:AUTOPILOT MASTER, BOOL) 1 == (L:ALT_VS_SEL_ON) 0 == and if{ 
						0 (>L:CUSTOM_AUTOPILOT_AIRSPEED_HOLD, number) 
						(>K:AP_ATT_HOLD_ON)	
						(>K:AP_PANEL_ALTITUDE_ON) 
						0 (>K:AP_ALT_VAR_SET_ENGLISH) 
						(A:AUTOPILOT VERTICAL HOLD VAR, feet per minute) (>K:AP_VS_VAR_SET_ENGLISH) 
						(A:AUTOPILOT VERTICAL HOLD VAR, feet per minute) (>L:AP_VS_VAR_SET_ENGLISH) 
						1 (>L:ALT_VS_SEL_ON) 
						1 (>L:ALT_SEL_ON) 
						
						0 (>L:CUSTOM_AUTOPILOT_AIRSPEED_HOLD_ALT, number)  
						0 (>L:ALT_ARM_SEL_ON,number) 
						1 (>L:GAUGE_ALT_ALERT_MODE, number) 
						(A:VERTICAL SPEED,ft/min) 100 / near 100 * (>K:AP_VS_VAR_SET_ENGLISH) 
						(A:VERTICAL SPEED,ft/min) 100 / near 100 * (>L:AP_VS_VAR_SET_ENGLISH) 				
					} els{ 
						0 (>L:ALT_VS_SEL_ON) 
						(>K:AP_ALT_HOLD_OFF)	
						(>K:AP_ATT_HOLD_OFF) 
						0 (>L:ALT_ARM_SEL_ON,number)  
						0 (>L:ALT_SEL_ON)								
					}
					(L:NAV,bool) 0 != if{ 
						0 (>K:AP_NAV1_HOLD_ON) 
					}
					(L:HDG,bool) 0 != if{ 
						0 (>K:AP_HDG_HOLD_ON) 
					}  					
				} 				
				0 (>L:XP850_HW_IF, number)						
				quit
			}

 

  • Like 1
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.