Jump to content
The simFlight Network Forums

texfly

Members
  • Posts

    38
  • Joined

  • Last visited

Everything posted by texfly

  1. Great stuff. I have modified the code and added few functions...all works! I have a question: I would like to have a LED ON (GoFlight module) when, for example, the ignition switch is AUTO. I have the instruction gfd.SetLights(GFT8, 0, 7) but I'm not sure how to read that specific value (Ignition switch status). Thanks for the help.
  2. Great, thanks. One more question...I want to edit my LUA code while FSUIPC is running so I can troubleshoot better. Does the "RELOAD ALL BUTTONS" reload/refresh the LUA scripts inside the Modules folder as well? If not how can I do this?
  3. Pete, Is it better to create single LUA programs and assign them to a button? For example APU.LUA then link it to the button I want to program? What about ipcready.lua? Is it possible to code all the offset/buttons monitoring inside only that file? My understanding is that ipcready.lua loads automatically after FSUIPC completes the starting phase...
  4. Thanks Pete, I will try it tonight. Regarding the debuggg.do I need to launch the "LUA Debug" and turn on the FSUIPC logging?
  5. Hi Pete, I tested it and I'm still having problems. My code is below. Any suggestions? When I push the button I can see the 0B54 offset changing value using FSInterrogate and the light on the cockpit works, so the button is ok. As always, thanks for your help. --------------------------------------------- -- monitor APU status and turn LED on if ON function APU(offset, value) model = GFP8 unit = 0 id = 1 gfd.SetBright(model, unit, 15) if value > 99 then gfd.SetLight(model, unit, id) else gfd.ClearLight(model, unit, id) end end event.offset("0B54", "FLT", "APU") --------------------------------------------- The Pushback works properly, here is my code: -- Pushback button GFP8 UNIT 0 function PushBack(offset, value) model = GFP8 unit = 0 id = 7 gfd.SetBright(model, unit, 15) if value == 0 then gfd.SetLight(model, unit, id) else gfd.ClearLight(model, unit, id) end end function SetPushBack(model, unit) gfd.GetValues(model, unit) if gfd.TestButton(7) then ipc.writeUB("31F4",0) else ipc.writeUB("31F4",3) end end event.offset("31F0", "UB", "PushBack") event.gfd(GFP8, 0, "SetPushBack")
  6. Pete thanks for the reply. I have the latest version of FSUIPC with FSX. I will test changing "UB" to "FLT". I'm trying to turn the LED "1" ON of a GoFlight module (GFP8) when the APU is ACTIVE. I tried 0B52 with no luck. The Push Back works great. I assign the button function using FSUIPC offset-ready-list and turn the LED on using LUA. I wanted to do the same with the APU...
  7. Hello, I'm using LUA to control the LEDs of several GoFlight modules and everything works great except for one offset: APU! I have tried 0B51, 0B52, 0B53, 0B54, 0B58 and 0B5C! event.offset("0B5C", "UB", "APU") The function APU should set one of the LEDs on. For whatever reason I can't turn any LED on when the APU is on. Any idea? Thanks!
  8. Hello, I'm looking for a few offsets to use with LUA: 1) NAV/GPS: I want to switch the NAV/GPS toggle. The only one I found is below. Does it work with FSX? Is there anything else? 132C NAV/GPS switch, in FS2000 & FS2002. 0=NAV, 1=GPS 2) Fill fuel tank 3) Transponder toggle S-C-I (Standby, Mode C, Ident) Any help is appreciated!
  9. Pete, following up this conversation...if I have two GFT8 modules connected to the same remote PC, are they going to be assigned always the same ID? I appreciated all your help with this!
  10. Thanks Pete and sorry for the confusion. The only think I wanted to do is using the script I published above (which works on a local GFT8 panel) with another GFT8 panel connected to a remote PC. I guess I just need to copy the script in the WideClient folder, configure the correct ID and it should work?
  11. Hi Pete, Let me go one step back with my question...can I link a .LUA file saved in the WideClient folder to a GFT8 button event connected to a remote PC? Does FSUIPC scan (and add in the .INI file) for all .LUA files including the ones stored remotely?
  12. Pete, I have the latest FSUIPC/WideFS (registered). If I copy the LUA file in the Wideclient folder how do I call a function contained in that remote file? Is FSUIPC scanning the WideFS LUA files as well?
  13. Great, it worked. One more question....can I use LUA to control a GoFlight panel (i.e. GFT8) connected to a remote pc? I can "see" the switches via WideFS/FSUIPC but I don't know which ID to assign in the code.
  14. Thanks Djeez. Tha will do part of the trick...what about adding new LUA scripts? Do I need to restart FSX each time?
  15. Thanks Pete. I will try it this morning. One more question: is there a way to reload FSUIPC without shutting FSX down? Basically I would like to make modifications and/or adding new LUA scripts while FSX is up and running.
  16. Hello, I might be missing something but I can't make a simple script working with LUA. When I push a button on the GFP8 I want the pushback to start and the LED on. Button #8 and LED #8. In FSUIPC I see Joystick #101 and button #7 during the assignment, so I used those numbers for my script. When I push the button nothing happens! Any idea? The script is below... Thanks! ------------------------------------------------------ function PushBack(offset, value) model = GFP8 unit = 101 id = 7 gfd.SetBright(model, unit, 15) if value == 0 then gfd.SetLight(model, unit, id) else gfd.ClearLight(model, unit, id) end end function SetPushBack(model, unit) gfd.GetValues(model, unit) if gfd.TestButton(7) then ipc.writeUB("31F4",0) else ipc.writeUB("31F4",3) end end event.offset("31F0", "UB", "PushBack") event.gfd(GFP8, 101, "SetPushBack")
  17. Hello, Do you think it is possible to display a checklist on a networked pc (via widefs) using LUA? I know I can just display a text but I would like to check the status of the items and autocheck them step-by-step the buttons get pushed...
×
×
  • 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.