guenseli Posted February 20, 2009 Report Posted February 20, 2009 Dear Mr. Dowson, I have a question aout the lights in FSX. For default there are the following lights available e.g. PANEL_LIGHTS_OFF PANEL_LIGHTS_ON PANEL_LIGHTS_SET PANEL_LIGHTS_TOGGLE same for PANEL_LIGHTS. But for the other lights (Beacon, Nav, etc) theres just the possibility to TOGGLE. Could it be realised in a way to get the other with OFF and ON, too? Backround is: if "modded" my old Logitech Extreme to a switch panel and there are the light switches. The switches are normal switches from an electro market, where you can see the switch position (don't know the english naming for this kind of switches). And its very comfortable with FSUIPC to assign LDG and PNL lights to ON and OF, that I can see the status with the switch position. With the other TOGGLE lights it isn't possible, because they can be ON, but the switch is in OFF position. Hope, you understand, what I mean... btw: How to handle PANEL_LIGHTS_SET? What have I to set here?
Pete Dowson Posted February 20, 2009 Report Posted February 20, 2009 But for the other lights (Beacon, Nav, etc) theres just the possibility to TOGGLE. Could it be realised in a way to get the other with OFF and ON, too? Yes, but you need to use a rather technical facility in FSUIPC which works on the Offsets as used by application programs. The offset for all the lights is 0D0C. It has one bit for each light, as follows: 0 Navigation 1 Beacon 2 Landing 3 Taxi 4 Strobes 5 Instruments 6 Recognition 7 Wing 8 Logo 9 Cabin You need to assign to two special FSUIPC-added controls listed in the Advanced User's guide called Offset Word Setbits (to switch one or more lights on) Offset word Clrbits (to switch one or more lights off) You will find both of these in the drop-downs, for assignment. You must provide the offset (x0D0C) where it says, and a parameter too. The parameter is the value of the bit for the light you want to change -- or the addition of values for more than one at a time. Compute the values by powers of 2. i.e. bit 0 = value 1bit 1 = value 2bit 2 = value 4...bit 8 = value 256bit 9 = value 512 Okay? There's a lot more you can do with these types of FSUIPC controls, but you really then need to refer to the FSUIPC Offsets documentation to know where things are and what they do. That is only available in the FSUIPC SDK, freely downloadable. btw: How to handle PANEL_LIGHTS_SET?What have I to set here? All SET type controls need a parameter value. If that one actually works (I've never tried it), it will use the parameter value as an on / off control -- 0 for off, 1 for on. Regards Pete
guenseli Posted February 20, 2009 Author Report Posted February 20, 2009 WOW, thank you... I just have to ask again, because i'm too dumb to compute the bits... I managed to toggle the strobes with parameter x0010 But the rest of the light don't follow my logical thinking. I have to say, that my logic doesn't correspond with the real worl logics in the world the most of the time... Please can you give me an example for the BCN lights parameter. Maybe I manage it then to get the rest... don't tell me the rest, I'll try it myself! :wink: Just the BCN please
Pete Dowson Posted February 20, 2009 Report Posted February 20, 2009 Please can you give me an example for the BCN lights parameter. Beacon? I listed that as bit 1. AND I already listed the value for that: 2! remember? See here: bit 0 = value 1bit 1 = value 2bit 2 = value 4...bit 8 = value 256bit 9 = value 512 So the parameter is2!!! (In hex it would bex2, or x0002 if you like, but leading 0's mean as little as they do in decimal!) You don't need to convert things into hex if you know the decimal. Just enter the number. FSUIPC will change it to hex, but you needn't worry about that. Pete
guenseli Posted February 20, 2009 Author Report Posted February 20, 2009 BINGO!!! Man, I thoughted much more complicated as it is... I thought you were talking about Binary codes... 0011, 0100, 0101 and so on... :oops: Thank you again, Mr Dowson! Since I own FSUIPC I can solve so much "problems" or better wishes... The next "hurdle" would be a new interface next month. For birthday I get the MCP Combo from VR InSight. FSUIPC would be perfect for this, I think! If I ever come to Stoke-On-Trend I'll take a cup of tea with you or spend you a beer or what ever you prefer!
guenseli Posted February 20, 2009 Author Report Posted February 20, 2009 Oh, here comes the next question: imagine I would enter a loaded flight and there are some switches ON, some OFF (because the pilot before me was careless.. :wink: ) On my hardware switch panel are all switches OFF. Now FSX (or FSUIPC) don't recognizes this situation, means the (hardware) switches are oFF while the FSX switches are ON. Is there a possibility that FSUIPC makes a query if the (hardware) switches are OFF or ON after loading the flight?
Pete Dowson Posted February 20, 2009 Report Posted February 20, 2009 Is there a possibility that FSUIPC makes a query if the (hardware) switches are OFF or ON after loading the flight? Not easily. It would be a lot of work, sorry. The whole of the way FSUIPC buttons and switches (and axis) system works is based on detecting CHANGES only. To avoid having to re-write a large amount of code which is only handling changes I'd need to invent a third state for each switch - neither on nor off -- so that either of the "real" states would immediately represent a change. There are two problems with that which would make it pretty horrible and a great deal of work to implement properly: 1. A three-state switch needs 2 bits instead of one. This means doubling the arrays used for switch states throughout, and changing all references to match. This would affect not only FSUIPC3 and FSUIPC4 but also my PFC drivers and other programs. The third "don't know" state would need to be restored on every new Flight load. The whole exercise would be very error prone (i.e. likely to cause bugs), and I really don't think it justified after over 10 years of it working as it does now. 2. There would have to be some clever interlock to prevent switches activating or changing things inside FS whilst it was still loading and therefore not ready to make the change requested. Mostly this does no harm on FSX but it can crash FS9, and before, because variables or procedures being referenced aren't yet loaded. I think such synchronisation problems could probably be resolved with a small Lua plug-in which deals with only the specific switches which may be of concern on your particular system. Otherwise I'm afraid you will need to resort to the same technique i have always used now for over 10 years -- operate every single toggle or latching switch back and forth as part of pre-flight cockpit preparation. At least when not loading one of my standard "cold and dark" flights. And I have a full 737NG cockpit, so you can imagine how many toggle switches that entails! 747 pilots are luckier -- at least pretty much all of their switches are push buttons, not toggles! ;-). Actualy, I think most of the newer airliners today are. But I like the 737! ;-) Regards Pete
guenseli Posted February 20, 2009 Author Report Posted February 20, 2009 ok, thank you for your detailed response! So I will educate myself in switching OFF all lights when leaving the airplane ;-)
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now