Jump to content
The simFlight Network Forums

DaveSCUSA

Members
  • Posts

    160
  • Joined

  • Last visited

Everything posted by DaveSCUSA

  1. Thank you
  2. One more question, 3. Is there a way to compile an Lua plugin outside of MSFS?
  3. Two questions please: 1. Can you point me to documentation or let us know what to do if we change an Lua program or change the FSUIPC7.ini to retetst the change? Must we restart MSFS from scratch? The changes don't seem to take effect on Flight Restart or creating a new flight from the Main Menu. Time consuming to start MSFS from scratch. 2. Is there a way to eliminate all Lua traces and still display ipc.log entries? If you need more info, please let me know. Thanks
  4. Couldn't find any mention in the guides. Is there a way to assign a sleep or delay to a button press in the FSUIPC7.ini. I have also read the section on compound button press. I want to sleep for 750 ms between two button presses. Thanks
  5. Just a quick one. Sorry if I didn't catch you in time. Can a keypress have 2 offset conditions? 1=B66C0>0, B66C1=1 xx,yy.....
  6. Saw the holiday post previously. Highly appreciated your input. Happy Christmas!
  7. Thanks, wouldn't have caught the keypress controls. Don't need to use the FSUIPC added controls. I assume if you don't need a shift code just leave it and the + sign off and just use the Keycode alone. Sorry, the question was implied, why the error? I guess the answer is that "K" is not valid with keypress assignments. PS What does "JsBk" mean?
  8. I didn't receive an answer from the last post above. Can a key press assignment create a keypress?
  9. Hello John, It all seems to work now (at least on my test MSFS), thanks. The first time I tried the button to keypress, I received errors in attempting to send a keypress. I set offset 0x66C0 to x04 and use it as a flag to input ATC responses. I tried to use a keypress to respond. It works from my PC keyboard but an error trying to perform a keypress from a button emulating a RAlt + 1 press. I have changed the key assignments to use the ATC controls. Not as consistent in MSFS as the actual number key. [Keys] 1=48,264,x010066C0,x04 -{ralt+0: Press=offset byte set to 4, offset 66C0 }- 10=B66C0>0 53,264,K52 << ERROR 24! Line ignored >> 11=B66C0>0 53,264,x010066C0,x00 -{ralt+5: Press=offset byte set to 0, offset 66C0 }- Changed to: 1=48,264,x010066C0,x04 -{ralt+0: Press=offset byte set to 4, offset 66C0 }- 10=B66C0>0 53,264,66175,1 -{ralt+5: Press=ATC_MENU_4 }- 11=B66C0>0 53,264,x010066C0,x00 -{ralt+5: Press=offset byte set to 0, offset 66C0 }- Thanks for your input
  10. Wow, thanks
  11. Sorry to bother you again but I'm a bit confused how to set an Offset, especially one I define. In the Advanced Users, to use offsets with keypresses, it states: "This is normally an FS control number (as in my lists), or a special FSUIPC number for additional controls. It can be in decimal, or, preceded by ‘x’ in hexadecimal. The additional FSUIPC controls range from 1000 to 3000, and also values xcc00zzzz in hexadecimal which encode the FSUIPC “Offset” controls. See list below for full details." A bit confused by "also values xcc00zzzz in hexadecimal which encode the FSUIPC “Offset” controls". In the Adding Offset Conditions, the example used is "31=P174,10,Cx510066C0,x00030001". Not sure what "Cx5100" is. In using the Key Assignments UI (see attached graphic), I selected Offset Byte Set using offset x66C0 and a parameter of 4, expecting: 1=49,24,x010066C0,4 Instead, FSUIPC7.ini contains (Choosing Tab+2 to set a control): [Keys] 1=49,24,x01000000,x00 -{tab+1: Press=offset byte set, offset 0000 }- 2=50,24,67187,0 -{tab+2: Press=BATTERY1_SET }- As you suggested, I wanted to use this offset as a condition: 1=49,24,x010066C0,4 - [tab+0: Keypress Press=offset byte set, offset 66C0}- sets use ATC response 2=B66C0>0 50,24,K1 -{tab+1: Enter 1}- as a response to ATC 3=B66C0=0 50,24,C67090,0 -{tab+1, Press=TOGGLE_EXTERNAL_POWER}- 4=50,24,x010066C0,0 - [tab+0: Keypress Press=offset byte set, offset 66C0}- reset to no ATC . . . . . . . . . . On to 10 other buttons. I have confused myself reading in different sections of the documentation. Appendix 1 doesn't mention keypresses. Thanks
  12. Thanks. Seems complicated to add key press but if they are all "called" routines, it may not be terrible. I'll try offsets.
  13. I have read the User and Advanced Guides including Appendix 1. Can one treat key presses with compound programming as with buttons? E.g. in a 12 button keypad sending key press combination (settable) to Windows: 1=48,256,C1003,13 Keys RAlt+0 set Flag 13 (Button 1) 2=(F+0,13)49,256,K49 Keys RAlt+1 and Flag 13 is set, send 1 (Button 2 send 1 to ATC) 3=(F+0,13)49,256,C1004,13 Keys RAlt+1 and Flag 13 is set, reset Flag 13 (Button 2) 4=(F-0,13)49,256,Cxxxx,1 RAlt+1 If Flag 13 not set, set control to turn Ext Power On (Button 2) 5=(F-0,13)49,256,LELECT_EXT_INPUT1,4 RAlt+1 If Flag 13 not set, send 4 to aircraft input event turn on Ext Power If I knew how to turn this 12 Button keypad into a joystick, I would. Thanks
  14. Thank you
  15. Thanks to the new FSUIPC7 input event logging, I've discovered that the Citation Mustang C510 inputs a control event as well as an input event with most cockpit button/switch input. I have studied the compound button assignments. Am I right that a button or two can be dependent on a previous button press? Is there a way (haven't been able to find) to have a control and an input event exercised by a single button push without Lua? It seems that both aircraft I use (C510 & DA62) have a control and input event on the same switch. At your suggestion I used the UI to assign controls to the Alpha and Bravo.
  16. Is the ability to add a parameter to an input event available in the UI Assignment for Buttons & Switches any time soon?
  17. I am continuing to receivethese in the Log: Found 57438 InputEvent found: 'LANDING_GEAR_Gear' with hash=16178909335228778991 [type=0] Continuously showing: 61750 InputEvent received: 'LANDING_GEAR_Gear', Value=1.000000 (param='') 61781 InputEvent received: 'LANDING_GEAR_Gear', Value=1.000000 (param='') 61813 InputEvent received: 'LANDING_GEAR_Gear', Value=1.000000 (param='') 61828 InputEvent received: 'LANDING_GEAR_Gear', Value=1.000000 (param='') 61860 InputEvent received: 'LANDING_GEAR_Gear', Value=1.000000 (param='') Entered in the [General] section of FSUIPC7.ini: DontLogThese=65700,66080,66172-66181,65962,66523,65568 DontLogTheseIE=LANDING_GEAR_Gear Should there be quotes around the input event?
  18. The other reason I use Lua! Although I retired as an IT executive and business consultant, I find preogramming very relaxing and rewarding. Since retiring, I have completed projects in HTML/CSS, Python, VBA, FSX XML and now FSUIPC7 Lua. Next step, native Lua.
  19. Thanks for your time. I look forward to the release this week.
  20. Thanks for the extraordinary time you've spent on this. Please forget any reply on starting an Lua module with a button press. Just want to execute code to manipulate a Sim event. Again, all I need is: 1. Event.button or event.key executing a function in a module. 2. Run that module via the [Auto] section. 3. Have a LuaPath in the [LuaFiles] section if the Lua is located in that folder. That's it? No other actions needed? As an ex-pilot and retired programmer, I have options I want to use to make the use in the home built cockpit more realistic. I have the pilot manuals for several aircraft. I can more easily tie functions together that aren't correct in the MSFS aircraft. E.g. Upon start. Ensure the ignition is on. Fuel valve is open. Starter stops after reaching its minimum rpm.
  21. Really helpful. Thanks. What would the input event entry look like using DontLogTheseIE parameter? Its number or name as appears in the log list of input events found?
  22. I'm sorry John, what is obvious to you is not always understood by your customers. You keep saying "assignment on your Alpha is starting the Alpha_Buttons.lua script" and "lua on a button press, as i have said many times now". where is the Lua started by a button/key press? Between the lines interpretation, does every button/key assignment in the [Button] and [Key] sections start the Lua module? What I am understanding is that the steps should be: 1. List the Luas in the [Auto] section or use the ipcready.lua module. 2. The event.button and event.key statements in the module will be executed whenever a button/key press is completed. 3. Don't need the entries in the [LuaFiles] section in FSUIPC7.ini except the LuaPath entry. 4. No [Buttons] or [Key] sections in the FSUIPC7.ini are needed except if one wants to start a module with a press. If the above is not correct or I still don't understand, please point me to documentation that provides the steps needed and what entries are needed where to execute a function on a button or key press.
  23. Thank you for your time. I am still getting used to FSUIPC and its nuances. I'm still a bit confused about starting and the sequence of events in the Lua. In reading the documentation, it appears the series of actions needed to set up an execution of a plug-in (Lua module) with events are: 1. Assign a switch/button to an Lua module either by using a text editor on the FSUIPC7.ini file or using the Key/Buttons assignments facility. For Buttons - "5=PA,13,CL1:R,0 -{ALTERNATOR_ON}-" and for Keys - "0=54,136,L1:R,0 -{rctl+6: Press=Lua Alpha_Buttons }-". 2. In the Lua module, use event.Buttons or event.Key ("event.button(A,13, "TOGGLE_AVIONICS_MASTER") -- On" or "event.key(54,136,"ATC_RAlt_6")") to execute the function in the Lua module. 3. The .ini entries tie the button press/key press to the Lua module. 4. Add the Lua module name to the [Auto] section to load the Lua module ("1=Lua Alpha_Buttons" and "4=Lua Sayo-12Keys"). 5. Add the Lua module to the [LuaFiles] section ("1=Alpha_Buttons" and "4=Sayo-12Keys") also include "LuaPath=C:\FSUIPC7\LuaFiles" to use a folder to contain the .lua files. These entries provide the buttons/keys definitions with the Lua module where the function resides. 6. Start MSFS 2020 and start an aircraft to run and the the Lua modules will be available when an aircraft is in its flying state. Can I understand from your statement quoted above that an Lua entry in the [Auto] section and an event in an Lua module are mutually excleusive? You state "assigned EVERY button to start the lua script". Not sure what that means. Does every entry in the [Buttons] and [Keys] sections in the .ini start a Lua script? What are my steps to correct the situation if it is other than removing the Lua entries from the [Auto] section? What am I not understanding from the sequence of actions above that is causing errors. And I did miss the single "-" on the ipc.readSTR entry, old eyes. Thanks again.
×
×
  • 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.