Sniper31 Posted March 30, 2011 Report Share Posted March 30, 2011 Greetings all, first post for me here. I have a registered version of FSUIPC (version 4.60a), FSX SP2, several GoFlight modules and the RealAir Duke Turbine. I am having trouble assigning some of the cockpit switches in the Duke to my GoFlight switches. I am using the 'event' logging console, but the following Duke switches do not register in the console: Main Inverter and StandBy Inverter switch Left and Right Ignition rocker switches Left and Right Oil Door switches I know that Lua files might work, but I know nothing about how to use Lua files at all. Does anyone have any ideas? I should add also that the Mouse Macro option does not work in the Duke (nor any RealAir aircraft, A2A or other's that I have tried). Thanks for any help offered. :) Link to comment Share on other sites More sharing options...
Pete Dowson Posted March 30, 2011 Report Share Posted March 30, 2011 Greetings all, first post for me here. I have a registered version of FSUIPC (version 4.60a), FSX SP2, several GoFlight modules and the RealAir Duke Turbine. I am having trouble assigning some of the cockpit switches in the Duke to my GoFlight switches. I am using the 'event' logging console, but the following Duke switches do not register in the console Main Inverter and StandBy Inverter switch Left and Right Ignition rocker switches Left and Right Oil Door switches This is probably because the aircraft creator has used his own simulation for those things. I know that Lua files might work, but I know nothing about how to use Lua files at all. Does anyone have any ideas? You'd first need to use the supplied Lua plug-in to log "L:Vars", to see if they are used and if so which ones change when operating those switches. Just place the Lua file into the Modules folder, run FS, and assign a keystroke or button to it. When it runs it displays the L:Vars and changes to them. For examples of how to do things then, checkout some of the submissions in the User Contributions sub-forum. I should add also that the Mouse Macro option does not work in the Duke (nor any RealAir aircraft, A2A or other's that I have tried). Well L:Vars might be usable. I see that there are already several A2A aircraft supported that way -- see the A2A Spitfire, B17, P47 and B377 threads in the User Contributions subforum. Regards Pete Link to comment Share on other sites More sharing options...
Sniper31 Posted March 30, 2011 Author Report Share Posted March 30, 2011 This is probably because the aircraft creator has used his own simulation for those things. You'd first need to use the supplied Lua plug-in to log "L:Vars", to see if they are used and if so which ones change when operating those switches. Just place the Lua file into the Modules folder, run FS, and assign a keystroke or button to it. When it runs it displays the L:Vars and changes to them. For examples of how to do things then, checkout some of the submissions in the User Contributions sub-forum. Well L:Vars might be usable. I see that there are already several A2A aircraft supported that way -- see the A2A Spitfire, B17, P47 and B377 threads in the User Contributions subforum. Regards Pete Pete, Thank you very much for your response...it gives me hope! I will keep on digging then and try to learn more about this Lua plug in process. I did some more reading last night after posting this issue, installed the Lua plug in into the modules folder in FSX, but then could not get it show the L:Vars changes. I tried to follow the L:Vars tutorial but it was getting late, so I might have missed something. I shall press on.. Link to comment Share on other sites More sharing options...
Andydigital Posted March 30, 2011 Report Share Posted March 30, 2011 "L:Duke_Inverter_Switch" is the inverter switch. 0 = off, 1 = Main, 2 = Standby "L:MW_Reset" = the master warning reset button. Send 1 to turn out the light. "L:ignSwL" = Left ignition. 0 = off, 1 = Auto, 2 = On "L:ignSwR" = Right ignition. 0 = off, 1 = Auto, 2 = On Below is an example Lua I use for this aircraft, for the inverter I only bother with switch positions Main and Off. The ignition switches I only bother with Auto and Off positions. I've not bothered looking for the oil doors at all yet, use the method Peter spoke of above to find those if you can. if ipcPARAM == 1 then LVarSet = "L:Duke_Inverter_Switch" val = 0 if ipc.readLvar(LVarSet) == 0 then val = 1 end ipc.writeLvar(LVarSet, val) end if ipcPARAM == 2 then LVarSet = "L:MW_Reset" val = 0 if ipc.readLvar(LVarSet) == 0 then val = 1 end ipc.writeLvar(LVarSet, val) end if ipcPARAM == 3 then LVarSet = "L:ignSwL" val = 0 if ipc.readLvar(LVarSet) == 0 then val = 1 end ipc.writeLvar(LVarSet, val) end if ipcPARAM == 4 then LVarSet = "L:ignSwR" val = 0 if ipc.readLvar(LVarSet) == 0 then val = 1 end ipc.writeLvar(LVarSet, val) end See the tutorials in the user contributions section of the forum for help on using the above. Link to comment Share on other sites More sharing options...
Sniper31 Posted March 30, 2011 Author Report Share Posted March 30, 2011 "L:Duke_Inverter_Switch" is the inverter switch. 0 = off, 1 = Main, 2 = Standby "L:MW_Reset" = the master warning reset button. Send 1 to turn out the light. "L:ignSwL" = Left ignition. 0 = off, 1 = Auto, 2 = On "L:ignSwR" = Right ignition. 0 = off, 1 = Auto, 2 = On Below is an example Lua I use for this aircraft, for the inverter I only bother with switch positions Main and Off. The ignition switches I only bother with Auto and Off positions. I've not bothered looking for the oil doors at all yet, use the method Peter spoke of above to find those if you can. if ipcPARAM == 1 then LVarSet = "L:Duke_Inverter_Switch" val = 0 if ipc.readLvar(LVarSet) == 0 then val = 1 end ipc.writeLvar(LVarSet, val) end if ipcPARAM == 2 then LVarSet = "L:MW_Reset" val = 0 if ipc.readLvar(LVarSet) == 0 then val = 1 end ipc.writeLvar(LVarSet, val) end if ipcPARAM == 3 then LVarSet = "L:ignSwL" val = 0 if ipc.readLvar(LVarSet) == 0 then val = 1 end ipc.writeLvar(LVarSet, val) end if ipcPARAM == 4 then LVarSet = "L:ignSwR" val = 0 if ipc.readLvar(LVarSet) == 0 then val = 1 end ipc.writeLvar(LVarSet, val) end See the tutorials in the user contributions section of the forum for help on using the above. Andy, Thank you for your help. I will try that info out and see how it goes. Wish me luck ;) Link to comment Share on other sites More sharing options...
Sniper31 Posted March 31, 2011 Author Report Share Posted March 31, 2011 UPDATE: Okay Andy, SUCCESS with your Lua example..thanks! Now to see if I can find the Oil Doors... Link to comment Share on other sites More sharing options...
BaobobMiller Posted November 3, 2011 Report Share Posted November 3, 2011 Hello All - I know this post has not has not been active for a while and I'm not really sure where to start.. I recently purchased the duke turbine/piston Combo and I love/hate the plane. It flies great, Looks outstanding, sounds like sweet music when you spin the props. Now before you start thinking that All I'm here to do is talk about how great the plane is, Let me assure you I have spent the last 2 months looking for a way to get the buttons and switches in that plane to work with key-bindings. Preferably something I could send from HiDMacros because I use so many KBD input sources. I was disgusted to find that there were no real published work arounds or anything. Other than other people complaining about it I could find nothing. That's how I happened upon this thread and a similar one at avsim talking about the fuel doors. So in frustration last night I activated the script you speak of and started hacking away in a scripting language I've never looked at before. The result was two scripts. One to handle the radios and inverter switch (otherwise known as the autopilot power switch for some reason), and the other to handle the fuel valves, ignition switches, and oil doors. I tried to include a full array of use types in my scrawlings, things like toggle, Cycle through settings,activate each state independently, basic on, basic off, for each switch as well as for switch sets. For example you can assign the left switch only or both left and tight switches to work together. At any rate I'm asking for someone who knows Lua better than I to look at the scripts and see if I have made any silly mistakes or anything like that. I have uploaded them to avsim because it's the only thing I could think of to do. I would be happy to copy and paste them into this forum but they are quite long so I don't want to post them without someone giving me the go ahead first, my posts are long enough without adding code to them. When the file gets approved for download (if it has not already... or if it ever does for that matter) on avsom.com the file name is dukeluas.zip I appreciate any look see someone can give. Bao Link to comment Share on other sites More sharing options...
Pete Dowson Posted November 3, 2011 Report Share Posted November 3, 2011 At any rate I'm asking for someone who knows Lua better than I to look at the scripts and see if I have made any silly mistakes or anything like that. I have uploaded them to avsim because it's the only thing I could think of to do. I would be happy to copy and paste them into this forum but they are quite long so I don't want to post them without someone giving me the go ahead first, my posts are long enough without adding code to them. When the file gets approved for download (if it has not already... or if it ever does for that matter) on avsom.com the file name is dukeluas.zip I think it would be best if you could post, as a new thread, in the User Contributions subforum. Make the application (aircraft) clear in the title. You can either include the files in the text (enclose then in code brackets -- use the <> button above), or Zip and attach. Thanks, Pete Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now