Jump to content
The simFlight Network Forums

prokopiu

Members
  • Posts

    40
  • Joined

  • Last visited

Everything posted by prokopiu

  1. send me your wishes and I will see if I can do something next week :wink: merry xmas! Kosta
  2. but it does work, right? The text is truncated, not sure why but it looks like the script started.
  3. Hi, I really like the JS41. In my opinion the most beautifully done and technically advanced FSX addon. So, a good bit of work went into creating the LUA programming but it helped me perfect my LUA scripts for use with the VRInsight MCP-Combo. SerialFP has limitations when it comes to planes with XML based gauges such as the AirbusX or the JS41 - you cannot use it. Even with other planes like the Wilco Feelthere Airbus family it is not really great the way they implemented the VC interactions. Thanks to Pete and his relentless efforts to improve FSUIPC I have the means now to customize stuff to a degree I did not have before. What does it do: Set of LUA scripts which connect the VRInsight MCP Combo with the PMDG JS41 without the need for SerialFP or VSPE. What do you need: Latest version of registered FSUIPC minimum 4.638 and the ZIP from this posting as well as FSX SP2 and SerialFP installed. How to install: 1.) Download and install a current version of FSUIPC and register it - this does not work with unregistered FSUIPC!!! 2.) Stop FSX and SerialFP and VSPE or any other virtual serial port software you might use 3.) Turn on your MCP-Combo and start SerialFP. We only need to see the port it allocated at the top left. It needs to be greyed out or SerialFP was not able to connect. Make a note of the port. 4.) Stop SerialFP and make sure it does NOT start with FSX! For this script you do NOT need SerialFP. 5.) Unpack the ZIP and place all three lua files in the <fsx>\modules folder. Remove any of the files I sent out earlier should you have put them there. 6.) Make a copy of your fsuipc.ini because we will make modifications! 7.) Edit fsuipc.ini in the modules folder (FSX should not be running!) 7.1) Look for a section called [VRInsight]. If you don't have one no problem - we add one else we modify it if necessary. 7.2) The VRInsight section should have an entry for every VRInsight device you have. I realized that my MCP sometimes changes port after disconnecting it. I have only 1 device but I made two entries each with the port I discovered as in 3.) [VRInsight] 1=COM4,COM15 2=COM5,COM16 Important are the first ports. My COM4 should be what your SerialFP showed as a port, the second one are virtual ports we don't use. If you have used VSPE before chances are you can leave everything the way it is. 7.3) Look for a section [VRInsight.FMER]. If you have it then fine - just adapt to below - else we add one. [VRInsight.FMER] DriverReads=YES DriverWrites=YES Lua=LuaDispatcher LuaDispatcher is the name of one of the .lua files provided and it will start this script when FSUIPC starts. The script checks what airplane you have loaded and will start the appropriate handler. If you do not want to use it then remove LuaDispatcher.lua and Other_VRIH.lua and make sure that you get the JS41_VRIH lua started by one of the documented means. 7.4) Should you have a [Programs] section with SerialFP to start then please comment this line because we do not want SerialFP to start for this. 7.5) Save the .ini file and then we are ready to go. 8.) Start FSX and wait for it to be READY. Once the initial plane gets loaded (best to have a C172 for startup as most addons ask for that) you will see a Lua Display telling you "Resetting MCP please wait!!". This has been done to set all the MCP displays with current values. It takes some time because I needed to slow things down. If I set too fast then the MCPs gets a hiccup. You should see things happening in the displays. 9.) If everything is sucessful you should see either "VRI Handle used: handleVRI" for any other plane or "VRI Handle used: handleVRIJS41" if you have loaded the JS41. Once you see that, you are ready to go. 10.) If you see "Could not open VRIdevice port" then something is wrong with the setup and it cannot connect to the MCP. Please check ports and fsuipc.ini. 11.) If you change aircraft the dispatcher will change the handler. Obviously that is designed with many more handlers to come (I have one for B737-800 and the AirbusX and the Wilco Airbus with Eric Marciano's Offset addition). See the attached image for my layout. Please do not start to ask for changes - the script comes as is and I don't really have time to support it. If something is horribly wrong I will have look again - but it works fine here. Have fun Kosta JS41_VRI_MCP_0_1.zip
  4. yes yes here I am, I am having other things besides FS (did I just say that? :rolleyes: ) HBE66: Pete is right, you must have at least 4.60. I actually use 4.638 onwards (you can download that from this forum). You must have that because I think a lot of the VRInsight and lua functionality I use is in the latest versions. I have actually spent some time on the JS41 and I think I have a pretty good solution (well as good as it can get with a strange event system like the one in the JS41). I am still testing it and it needs some finishing touches. I will make it available probably this week before xmas. So stay tuned!! Kosta
  5. ok, that somehow does not make sense :) I started with a handler for the JS41 today and attach it here... Kosta JS41_VRIH.lua.txt
  6. Hi, I have not yet started with JS41 Lua MCP Combo programming but I have written a handler for the FSX B737-800 and AirbusX. In that I synchronize the altitude at startup by reading the aircraft value and writing it to the MCP with B737 buffer3 = ipc.readUW(0x5648)/100 com.write(dev, string.format("ALT%03d", buffer3), 8) AirbusX: buffer = ipc.readLvar("L:AB_AP_ALT_Select") / 100 com.write(dev, string.format("ALT%03d", buffer), 8) You need to have set up the device as described in the FSUIPC manual though (look for VRInsight). In FSUIPC.ini you must have a section added [VRInsight] 1=COM4,COM6 You do NOT need to have a virtual COM port software for this. Just find out what port SerialFP would use for your MCP and set the VRIdevice variable. I do it like this: if VRImodel == nil then VRIdevice = "COM4" VRIdriver = "COM6" end speed = 115200 handshake = 0 minsize = 8 maxsize = 8 dev = com.open(VRIdevice, speed, handshake) if dev == 0 then ipc.log("Could not open VRIdevice port") ipc.exit() end regarding the altitude setting. Here I go a different path. I use the com port to detect the activity on the ALT knob and then use the altitude value coming from the MCP (ALT999 command sent) to set the aircraft value. This way it usually doesn't matter how fast your knob turned. AirbusX: {code] if string.match(str, "ALT(%d%d%d)") then ipc.writeLvar("L:AB_AP_ALT_Select", 100 * tonumber(string.match(str, "ALT(%d%d%d)"))) end [/code] To get the ALT999 from the MCP you must have set up the COM port as described above and register a handler ipc.log("VRI Handle used: handleVRIAirbusFT", 10) event.VRIread(dev, "handleVRIAirbusFT") The handler calls a function which reads the MCP signals: -- handle Aerosoft AirbusX function handleVRIAirbusX(handle, str) ipc.log("VRI=" .. str) ... if string.match(str, "ALT(%d%d%d)") then ipc.writeLvar("L:AB_AP_ALT_Select", 100 * tonumber(string.match(str, "ALT(%d%d%d)"))) ... If you are interested in a complete example for the AirbusX I can send it to you as this bird uses XML Gauges as well. Kosta
  7. Hi what are we talking about here? The Saitek PRO Flight Yoke with throttles? A standard FS aircraft, not AirbusX with its weird FADEC logic! I have that combination working fine, setup is as follows: 1. Disable any assignment of throttles in FS options. 2. Start FSX and go to FSUIPC 3. Go to Axis Assignment 4. Scan for the first throttle lever 5. Set Type of action required to "Send direct to FSUIPC Calibration" 6. Set first action to Throttle1 7. Repeat from 4. for other levers 8. Go to Joystick Calibration tab and move to 3 of 11: Seperate throttles per engine 9. I have NO additional settings /axis not processed 10. Go to Buttons + Switches tab 11. Move first throttle lever beyond 0 which will register a button event 12. On the right activate "Select for FS control" 13. Set Control sent when button pressed to Throttle(x) Decr (x your engine number) 14. Activate tick box "Control to repeat while held" 15. Set "Control sent when button released" to Throttle(x) Cut 16. repeat for each throttle lever 17. Press OK Works here for a long time already. Regards Kosta
  8. Hi Keith, If the roll would have been to the left I would have said that you might have single propeller torque effect (I don't own the Bonanza, what direction does the prop turn, clockwise?). Have you checked the manual of the Bonanza if there are settings like that? Have you made changes to the reality settings of FSX? The torque effect is usually corrected by using aileron trim. There are a number of reasons why this might be. Otherwise FSUIPC, if no modification to the axes were done should not be the reason. Have you checked everything from rudder trim to joystick calibration and Saitek software settings? I have the same hardware and software here and no problems at all. Once my rudders were not going back to the 0 position causing a roll but I loosened the pedals and recalibrated and then it was gone again. If you are a registered user of FSUIPC go the axis settings and make sure that nothing is set there and in the joystick calibration section turn off (reset) all settings. Kosta
  9. Hi caos, I have the same aircraft in my hangar and they all work fine for me. I wonder if you have selected aircraft specific settings when you made the change for the Wilco 737. It could be that you overwrote the airbus settings when defining the 737 ones. Make sure the select the little tick box at the top before making the settings for each individual aircraft. And btw. my Saitek throttles show the same "ideal" values :) Regards Kosta
  10. I am not sure if you have the same problem that I had which caused SerialFP2 not to start although the path was correct. I had set SerialFP2 to be run as Administrator. That was done to be able to get write access to files normally blocked (I didn't really need that but left it there out of lazyness). As it turned out it was what prevented SerialFP2 from starting out of FSUIPC. I took away the setting and now it starts every time together with FSX. Kosta
  11. Hi, I finally found the new documentation here http://forums.simflight.com/viewtopic.php?f=54&t=81475 look at Lua Plug-In documents and examples and download the ZIP. There you get the new sound library explained in the documentation. my little playSound() function now: function playSound (path) ref = sound.play(path) while sound.query(ref) do ipc.sleep(1000) end end The loop is to wait that the sound has finished so that sequential sounds do not play simultaneously. Much nicer compared to all the offset writing :) Pete, thanks for the lua functionality - great stuff. Kosta
  12. Hi Kosta, Why not use the Lua sound library functions? Surely easier and more readable, and include sound device selection as well as volume, placement, looping, and stopping? Regards Pete Hi Pete, interesting, I seem to have old documentation because that is the first time I see this - I will look for it! I am writing on some virtual copilot lua scripts where I play checklists sounds etc. Where exactly can I find the doc for the sound lua library? Kosta
  13. try function playSound (path) status = ipc.readSB(0x4200) ipc.writeSTR(0x4208, path, 250) ipc.writeUW(0x4204, 0x1001) ipc.writeSB(0x4200, 1) while ipc.readUW(0x4202) == 1 do ipc.writeSB(0x4200, 4) ipc.sleep(1000) end works fine here, sound in FSX\sound folder, give relative path and filename as parameter. Kosta
  14. I have the AirbusX now for almost 2 weeks and it was a very mixed experience so far. I also have the VRInsight MCP Combo and initially started with guenseli's (Günther?) lua scripts to get it working with the A320. Thanks for publishing that since it got me started. But the classic way of using SerialFP2 to program the keys, find available key commands and assign it has been tedious. I don't know how others are doing it but I found a way of not using SerialFP2 or use a virtual serial port to connect switches from the VRInsight with the Airbus directly. All is in the lua file, I have programmed to detect if an AirbusX is selected. Needless to say that you need the registered version of FSUIPC and you need the latest version you can download from this forum (4.627) because the 4.60 somehow does not work the same. Place the attached VRI_Handler.lua file (unzipped) in the modules folder of FSX. FSX should not run when you do that. Edit the file to set 2 things: a) the COM port of your MCP Combo go to the line where it says VRIdevice = "COM4" Find out what port SerialFP2 usually connects to when started and use that instead of my setting b) Supported AirbusX variants at the bottom of the file look for if string.match(acftname,"Airbus A320 NIKI") or string.match(acftname,"Airbus A320 British Airways") to add another version of the plane to be supported go to the SimObjects\Airplanes folder and pick the "Aerosoft Airbus X A32x..." folder you want to add For example I want to add the Air Berlin A321: \SimObjects\Airplanes\Aerosoft Airbus X A321 CFM Open the aircraft.cfg file in an editor and look for the title string of the type you want to add e.g. "Airbus A321 AIR BERLIN" in my sample in the lua file below the line if string.match(acftname,"Airbus A320 NIKI") or add string.match(acftname,"Airbus A321 AIR BERLIN") or so in the end it should look like if string.match(acftname,"Airbus A320 NIKI") or string.match(acftname,"Airbus A321 AIR BERLIN") or string.match(acftname,"Airbus A320 British Airways") repeat for every other type you want to add That is it. To use you should have the following sequence of events: Turn on VRInsight MCP Combo and make sure it is not allocated by SerialFP2 Start FSX Switch to one of the registered AirbusX types and you should be able to control things from the MCP Combo. I attach a map of switches and what they do: There is NO feedback from FSX to the MCP, only one way communication. If I find out how to do the other thing I let you know. This is my first lua script - if there are things I could do better - let me know, hope it works for you guys as well as it does here. Kosta VRI_Handler.zip
  15. Let me use this thread to also say thank you. I bought FSUIPC just a couple of weeks ago but used the unregistered version for a long long time. I am not sure why I did not spend the money earlier because the registered version is so powerful and for me as a programmer has opened a lot of interesting fields for extending FSX and my aircrafts together with the hardware I have here. I have been experimenting with LUA and the VRInsight plug-in and have now a script that defines all the MCP-Combo settings directly in a lua script and not with the SerialFP2 tools. I created that for the AirbusX from Aerosoft based on information I found on this forum. I will give this some more testing and might publish it here some time in the future. Regards Kosta
×
×
  • 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.