Jump to content
The simFlight Network Forums

ghingres

new Members
  • Posts

    2
  • Joined

  • Last visited

Everything posted by ghingres

  1. Hi Stuart. You'll need to be running iFlyFSUIPC software (to integrate the iFLY offsets into FSUIPC).. Create a file called engine_cutoff.lua in your modules directory and copy/past the following script into it (it toggles the state on/off each time)... IFLY={ command=0x9400 } ENGINE_OFFSET={ [1]={ valve=0x0890, idle=510, cutoff=511 }, [2]={ valve=0x0928, idle=513, cutoff=514 } } function engine_cutoff (pi_engine) if ((nil==pi_engine) or (0==pi_engine)) then li_engine=1 else li_engine=pi_engine end local l_valve_pos = ipc.readUW(ENGINE_OFFSET[li_engine].valve) ipc.log (" Engine "..pi_engine.." valve is "..l_valve_pos) if (0 == l_valve_pos) then ipc.log (" Switching ON Engine"..pi_engine) l_valve_cmd = ENGINE_OFFSET[li_engine].idle else ipc.log (" Switching OFF Engine "..pi_engine) l_valve_cmd = ENGINE_OFFSET[li_engine].cutoff end l_fsuipc_val = ipc.writeUW(IFLY.command,l_valve_cmd) end event.flag("engine_cutoff") now startup your simulator and go into the FSUIPC menu and assign your buttons to LUA engine_cutoff... if you provide parameter value 2 it will toggle the engine 2 etc.. Hope this helps Cheers Gary
  2. Hi Everyone. Attached for everyone to play with is my LUA script that interfaces to a MAESTRO POLOLU servo card. My example code is for a flaps gauge but should be easily hackable into whatever you want. Unfortunately I wasn't able to get the COM library to work against this card (perhaps Peter could look at this and compare it to the LUA RS232 library that I have used). Cheers Gary lua_maestro_polulu.zip
×
×
  • 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.