Jump to content
The simFlight Network Forums

DrDave-

Members
  • Posts

    71
  • Joined

  • Last visited

About DrDave-

  • Birthday September 19

Profile Information

  • Gender
    Male
  • Location
    Tennessee, USA

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

DrDave-'s Achievements

Contributor

Contributor (5/14)

  • Dedicated Rare
  • Collaborator Rare
  • One Year In Rare
  • First Post Rare
  • Conversation Starter Rare

Recent Badges

0

Reputation

  1. Thanks
  2. 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?
  3. Thank you
  4. 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.
  5. 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.
  6. 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.
  7. 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.
  8. 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?
  9. 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
  10. 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.
  11. 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
  12. 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
  13. 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.
×
×
  • 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.