Jump to content
The simFlight Network Forums

Recommended Posts

Posted

I read most of the instructional documentation (advanced users, lua, etc) and I have read through the FAQ's and I appologize as I think this is going to be simple.  I just need a push in the right direction.

 

The Hawker 400 XP landing lights DO NOT operate via the L key or the Cntrl-L keyboard functions.  The only way I can turn them on is in flight with my mouse.  I have not found the keyboard command to make that happen.

 

1.  Is there a way to find out from addon model to addon model  how a system (landing lights in this case) is actuated?  How the author may have assigned it to operate?  The main FSX Cntl-L does turn on most of the lights in the 400XP but does not turn on the tail flood, recog, or landing lights.  So if I knew how to find out what was assigned in this model maybe it would make it easier to assign this to a button or axis on my controller?  I have the Saitek X52 as well as now the Saitek Proflight Yoke and Thottles.

 

2.  IF there is no way to find that out.  THEN what is my BEST approach to make them work with my controller?  Offset, Lua, something else?  I'll go read up on what is the best way I am just lost as to what that method is.  Thanks

 

 

Posted

There's a small chance it might be operating internally using a control. To check that, enable Event logging in FSUIPC logging options tab. If you also enable the Console Log there and (temporarily) run FS in Windowed mode, you'll be able to see if a control is used in real time, when you use the mouse to operate the switch.

There are two other possibilities, both depending on how the gauge containing that switch is programmed:

1. Mouse macro. You'll need to refer to the documentation for this. Mouse macros only work with gauges and panels written using the Microsoft C/C++ panels SDK.

2. L:vars (local panel variables). You can have a macro which writes to a named L: var. This tends to be applicable to gauges and panels written in XML. To find out you'll need to list and monitor these variables. There is an assignable FSUIPC control which will list all current L:vars and their values at that moment, or you can assign a key to the Log liar lua plug-in provided in the examples -- that lists them and all subsequent changes.

If none of these work, and, as I'm assuming, the originator has not provided an assignable key press, then there's really no answer. With a 2D fixed position switch (rather than VC) you could consider actually using the Mouse library functions in Lua to position the mouse pointer and clicking the. Button -- or using a dedicated program for such things, like Luciano Napolitano's Key2Mouse program.

Pete

Posted

GREAT!!  Thanks for taking the time on this Pete.  I get back to the forum when I get it working.  I do have a request to the originator, about the assignable key press, however it is an older model and I understand that particular programmer has moved on.  Ugh.  LOL.  I see what I can do. 

Posted

After reading, logging, reading, watching Fox News, then reading some more it dawned on me.  I wasn't quite understanding the Mouse Macros.  So I went back and re read it once more.  Key word.  Mouse Traps, and success I got the levers to work.  That's not all.

 

While reading Appendix: Axis assignment in FSUIPC4 – 10x2 Commandments, I thought why stop at AXIS.  Why not delete all the function key asignments from F1 - F8?  ( I like the F9 - F12 functions.  LOL

 

I also deleted the Cntrl Function assignments as well as the Shift Function assignments.  The idea is that first to make the Macros of all of my overhead switches.  There are quite a few of them on the Hawker 400 XP.  So I did.

 

I then got the idea to asign the macros to key presses, THEN asign my buttons to key presses.  Here is the cool part.  I finally was able to get my MODE switch to work on my X52!!  Something I had been trying to do for a long time.  What I needed was the correct driver WITH the correct programming software.  If they are mismatched the X52 MODE switch will not work in FSX.  Well it does now.  So instead of only 6 T-switches I now have 18.  Add that to the 6 T-Switches on the Proflight Yoke I now have 36 T-switches between the two.  They gave us a handy USB outlet on on the Saitek yoke that allows us to hook up the X52 and the Yoke to work together.  :)  Instead of the POV hat switches I can simply use the joystick from the X52 to look around with.  Now I have to figure out what to do with the two hat switches.  A good place to be!!

 

So I now can manipulate EVERY switch on my overhead panel with my controllers instead of having to use the mouse!  Not as fancy as your cockpit Pete but that's ok!  Thanks for the ideas and the help!!

 

Screenshot2014-06-26191559_zps2a9e17e2.p

Posted

So I now can manipulate EVERY switch on my overhead panel with my controllers instead of having to use the mouse!  Not as fancy as your cockpit Pete but that's ok!  Thanks for the ideas and the help!!

 

You are welcome. I'm pleased you got everything sorted out!

 

Pete

Posted

Where can I read more on the L:vars?  Is that in the programmers instructions?

 

Construction of macros to write to L:Vars is covered in the Macro Controls section of the FSUIPC Advanced User's guide -- it is listed in the contents. Reading L:vars can only be done in a Lua plug-in. There's a button/keyboard assignable control in FSUIPC's drop-downs to List all current L:Vars and their state, and there's an example Lua plug-in provided which, when run, gives not only the list but changes in real time.

 

Pete

Posted

Ok, thanks Pete.  While getting to know how to use the logging features and creating the Mouse Macros, I saw those assignments so I am eager to try this out.  Thanks again!

Posted

Hi Pete,

 

As I have said, I have had a lot of success with the Mouse Macros.  I've run into a little hitch.  I have a three way switch.  Windshield Heat.  I have HIGH OFF LO choices.  Now if I want, I can simply make a Macro to turn it on, from LO to OFF to HIGH as much as I would like.  Visa Versa of course.  This however will take up 4 buttons or levers, and there are other ways around it.  So what I want to do is simply use these as Key Presses then asign that to my controller.  The following you are explaing to us how to set up a spring loaded switch which is fantastic.  My three way switch is not.

 

Here is a clip from the instructions

 

Before we start experimenting, prepare the file for multiple-line macros, as follows:
[Macros]
Module="XXXXXXXX.GAU"
1=APU Start=RX70280*X8bcc
2=APU Normal=
2.1=RX70280*X8bcc
3=APU Off=RX70310*X8bcc
4=L Eng Start
4.1=RX4a470*X8bcc
5=R eng Start
5.1=RX4a4f0*X8bcc
6=XTIE
6.1=RX66560*X8bcc
All I’ve done here is changed the lines we know don’t work by leaving the name on its own line, and inserting the extra .1 lines with the mouse action
assigned. The file is actually identical in its effect to the original, but now we can add more actions.
With the “APU Normal” switch, we want it to return to the normal position on button “leave” or “release” from either “Start” or “Off”. So the first
thing to do is extend its part with the Off code as well, so it does both:
2=APU Normal=
2.1=RX70280*X8bcc
2.2=RX70310*X8bcc
By experimentation, the solution for this is the “leave” code, 11:...

 

Here is my Macro

 

[Macros]
Module="xesbj400antiice.GAU"
1=R WSHLD HT LO
1.1=R7
2=R WSHLD HT OFF
2.1=R6
3=R WSHLD HT HIGH
3.1=R6

 

I got to the part where we are using 11 or 17 to return the switch.  I don't want to have FSUIPC return the switch I want to leave it where I set it.

 

QUESTION.

 

Will I simply need to use 4 keys?  One to turn the switch on another to turn it off, then another switch for the other side of the windshield?  I could always use say F6 (on) then Cntl F6 (off), and F7 Cntrl F7.etc?

 

What do you suggest?

Posted

As I have said, I have had a lot of success with the Mouse Macros.  I've run into a little hitch.  I have a three way switch.  Windshield Heat.  I have HIGH OFF LO choices.  Now if I want, I can simply make a Macro to turn it on, from LO to OFF to HIGH as much as I would like.  Visa Versa of course.  This however will take up 4 buttons or levers

 

Why? I don't understand why you think you need 4 buttons for a three way switch when you have a three way switch. Surely the 3 way switch gives you three possibilities - off, on1, on2. Am I misunderstanding something?

 

So what I want to do is simply use these as Key Presses then asign that to my controller. 

 

Why key presses? Where do key presses come into it? Why not buttons?

 

As for the rest, I do not understand any of it. Can you give me the source reference for "Here is a clip from the instructions" please so I can get a context?  And what is all that about "leave codes" and 11 or 17?

 

Sorry, but I'm all at sea with your message.

 

Pete

Posted

Sorry Pete for being unclear.

 

With the Saitek X52, the three position rotary mode switch allows different programming for the same buttons.  To accomplish this however, ALL your assignments must be in the form of a keyboard command.

 

If one does not wish to go to that length then simply assign controls to buttons or switches. and your good to go. 

 

f you take advantage of asigning controls to keypresses you can get a lot more asigned to your controller.  This is why I use keypresses, then asign those keypresses to the X52. (F1 = Nav Lights, Cntl F1 = AOA Heat, Shft F1= Boost Pumps on)  They are all on the T-1 button on my X52 just in different modes.

 

So with the Mouse Macros I made a macro for Windshield Heat ON and another for Windshield Heat OFF.  So as a button, one push would go from LO to OFF then another push would go from OFF to HI.  IF I push the button again, nothing happends and the WS Heat is stuck in HI.  So I created an OFF Macro which does the reverse. 

 

My question:  Is this the only procedure I can do via Mouse Macros to get a three way switch to work?

 

I hope this was more clear. 

 

Again sorry be sending you out to sea.  I like that expression!  LOL

Posted

With the Saitek X52, the three position rotary mode switch allows different programming for the same buttons. 

 

Ah, so it isn't the three way switch you want to program! I thought that you had a simulator 3 position switch and simply wanted to match the positions on your real 3-way switch to it.

 

To accomplish this however, ALL your assignments must be in the form of a keyboard command.

 

Okay, so that is why you want to use key presses. Right ...

 

So with the Mouse Macros I made a macro for Windshield Heat ON and another for Windshield Heat OFF.  So as a button, one push would go from LO to OFF then another push would go from OFF to HI.  IF I push the button again, nothing happends and the WS Heat is stuck in HI.  So I created an OFF Macro which does the reverse. 

 

 

Yes, of course. You need all actions programmed.

 

My question:  Is this the only procedure I can do via Mouse Macros to get a three way switch to work?

 

Er ... but your three way switch merely switches the modes on the joystick, right? You aren't programming the 3-way switch itself in FSUIPC?

 

I think I am still not fully understanding the question here. Sorry.

 

Pete

Posted

I finally figured it out.

 

What I need(ed) is a three way switch.  It dawned on me that with my new Saitek Yoke I have a spare HAT switch since the X52 HAT is being used to PAN view.

 

So I assigned my FSUIPC Mouse Macro ( LT WS HT ON) to one button in the HAT switch and LT WS HT OFF to another.  Wonderful!!  It works.

 

Now, the Pro Flight Yoke also came with a MODE switch so I will now assign these new Mouse Macros to keypresses that way Mode 1 will be the Left side on and off and Mode 2 will be the Right side on and off.  (Button 32 and button 34).  So how I do this is to assign the delete key to LT WS HT ON.  Then assign Cntl Del to RT WS HT ON.  Then the Insert key for LT WS HT OFF and Cntl Insert for RT WS HT OFF.  Then I use the Saitek Profile software to program Del and Insert in mode 1 and Cntl Del and Insert  in mode 2 to the same buttons 32 and button 34 respectively.  Now I can use the same controller switch to operate two different Panel (three way) switches simply by switching modes on the Proflight Yoke.  (I just picked Del and Insert keys randomly, and deactivated all instances of it in the FSX controls area).

 

In the future I'll try to refrain from asking a question when tired :razz:  Sorry for the confusion Pete!

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.