Annonce

Réduire
Aucune annonce.

FlyLua et XP11

Réduire
X
 
  • Filtre
  • Heure
  • Afficher
Tout nettoyer
nouveaux messages

  • X-Plane 11.x FlyLua et XP11

    Bonsoir,
    La dernière version du plugin était faite pour XP10.50/51 mais ne fonctionne pas avec XP11. Sur le .org, un simeur à donné une solution mais je suis incapable de la mettre en oeuvre car je n'en comprend pas le sens !! il s'agit d'un fichier "parametres de config" qui s'ouvre en .txt. Il ressemble à une programmation, mais hélas je ne suis pas informaticien !!
    -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    -- -- -- --
    -- -- D '' T D II T !! -- --
    -- -- D '' T EE D T !! -- --
    -- -- DDD OO N NN TTT E E DDD II TTT !! -- --
    -- -- D D O O NN N T EEE D D I T !! -- --
    -- -- D D O O N N T E D D I T -- --
    -- -- DDD OO N N TT EEE DDD I TT !! -- --
    -- -- -- --
    -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

    -- SaveInitialAssignments.ini version 2.1.26 build 2013-03-20

    function save_initial_assignments()
    -- first we have to open a textfile for writing
    local textfile
    if SYSTEM == "IBM" then
    textfile = io.open("Resources\\plugins\\FlyWithLua\\initial_a ssignments.txt", "w")
    else
    textfile = io.open("Resources/plugins/FlyWithLua/initial_assignments.txt", "w")
    -- else
    -- textfile = io.open("Resources:plugins:FlyWithLua:initial_assi gnments.txt", "w")
    end

    -- now we can read and write the axis assignments, the code is taken from the old 1.x script
    -- X-Plane only stores an integer to represent the function, we use a table to give it a name
    local axis_functions = { "pitch", "roll", "yaw", "throttle", "collective", "left toe brake", "right toe brake", "prop",
    "mixture", "carb heat", "flaps", "thrust vector", "wing sweep", "speedbrakes", "displacement",
    "reverse", "elev trim", "ailn trim", "rudd trim", "throttle 1", "throttle 2", "throttle 3",
    "throttle 4", "prop 1", "prop 2", "prop 3", "prop 4", "mixture 1", "mixture 2",
    "mixture 3", "mixture 4", "reverse 1", "reverse 2", "reverse 3", "reverse 4", "landing gear",
    "nosewheel tiller", "backup throttle", "auto roll", "auto pitch", "view left/right", "view up/down", "view zoom",
    "camera left/right", "camera up/down", "camera zoom", "gun/bomb left/right", "gun/bomb up/down" }

    -- now we can write the axis config to the Log.txt file
    textfile:write("-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --\n")
    textfile:write("-- -- FlyWithLua: The initial assignments are stored in this file. -- --\n")
    textfile:write("-- -- 8< -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --\n\n")
    textfile:write("clear_all_axis_assignments()\n")

    -- make the variables local to keep Lua clean
    local i
    local axis_function_index
    local axis_reverse

    -- look into all 100 axis
    for i = 0, 99 do
    -- pull the index to the function name from X-Plane
    axis_function_index = get( "sim/joystick/joystick_axis_assignments", i )
    -- pull the reverse info from X-Plane
    -- the value is 0, if the axis is normal, but is the number of the axis, if the axis is reverse
    if get( "sim/joystick/joystick_axis_reverse", i ) > 0 then
    axis_reverse = "reverse"
    else
    axis_reverse = "normal"
    end
    -- we do not need to kill axis twice, this was already done by clear_all_axis_assignments()
    if axis_function_index > 0 then
    textfile:write( "set_axis_assignment( " .. i .. ', "' .. axis_functions[axis_function_index] .. '", "' .. axis_reverse .. '" )\n' )
    end
    end

    -- now we will write the button assignments
    textfile:write("\nclear_all_button_assignments()\n ")

    -- read the information from X-Plane's own settings
    local xplanefile
    if SYSTEM == "IBM" then
    xplanefile = io.open("Output\\preferences\\X-Plane Joystick Settings.prf", "r")
    else
    xplanefile = io.open("Output/preferences/X-Plane Joystick Settings.prf", "r")
    -- else
    -- xplanefile = io.open("Output:preferences:X-Plane.prf", "r")
    end

    local number
    local sticknumber
    local stickindex
    local commandstring
    local linestring

    -- find the last axis assignments (the next line defines the first button assignment
    repeat
    linestring = xplanefile:read()
    until linestring:find("_joy_AXIS_use249 ") ~= nil

    for i = 0, 1599, 1 do
    -- the text "_joy_BUTN_use" has a length of 13 character, we will jump over them
    xplanefile:read(13)
    -- read the number, skip the space and read the commandstring
    number = xplanefile:read("*n")
    xplanefile:read(1)
    commandstring = xplanefile:read()
    -- reformat the number to (n*40) + i
    sticknumber = math.floor(number / 40)
    stickindex = number - (sticknumber*40)
    -- check if it is useful and write it to the config textfile
    if commandstring ~= "sim/none/none" then
    textfile:write("set_button_assignment( (" .. sticknumber .. '*40) + ' .. stickindex .. ', "' .. commandstring .. '" )\n')
    end
    end

    -- some DataRefs who should be set too
    textfile:write("\n-- setting nullzone, sensitivity and augment\n")
    textfile:write(string.format('set( "sim/joystick/joystick_pitch_nullzone", %1.3f )\n', get("sim/joystick/joystick_pitch_nullzone")))
    textfile:write(string.format('set( "sim/joystick/joystick_roll_nullzone", %1.3f )\n', get("sim/joystick/joystick_roll_nullzone")))
    textfile:write(string.format('set( "sim/joystick/joystick_heading_nullzone", %1.3f )\n', get("sim/joystick/joystick_heading_nullzone")))
    textfile:write(string.format('set( "sim/joystick/joystick_pitch_sensitivity", %1.3f )\n', get("sim/joystick/joystick_pitch_sensitivity")))
    textfile:write(string.format('set( "sim/joystick/joystick_roll_sensitivity", %1.3f )\n', get("sim/joystick/joystick_roll_sensitivity")))
    textfile:write(string.format('set( "sim/joystick/joystick_heading_sensitivity", %1.3f )\n', get("sim/joystick/joystick_heading_sensitivity")))
    textfile:write(string.format('set( "sim/joystick/joystick_pitch_augment", %1.3f )\n', get("sim/joystick/joystick_pitch_augment")))
    textfile:write(string.format('set( "sim/joystick/joystick_roll_augment", %1.3f )\n', get("sim/joystick/joystick_roll_augment")))
    textfile:write(string.format('set( "sim/joystick/joystick_heading_augment", %1.3f )\n', get("sim/joystick/joystick_heading_augment")))

    -- finish
    textfile:write("\n-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- >8 -- --\n\n")
    textfile:write(string.format('-- PLANE_ICAO == "%s"\n', PLANE_ICAO))
    textfile:write(string.format('-- PLANE_TAILNUMBER == "%s"\n', PLANE_TAILNUMBER))
    textfile:write(string.format('-- AIRCRAFT_FILENAME == "%s"\n', AIRCRAFT_FILENAME))
    textfile:close()
    xplanefile:close()
    end

    save_initial_assignments()
    Win 10/64 Pro (1709); XP10-50; XP11-51
    i5 4590 / h97 / 16 Go DDR3-1600Mhz /GTX660 MSI / SSD 850EVO-120Go / HDD WD Blue 64/1T Mo-7200RPM / IIyama 24" / Yoke+gaz+palonnier Saiteck

  • #1
    Salut ,

    Je t'en avais parlé dans un autre post (relatif à XP11 , impressions,je crois)

    Ce fichier "SaveInitialAssignements" remplace celui qui se trouve dans "plugins/FlyWithLua/Internals" et devait te permettre de faire fonctionner FWL.
    Des soucis pourraient toutefois exister avec RTH qui est le but ,il me semble , de l'emploi de ce plugin chez toi.
    DualBoot Win10(Xplane)/OpenSuse Linux Leap v42.2 x86_64b KDE
    i5 -3570K 3.40 Ghz 32Go ram DDR3
    Ge Force GTX1070 mem 8Go DDR5 XP11.30.r3

    Commentaire


    • #1
      Envoyé par guyt Voir le message
      Salut ,
      Je t'en avais parlé dans un autre post (relatif à XP11 , impressions,je crois)
      Ce fichier "SaveInitialAssignements" remplace celui qui se trouve dans "plugins/FlyWithLua/Internals" et devait te permettre de faire fonctionner FWL.
      Des soucis pourraient toutefois exister avec RTH qui est le but ,il me semble , de l'emploi de ce plugin chez toi.
      Re,
      Justement, j'avais été voir le lien que tu m'avais indiqué et là, il y avait LA discussion à laquelle je n'avais rien compris et où je n'avais pas trouvé d'explications
      !! Merci pour ta précision d'utilisation: ça fonctionne !! Maintenant, je vais y faire le ménage car c'est préchargé avec un tas de scripts dont je n'ai pas besoin !!
      Bonne soirée !! "

      EDIT: effectivement, RTH ne fonctionne pas. Je n'ai donc gardé que "checks lists" et "Vspeed737"
      Dernière modification par fonta, 19 décembre 2016, 18h24.
      Win 10/64 Pro (1709); XP10-50; XP11-51
      i5 4590 / h97 / 16 Go DDR3-1600Mhz /GTX660 MSI / SSD 850EVO-120Go / HDD WD Blue 64/1T Mo-7200RPM / IIyama 24" / Yoke+gaz+palonnier Saiteck

      Commentaire


      • #1
        Pour info version béta FlyWithlua pour X-Plane 11 :

        Fais de ta vie un rêve, et d'un rêve, une réalité. ( A de Saint Exupéry )

        Boitier : Corsair 275Q CM : ASUS Z590 Plus Gaming Proc : I9 11900F sous Windows 11 Ram : G.Skill 32 Go DDR4 2666 CG : RTX 5070 Alim : ATX 1000 w 1 SSD Samsung 500 Go + HDD 2 To interne + 1 SSD Samsung T1 500 Go + 1 SSD Samsung T3 1To + 1 HDD 2To + 1 HDD 4To
        Ecran Millénium 34" 3440*1440 144 hz / Ecran Asus ROG 27" 2510*1960 144 hz / Hotas Warthog / palonnier TFRP / souris R.A.T. 7 / X-Plane 12

        Commentaire

        Chargement...
        X