Jump to content
The simFlight Network Forums

DrDave-

Members
  • Posts

    71
  • Joined

  • Last visited

Everything posted by DrDave-

  1. Thanks, will add any other comments to the "Beta" post. Will starting FSUIPC7 or logging input events later in the start up (after Ready to Fly) make any difference for now?
  2. Thanks I'm not sure you would lose customers. But $10 - $15 is not that much to Simmers, especially if they are purchasing Flight Sim hardware. Look at sales of such and their growth. If a user can purchase a $750 set of rudder pedals? The balance is lost customers due to documentation or support or frustration or price increase to support the above. A way to find out is to use the forum to email a survey to all your users. If you would like to take this discussion, please email me. I am very sympathetic as I have lived in the UK twice. Once with the US Navy at the Embassy and once working for EDS just north of Heathrow. I am a programmer to computer executive to IT business consultant.
  3. Great answer. Appreciated. A bit of input from a retired PhD business consultant, if I may. A business model "Mac Truck Model". Every job needs a backup because anyone can be hit by a Mac Truck at any time (in your case, Lorry). It would be worth it to us (your users) if you increased the price of FSUIPC to train additional resources to update documentation and take on some of the more simple support issues.
  4. This makes absolute sense to a computer person. Look up the HTML/Windows color you want, divide each decimal R,G,B amount by 16, convert to hex. For a non-technical person, the documentation makes no sense. Sorry, was creating the post on my phone. Brain fart. Your unforgiving statement. Because The Wnd Library documentation has more reference to WideClient than anything else. "The size and position can therefore be set by the user, and these values are saved, according to the "title" in the [ExtWindow] section of WideClient's INI file, and restored next time." "Closes the window w. Windows created by WideClient/FSUIPC are also closed when WideClient/FSUIPC closes." "wnd.show(w) or (since WideClient 6.999z3): wnd.show(w, Option)" "This small Lua plug-in, saved as, say, "showtext.lua" in the same folder as WideClient, is used on my own system instead of ShowText.exe, to show the Radar Contact menu:" As I have a home built cockpit, I don't use the on screen MSFS cockpit (see attached). I want to use FSUIPC text capability to display the state of switches that are exercised by MOM switches in my sim, especially in emergency situations. E.g. Fuel Valve, Fuel Crossfeed, Ignition, etc. The window would be placed on the Fire tablet to the right of the glare shield (easily attached to either the server or client using Spacedesk). The two TVs on the side walls are attached to the client using WidevieW, saves significant FPS on the server if to use rendered windows. You seem to expect you customers to be as familiar with all the documentation and functions in FSUIPC as you. You live this product. We are part-timers. You deal with tons of questions. Each post is someone's individual misunderstandin or ignorance.
  5. Thank you. No hurry on the Simconnect Text. There are several plug-ins that show how to display text. Seems as if most don't work. Can I assume the wnd library is the go to? You mentioned wnd library. I have written an lua to start the window and thus the question about colors in the background and font variables. Not sure how to judge what numbers determine which color. I assume one creates the window with an Lua in the WideConnect folder. Can one execute a wnd.text() command in a server Lua (using ipc.set and ipc.get) to print on the WideClient window created by wnd commands. To debug some aircraft command while I learn more about MSFS, I would like to display variables I set via controls (both offsets and SimVars). I have tested and wideclient opens on my test pc server My flight sim has a server and a client running wideview.
  6. Is the text/window function in Simconnect working yet (e.g. plug in AllTexts.lua). Display.connect and display.show - a bit of confusion: the Lua Library states this is for WideClient only. The WideClient User Guide states "with the exception of: ask, buttons, display,....". please explain. Can one run WideClient on the server if one wants to use its display functions on the server. I assume that any Lua Plug-ins need to be in the WideClient folder? Could you provide a bit more description of how to set colors in the wnd background and text color commands?
  7. Thank you for a comprehensive answer. The thing I am concerned with is twofold. The input events may not have been used in this aircraft and Cockspur is not consistent in their answers. Let me please be specific. I have downloaded the beta version. Is there any new document that covers input events in Lua? Could you provide specific examples of Lua code to set an input event? How would you code the following in Lua? 2 (>A:BUS LOOKUP INDEX, Number) (A:CIRCUIT CONNECTION ON:45, Bool) or 2 (A:1:CIRCUIT CONNECTION ON:45, Bool) Thanks
  8. In attempting to control the C510 Mustang with a Honeycomb Alpha, Bravo and a 12 Key input pad (with keystrokes) I have 3 Lua modules, Alpha_Buttons.lua, Bravo_Buttons.lua and Sayo-12Keys.lua. I have been successful so far with the cockpit controls. I have used the Events and Lua Logging capability of FSUIPC7 to determine which controls and variables are used to fly the aitcraft. There are two controls that have me confused. Avionics Switch 229641 *** EVENT: Cntrl= 67073 (0x00010601), Param= 1 (0x00000001) ELECTRICAL_BUS_TO_BUS_CONNECTION_TOGGLE 229656 *** EVENT: Cntrl= 67073 (0x00010601), Param= 1 (0x00000001) ELECTRICAL_BUS_TO_BUS_CONNECTION_TOGGLE Battery Switch 331609 *** EVENT: Cntrl= 66241 (0x000102c1), Param= 1 (0x00000001) TOGGLE_MASTER_BATTERY 331609 *** EVENT: Cntrl= 67073 (0x00010601), Param= 3 (0x00000003) ELECTRICAL_BUS_TO_BUS_CONNECTION_TOGGLE The TOGGLE_MASTER_BATTERY switch is obvious but what about the connections. The Offsets that I found that may be used are: 0x0C71 1 BUS LOOKUP INDEX No offset Comments 0x0C72 1 BUS CONNECTION ON:6 No offset Comments 0x281C 4 ELECTRICAL MASTER BATTERY Master battery switch (1=On, 0=Off). Currently not working for the 747-8: always shows on. Can switch off, but not back on In addition, External Power (GPU) is available but the Offsets I found are: 0x07AA 1 EXTERNAL_POWER_AVAILABLE This will be true if the given external power source is available. 0x07AB 1 EXTERNAL_POWER_ON The external power switch position, true if the switch is ON I would like to also code a button to attach external power. ELECTRICAL_BUS_TO_BUS_CONNECTION_TOGGLE (MSFS SimVar) [0]: Source bus index [1]: bus index Toggle bus connection state with a bus. Takes two indices, the initial bus and the second bus (see SimVars And Keys for more information). The bus index is the N index of the bus.N definition in both cases. ELECTRICAL_BUS_TO_EXTERNAL_POWER_CONNECTION_TOGGLE (MSFS SimVar) [0]: Source bus index [1]: external power index Toggle external power connection state with a bus. Takes two indices, the bus and the external power source (see SimVars And Keys for more information). The bus index is the N index of the bus.N definition, and the external power index is the N index of the externalpower.N definition. The System.cfg entries for the connections in the C510 Mustang are: [ELECTRICAL] bus.1 = Name:Main_BUS bus.2 = Connections:bus.1#Name:Essential_BUS bus.3 = Connections:bus.1, bus.2#Name:Hot_Battery_BUS bus.4 = Connections:bus.2#Name:Avionics_BUS battery.1 = Connections:bus.1, bus2, bus.3#Capacity:44#Voltage:curve.1#Name:Main_Battery ; Main Battery alternator.1 = Connections:bus.3#iEng:0#RatedVoltage:28.5#Load:curve.2#Name:LH_Alternator alternator.2 = Connections:bus.3#iEng:1#RatedVoltage:28.5#Load:curve.2#Name:RH_Alternator externalpower.1 = Connections:bus.1#RatedVoltage:28#Load:2500 circuit.23 = Type:CIRCUIT_AVIONICS:1 #Connections:bus.1# Power:20,25,20.0# Name:Avionics_1 ; avionics 1 circuit.24 = Type:CIRCUIT_AVIONICS:2 #Connections:bus.4# Power:20,25,20.0# Name:Avionics_Essential ; avionics 1 The MSFS SDK instructions for the dual indexed SimVars are: SimVars permit you to get the state of a component, or the state of something in the simulation, and they are generally accesed using the following RPN format: (A:[simvar_name]:[simvar_index], [units]) Sometimes a SimVar will require two additional index values, for example the SimVar CIRCUIT CONNECTION ON requires a circuit index and a bus index. Normally this would be written like this: 2 (>A:BUS LOOKUP INDEX, Number) (A:CIRCUIT CONNECTION ON:45, Bool) However, some SimVars will permit an alterative "shorthand" method of using the two indices, like this: 2 (A:1:CIRCUIT CONNECTION ON:45, Bool) Here, the 1: after the A: is used to tell the sim to send the top value on the stack to the SimVar. This shorthand method is ONLY applicable to the following SimVars: BUS CONNECTION ON BATTERY CONNECTION ON ALTERNATOR CONNECTION ON CIRCUIT CONNECTION ON EXTERNAL POWER CONNECTION ON BUS BREAKER PULLED BATTERY BREAKER PULLED ALTERNATOR BREAKER PULLED CIRCUIT BREAKER PULLED EXTERNAL POWER BREAKER PULLED Finally it should be noted that sometimes you will see simulation variables written using snake case, and prefixed with SIMVAR_, as that is how they appear in the simulation code itself. However when using them in RPN, you should omit the SIMVAR part as well as the _. For example: SIMVAR_CIRCUIT_ON -> (A:CIRCUIT ON:1, Bool) For the life of me, I cannot figure out how to code these activites in Lua: Use the avionics switch to connect the bus to bus (dual index) Connect the battery to the bus (dual index) Connect external power to the bus (dual index) while disconnecting the battery until the aircraft is started A lot of data but probably a simple anser.
  9. I have been struggling with this error for the past 2 hours. Can't seem to clear it. I have reread the Lua documents and viewed several FSUIPC7 Plugins. The error and code are: ********* LUA: "Alpha_Buttons" Log [from FSUIPC version 7.3.25] ********* 3128781 System time = 13/11/2023 11:33:10, Simulator time = 11:33:15 (16:33Z) 3128781 LUA: beginning "C:\FSUIPC7\Alpha_Buttons.lua" 3128781 *** LUA Error: C:\FSUIPC7\Alpha_Buttons.lua:13: 'then' expected near '=' 3128797 >>> Thread forced exit (ipc.exit or os.exit) <<< 3128797 System time = 13/11/2023 11:33:10, Simulator time = 11:33:15 (16:33Z) ********* LUA execution terminated: Log Closed ********* 7 k1 = 13 8 k2 = 14 9 function TOGGLE_AVIONICS_MASTER(joynum, button, downup) 10 b = button 11 avstate = ipc.readSD(0x2E80) 12 display.show(h, 1, "Avionics " .. avstate .. "On Off") 13 if b = k1 then 14 if avstate = 0 then -- AV is off 15 ipc.log("AV_Alpha On") 16 ipc.control(66293,0) -- turn AV on 17 else 18 ipc.log("AP_Alpha On No Chg") 19 end 20 return 21 end 22 if b = k2 then 23 if avstate > 0 then -- AV is on 24 ipc.log("AP_Alpha Off") 25 ipc.control(66293,0) -- turn AV off 26 else 27 ipc.log("AV_Alpha Off No Chg") 28 end 29 return 30 end 31 ipc.log("Error AV_Alpha On Off") 32 end I have tried several itterations: if button = 13 then k = 13 b = button if b = k then etc. No matter what I don I receive the error
  10. What would really help Lua users is what to read/write using offset length in an entry in the FSUIPC7 Offsets Status. If a length is 1 it is obvious it is a bool. If it is 8 it is understood that is a double word but which read to use - n = ipc.readDBL(offset) or n = ipc.readDD(offset). Also for the uninitiated is 8 bytes really 64 bits (Doubleword). Same with 32 bits (Word), 16 bits (Half Word) and 8 bits (usually 1 byte). Some SDK variables don't state the exact disposition of a variable. For example: ELECTRICAL MAIN BUS VOLTAGE The main bus voltage. Use a bus index when referencing. Volts Offset status is: 0x2840 8 ELECTRICAL MAIN BUS VOLTAGE Which ipc.readxx or ipc.writexx should we use? Thanks
  11. Thank you, The reason I asked again, was whether to use ipc.control(xxxxx,0), (xxxxx,1) or (xxxxx). You answered the question with an example, thanks Appreciate the beta release. How will the input events be presented? As like an LVar, an offset or control? Appreciated. Are the input events type O:, B:, H:? Or are they something entirely new? Just curious. Yes, I am impatient with MSFS' as I could control P3D or FSX much faster. As an ex-Naval aviator, I am more interested in flying in my DIY cockpit more than discovery.
  12. Thank you, Does one toggle the control then in Lua using ipc.control(66494,1) -- TOGGLE_FUEL_VALVE_ENG1 ? Can one turn the control on/off with 1 and 0? Can one test the state of this control? If not, does one interrogate "0x3590 4 GENERAL ENG FUEL VALVE:1"? If so, how can one be sure the control sets this variable offset?
  13. I have been logging events from excercising Mustang C510 switches. There are a few points I don't understand, especially when I am trying to replicated the action using Lua and Alpha and Bravo devices. In turning the fuel valves (eng1 and eng2) on and off, the events return: 66494 Param = 0 TOGGLE_FUEL_VALVE_ENG1 66495 Param = 0 TOGGLE_FUEL_VALVE_ENG2 66495 Param = 0 TOGGLE_FUEL_VALVE_ENG2 66494 Param = 0 TOGGLE_FUEL_VALVE_ENG1 Not sure why the Param is 0 in both events. Also, in exercising the Avionics swtich, the following is recorded. 67072 Param = 24 ELECTRICAL_CIRCUIT_TOGGLE 67073 Param = 1 ELECTRICAL_BUS_TO_BUS_CONNECTION_TOGGLE 67073 Param = 1 ELECTRICAL_BUS_TO_BUS_CONNECTION_TOGGLE 67072 Param = 5 ELECTRICAL_CIRCUIT_TOGGLE I have tried to find these variables in the MSFS SDK to find the definitions of the parameters, especially 24 and 5 in control ELECTRICAL_CIRCUIT_TOGGLE. No luck. Can you help? I would like to replicate the function with the Alpha Avionics switch with Lua or FSUIPC7.ini Button definitions. Thanks
  14. I'm lookin for the format by which one can access variables via an A: SImvar, e.g. wf = ipc.readSB(A:WARNING FUEL LEFT) or ff = ipc.readSB(A:ON ANY RUNWAY). These variables are in the SImVars LIst but don't appear in the Offsets Status (that I can find). I didn't know until you said above that the O: vars are not accessable. You used a B: var in the XML code (Engine Templates) you kindly provided and I was just looking for input on how I could do the same with other B: variables. Thanks
  15. Again thank you. There are a few questions in my mind, may I ask them? 1. I have seen somewhere that one can perform an Ipc.readXX of an A: or K: variable. I can't seem to find it. Please repeat the format, it doesn't seem to be listed in the FSUIPC7: Lua Library Reference. Or what is the format to add an offset in "myOffsets". The examples don't show the variable or control type? 2. Similar to the above. How can one read and/or write to B: or O: variables? Obviously, one can read/write LVars. Some switches in the Mustang C510 are driven by A:, K: or L: variables. I can set an offset with the A: or K:. I can do a ipc.readLvar for the LVars. But how do I at least read the state of B: or O; vars? Thanks
  16. John, We do appreciate the genius design and programming that has gone into FSUIPC. That being said, there is so much documentation it is hard finding where an answer in located even within a document. Many times we don't know what to search for. That being said, I have a question on myevents entries you provided for the C510. They are: Mustang_C510_Ignition1_Toggle#1 (>L:FSUIPC_C510_Ignition_1) Mustang_C510_Ignition1_Toggle#2 (>L:FSUIPC_C510_Ignition_2) I believe that these entries move the values from Mustang_... to L:FSUIPC_. The question is where can one find the variable "Mustang_C510_Ignition1_Toggle#1" in the aircraft files? I have discovered othe development variable types in this aircraft besides L: or B:. They are I: and O:. You found a B: variable in this aircraft. Can you inform us how you found the B: var and how we can find the I: and O: vars. Thank you
  17. Yes it is and, no, I didn't read your first post. I was searching for "controls" and went to the last entry. Thanks again
  18. I'm having the same problem. The controls that are consistently showing for the Mustang C510 are: 28547 16828 *** EVENT: Cntrl= 65962 (0x000101aa), Param= 19 (0x00000013) FUEL_SELECTOR_SET 28547 16828 *** EVENT: Cntrl= 66523 (0x000103db), Param= 20 (0x00000014) FUEL_SELECTOR_2_SET 29078 16828 *** EVENT: Cntrl= 65962 (0x000101aa), Param= 19 (0x00000013) FUEL_SELECTOR_SET 29078 16828 *** EVENT: Cntrl= 66523 (0x000103db), Param= 20 (0x00000014) FUEL_SELECTOR_2_SET 29641 16828 *** EVENT: Cntrl= 65962 (0x000101aa), Param= 19 (0x00000013) FUEL_SELECTOR_SET 29641 16828 *** EVENT: Cntrl= 66523 (0x000103db), Param= 20 (0x00000014) FUEL_SELECTOR_2_SET 30172 16828 *** EVENT: Cntrl= 65962 (0x000101aa), Param= 19 (0x00000013) FUEL_SELECTOR_SET 30172 16828 *** EVENT: Cntrl= 66523 (0x000103db), Param= 20 (0x00000014) FUEL_SELECTOR_2_SET Fortunately, the log also provided the controls (events) that I needed. It is a shame there is no way to eleiminate controls that one doesn't want to display. I was able to use Notebook++ to replace unwanted lines with a space and delete duplicates. The result is attached. C510 Switch Press.pdf
  19. Sorry, but you must think we are all dummies. I already know much of what you mentioned above. I'm trying to find out where documentation on items in the file FSUIPC7.log that are entries from the choice to log Lua. I can figure out what is happening in the entries below except the number on the end of the line. Is there anywhere these types of entries are discussed? I was asking above is there documentation? 63891 LUA.2: C:\FSUIPC7\A-B-Buttons.lua:6 63907 LUA.1: C:\FSUIPC7\Sayo-12Keys.lua:8 63907 LUA.2: C:\FSUIPC7\A-B-Buttons.lua:25 63922 LUA.2: C:\FSUIPC7\A-B-Buttons.lua:21 Thanks for another's input to me of SimvarWatcher. As you are the expert in using the MSFS SimConnect and the SDK Variables and Events, I was asking if you knew of a tool that may not be obvious to the general public that can inspect an MSFS aircraft. The problem with SimvarWatcher is that you have to know the variable or event you want to watch. Thanks
×
×
  • 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.