Jump to content
The simFlight Network Forums

adrem

Members
  • Posts

    61
  • Joined

  • Last visited

Posts posted by adrem

  1. I have the same setup with regards to the steering and rudder axes and don't have this issue. It is my understanding that the blending of the tiller and rudder axes should be enabled only when you select SteeringTiller from the 'Send direct to FSUIPC' dropdown, but that's obviously not the case with OP, for some reason.

    Here's my ini for comparison: FSUIPC6.ini

    By the way, I also like to use my rudder for small corrections on straight taxiway segments, even though I have a replica of the real tiller.

  2. 3 hours ago, Pete Dowson said:

    Why do you set those two paths to ""? 

    That was just to show you that socket.core and mime.core were being loaded somehow even with empty module search paths, so not at all intended to be used during normal operation - sorry for the confusion 😄 

    3 hours ago, Pete Dowson said:

    If I can do that then I can make 64-bit FSUIPC the same as far as LuaSockets are concerned as FSUIPC4. The trouble is that the Lua code in FSUIPC is based on the 5.1 version of Lua and i think the problem we had was that no 64-bit compiler was available.

    I don't really understand why you'd want to change anything. 64-bit FSUIPC already includes socket.core and mime.core which are the only binary components of luasocket. For the rest, the user can just download this archive and unzip the lua folder that contains just the lua files into the fsuipc directory to have the complete package: http://files.luaforge.net/releases/luasocket/luasocket/luasocket-2.0.2/luasocket-2.0.2-lua-5.1.2-Win32-vc6.zip. No further steps are required to make it work. As far as I understand, in your 32-bit version, ltn12.lua, mime.lua and socket.lua are also part of the binaries, but that's unnecessary.

    By the way, I don't see any changes in the documentation - Lua Plug-ins.pdf is exactly the same.

  3. 1 hour ago, Pete Dowson said:

    I think the "core" being linked to in FSUIPC is only partial. The missing 32-bit binaries presumably supply the rest.

    Were you looking for the bind function inside the table exported by socket.core? The bind function is in socket.lua. By the way, some parts in the packages that I uploaded are definitely not compatible with the 2.0.2 binaries, so you should be using the 2.0.2 lua files.

    As far as I can tell, everything is there.

  4. 29 minutes ago, Pete Dowson said:

    Of course I don't mind, whatever works best.  I don't understand your changes in any case,, but then I don't understand where it is getting the access through.

    That code bypasses the loader function that loads those magic modules by directly invoking the loader function that only searches for dlls using the package.cpath paths. Now, as I said, the dlls turned out to be unusable because they crash.

    29 minutes ago, Pete Dowson said:

    If so, thanks, I'll do that. But I think we should host that ZIP here.

    I recommend that you host or post the link to this instead: http://files.luaforge.net/releases/luasocket/luasocket/luasocket-2.0.2. What I posted was version 3.0 while the magic core modules are 2.0.2 and I have no idea if the newer lua files are compatible with them throughout.

    29 minutes ago, Pete Dowson said:

    Do you mean put your solution into our documentation?

    I meant saying in the documentation that socket.core and mime.core are included in 64-bit FSUIPC so the user just needs to unzip the luasocket 2.0.2 lua files into the lua folder. 

    Have you tried looking in your code whether you have customized the package loader functions?

  5. Actually, the dlls crash with an access violation error 😄 I tried with a standalone interpreter - same result.

    The culprit is linking against the lua core statically (of course, there's no other option with FSUIPC). If I link against the standalone interpreter's dll import library, it works just fine with the standalone interpreter.

    I personally don't see a problem with just leaving things as is and amending your documentation, since it obviously works with 64-bit.

    18 hours ago, Pete Dowson said:

    Perhaps the real test is whether it works on a cleaner Windows system, one without all the clutter and development code I've accumulated

    I remembered that I helped a guy who uploaded a lua plugin for FSUIPC by giving him the luasocket library. The plugin has been downloaded 900 times and no one complained, so it works on a variety of systems.

  6. 47 minutes ago, Pete Dowson said:

    But in any case, if you would kindly post your (main) solution in the User Contributions subforum I would be grateful.

    If you don't mind, I'll modify socket.lua and mime.lua like this to make them load the dlls (so that the binaries are the same version as the lua files):

    local socket = package.loaders[4]"socket.core"

    socket = type(socket) == "function" and socket() or require "socket.core"

  7. 1 hour ago, Pete Dowson said:

    Your example works, and you are right in that is doesn't need those core.dll's. But I don't know how it is getting past the Require, because, whilst there is a socket library in FSUIPC's Lua, there's no "http" function anywhere in FSUIPC.

    If you unzipped the lua files into the Lua folder, it's expected that it would load socket.http since the Lua folder is inside package.path. The require function also searches subfolders using the dot as the separator. The http module then requires mime.core and socket.core (via socket.lua) which usually come as dlls.

    Besides FSUIPC, I have two other instances of lua interpreters - a standalone exe and inside an in-sim dll. In neither of them does the same magic work.

    When you call require, it goes through the module searcher functions that are inside the package.loaders table. In a vanilla Lua, there are 4 of them, but your Lua has 5. It is the first one that successfully loads these mysterious core modules and I don't think it's part of vanilla Lua because it doesn't work as documented (package.preload is empty).

    1 hour ago, Pete Dowson said:

    Also, to be properly useful, the ftp and udp methods of transferring data needs to work. Have you used those methods?

    Sorry, I'm not really familiar with any of the network stuff either, right now I  have luasocket installed only because it's required by another library (it only uses the tcp function).

    1 hour ago, Pete Dowson said:

    In the meantime, I would be grateful if you could post your full solution (not with core.dll's missing, for now at least), in the User Contributions sub-forum

    Sure, I'll do that later today or tomorrow.

  8. 4 hours ago, Pete Dowson said:

    Could you share your "simple http request" please, so I can try it here and see how it manages to do anything without the needed code? Please say what files you do have, and in which folders

    Unzip the second archive I've uploaded here into FSUIPC Installation\Lua, then delete the dlls from the core and mime folders. Try this code:

    local http = require "socket.http"
    local google = http.request("http://google.com")
    print(google)

     

  9. 6 hours ago, Pete Dowson said:

    We didn't bind either core dll's into 64-bit FSUIPC because we couldn't find versions which were compatible with the version level of Lua we are using,

    Are you sure about that? How was I able to import the modules after removing the module search paths (package.cpath = "") and even physically removing the dlls, if they hadn't been preloaded in Lua already?

    Moreover, even if I have the dlls in the right folders, it's not them that are getting loaded. Their version is 3.0, but the _VERSION field of the loaded module says 2.0.2

  10. Oh, I thought Jason only needed the binaries. Here's the complete package: luasocket.zip

    You can 'require' it straight away if you unzip the content into FSUIPC installation\Lua.

    @Pete Dowson I'm not actually sure if the binaries are needed at all. Could it be that they're already included in FSUIPC? Otherwise, I don't understand my this works on my system:

    package.path = ""
    package.cpath = ""
    assert(require "socket.core")
    assert(require "mime.core")

    EDIT: It says on page 2 of FSUIPC Lua Plug-Ins.pdf that these modules are included, but not with FSUIPC5 (it says nothing about FSUIPC6 which is what I'm using).

  11. I tried FSUIPC6.dll and it's working as expected with one minor exception: if I release CTRL first, then the plain key callback is called after I subsequently release A. I don't know if it's feasible for you to make it that the CTRL+A callback is called when you release either one of the keys or both, so feel free to ignore this.

  12. 20 hours ago, Pete Dowson said:

    think it probably relates to the fact that the Key Down also generates an event. Might be interesting for you to test those two assignment lines with actions only on the Key Up.

    I wanted to try right now, but the control drop-down for Key Up is greyed out if you haven't selected a control for Key Down.

    By the way, I've upgraded to FSUIPC6 - in case there will be another dll to test.

  13. I'm not sure if that makes sense - your regular key binding facility certainly doesn't work that way.


    I've made the following assignments to test:
    11=65,8,66601,0,66601,1     -{A: Press=ADD_FUEL_QUANTITY, Release=ADD_FUEL_QUANTITY }-
    13=65,10,66601,2,66601,3     -{ctl+A: Press=ADD_FUEL_QUANTITY, Release=ADD_FUEL_QUANTITY }-

    As you can see in the log, it only sent param 1 when I released the plain key and it only sent param 3 when I released CTRL+A:


        82884 KEYDOWN: VK=65, Waiting=0, Repeat=N, Shifts=0
        82884 FS Control Sent: Ctrl=66601, Param=0 ADD_FUEL_QUANTITY
        82884 .. This key is programmed in FSUIPC5 'Keys' options
        83383 KEYDOWN: VK=65, Waiting=0, Repeat=Y, Shifts=0
        83383 FS Control Sent: Ctrl=66601, Param=0 ADD_FUEL_QUANTITY
        83383 .. This key is programmed in FSUIPC5 'Keys' options
        83430 KEYDOWN: VK=65, Waiting=0, Repeat=Y, Shifts=0
        83430 FS Control Sent: Ctrl=66601, Param=0 ADD_FUEL_QUANTITY
        83430 .. This key is programmed in FSUIPC5 'Keys' options
        83461 KEYDOWN: VK=65, Waiting=0, Repeat=Y, Shifts=0
        83461 FS Control Sent: Ctrl=66601, Param=0 ADD_FUEL_QUANTITY
        83461 .. This key is programmed in FSUIPC5 'Keys' options
        83492 KEYDOWN: VK=65, Waiting=0, Repeat=Y, Shifts=0
        83492 FS Control Sent: Ctrl=66601, Param=0 ADD_FUEL_QUANTITY
        83492 .. This key is programmed in FSUIPC5 'Keys' options
        83523 KEYDOWN: VK=65, Waiting=0, Repeat=Y, Shifts=0
        83523 FS Control Sent: Ctrl=66601, Param=0 ADD_FUEL_QUANTITY
        83523 .. This key is programmed in FSUIPC5 'Keys' options
        83554 KEYDOWN: VK=65, Waiting=0, Repeat=Y, Shifts=0
        83554 FS Control Sent: Ctrl=66601, Param=0 ADD_FUEL_QUANTITY
        83554 .. This key is programmed in FSUIPC5 'Keys' options
        83586 KEYDOWN: VK=65, Waiting=0, Repeat=Y, Shifts=0
        83586 FS Control Sent: Ctrl=66601, Param=0 ADD_FUEL_QUANTITY
        83586 .. This key is programmed in FSUIPC5 'Keys' options
        83617 KEYDOWN: VK=65, Waiting=0, Repeat=Y, Shifts=0
        83617 FS Control Sent: Ctrl=66601, Param=0 ADD_FUEL_QUANTITY
        83617 .. This key is programmed in FSUIPC5 'Keys' options
        83648 KEYDOWN: VK=65, Waiting=0, Repeat=Y, Shifts=0
        83648 FS Control Sent: Ctrl=66601, Param=0 ADD_FUEL_QUANTITY
        83648 .. This key is programmed in FSUIPC5 'Keys' options
        83695 KEYDOWN: VK=65, Waiting=0, Repeat=Y, Shifts=0
        83695 FS Control Sent: Ctrl=66601, Param=0 ADD_FUEL_QUANTITY
        83695 .. This key is programmed in FSUIPC5 'Keys' options
        83695 KEYUP: VK=65, Waiting=0
        83695 FS Control Sent: Ctrl=66601, Param=1 ADD_FUEL_QUANTITY
        83695 .. This key is programmed in FSUIPC5 'Keys' options
        86955 KEYDOWN: VK=17, Waiting=0, Repeat=N, Shifts=2
        86955 .. Key not programmed -- passed on to FS
        87454 KEYDOWN: VK=17, Waiting=0, Repeat=Y, Shifts=2
        87454 .. Key not programmed -- passed on to FS
        87470 KEYDOWN: VK=65, Waiting=0, Repeat=N, Shifts=2
        87470 FS Control Sent: Ctrl=66601, Param=2 ADD_FUEL_QUANTITY
        87470 .. This key is programmed in FSUIPC5 'Keys' options
        87969 KEYDOWN: VK=65, Waiting=0, Repeat=Y, Shifts=2
        87969 FS Control Sent: Ctrl=66601, Param=2 ADD_FUEL_QUANTITY
        87969 .. This key is programmed in FSUIPC5 'Keys' options
        88016 KEYDOWN: VK=65, Waiting=0, Repeat=Y, Shifts=2
        88016 FS Control Sent: Ctrl=66601, Param=2 ADD_FUEL_QUANTITY
        88016 .. This key is programmed in FSUIPC5 'Keys' options
        88047 KEYDOWN: VK=65, Waiting=0, Repeat=Y, Shifts=2
        88047 FS Control Sent: Ctrl=66601, Param=2 ADD_FUEL_QUANTITY
        88047 .. This key is programmed in FSUIPC5 'Keys' options
        88078 KEYDOWN: VK=65, Waiting=0, Repeat=Y, Shifts=2
        88078 FS Control Sent: Ctrl=66601, Param=2 ADD_FUEL_QUANTITY
        88078 .. This key is programmed in FSUIPC5 'Keys' options
        88110 KEYDOWN: VK=65, Waiting=0, Repeat=Y, Shifts=2
        88110 FS Control Sent: Ctrl=66601, Param=2 ADD_FUEL_QUANTITY
        88110 .. This key is programmed in FSUIPC5 'Keys' options
        88141 KEYDOWN: VK=65, Waiting=0, Repeat=Y, Shifts=2
        88141 FS Control Sent: Ctrl=66601, Param=2 ADD_FUEL_QUANTITY
        88141 .. This key is programmed in FSUIPC5 'Keys' options
        88172 KEYDOWN: VK=65, Waiting=0, Repeat=Y, Shifts=2
        88172 FS Control Sent: Ctrl=66601, Param=2 ADD_FUEL_QUANTITY
        88172 .. This key is programmed in FSUIPC5 'Keys' options
        88203 KEYUP: VK=65, Waiting=0
        88203 FS Control Sent: Ctrl=66601, Param=3 ADD_FUEL_QUANTITY
        88203 .. This key is programmed in FSUIPC5 'Keys' options
        88375 KEYUP: VK=17, Waiting=0

  14. 2 hours ago, John Dowson said:

    Hi,

    could you please try the following dll: FSUIPC5.DLL

    I've tested with your script and the release is printed with the shift.

    Cheers,

    John

    It does work, however it calls both callbacks when the bind is released.
       160338 LUA.0: initial press (CTRL+A)
       160837 LUA.0: repeated press (CTRL+A)
       160868 LUA.0: repeated press (CTRL+A)
       160915 LUA.0: repeated press (CTRL+A)
       160930 LUA.0: repeated press (CTRL+A)
       160946 LUA.0: release (A)
       160946 LUA.0: release (CTRL+A)
       164363 LUA.0: initial press (A)
       164846 LUA.0: repeated press (A)
       164893 LUA.0: repeated press (A)
       164924 LUA.0: repeated press (A)
       164940 LUA.0: repeated press (A)
       164955 LUA.0: release (A)
       164955 LUA.0: release (CTRL+A)

×
×
  • 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.