Jump to content
The simFlight Network Forums

ZldvX

Members
  • Posts

    10
  • Joined

  • Last visited

Profile Information

  • Gender
    Male
  • Location
    Malaysia

ZldvX's Achievements

Newbie

Newbie (1/14)

  • Week One Done Rare
  • One Month Later Rare
  • One Year In Rare

Recent Badges

0

Reputation

  1. Hi Thomas, Good news, its all worked out. what i need to do is close my logitech gaming software (because it run lua script in background too, i dont know why but it somehow wont work if i leave LGS open) and Assign the LUAvalue to button 3. Thank you so much for taking your time to guide me through this 😄 Again, Thank You So Much !
  2. Hi, Thank you thomas the script work, The button does work, i can change from aileron to rudder and vice versa but im unable to change the control inside the sim, what i have to do is open the fsuipc menu, press the button, and come back to sim, and the control changed. do you by chance know why is that? is that a bug or theres something wrong with my fsuipc setting or something ? Or theres something wrong with the ipcReady ? i load the RudTilSW from ipcReady (I deleted the [Auto] in fsuipc ini) Heres my ipcReady log ********* LUA: "ipcReady" Log [from FSUIPC version 5.151] ********* 3850250 System time = 07/08/2019 08:20:35, Simulator time = 14:00:08 (19:00Z) 3850250 LUA: beginning "F:\Lockheed Martin Prepar3D v4\Modules\ipcReady.lua" 3850250 LUA: F:\Lockheed Martin Prepar3D v4\Modules\ipcReady.lua:1 3850250 LUA: Global: ipcPARAM = 0 3850359 >>> Thread forced exit (ipc.exit or os.exit) <<< 3850359 System time = 07/08/2019 08:20:35, Simulator time = 14:00:08 (19:00Z) ********* LUA execution terminated: Log Closed ********* Thank You.
  3. Here it is. The axis is fine, when i move the X axis the rudder does move, the only problem is that i cant switch it to alieron. Thanks Log.rar
  4. Hi thomas, here i updated the setting. the problem is the button to change to Alieron or vice versa is not responding when i press it. Is there any chance to change the button to keyboard button instead ? Thanks.
  5. Hi, Here is both the .ini and log file. *i reupload the files, because i attached an old log. log.rar
  6. Hi Thomas, Thanks again, really appreciate it, but seems like doesnt work, when i press my button on my joystick , nothing happend (The joynumber and button number is the same), and also i tried to change instead "Rudder To Tiller" to "Rudder to Aileron" because that what i try to achieve (its a typo when i said rudder to tiller, Sorry 😄 ) by change the ipc.control value. here i attached my edited script, Really hope you can help me to see what the matter. Sorry to bother you. Thanks. ------------------------------------------------------- -- Lua plug-in for Rudder / Tiller switch -- ------------------------------------------------------- ------------------------------------------------------- -- if 'AutoAssignLetters=Yes' is used then 'joyNumber' is a letter between asterix -- else it is the number without asterix -- 'btnNumber' is Button number shown in FSUIPC -- FS Controls joyNumber = "A" btnNumber = 1 -- create Button mask btnMask = 2^btnNumber btnPressed = 0 toggleBtn = 0 -- Rudder out value rudOut = 0 tilOut = 0 setZero = 1 while 1 do ipc.sleep(20) if (logic.And(ipc.buttons(joyNumber), btnMask) == 1) then btnPressed = btnPressed + 1 if (btnPressed == 1 and toggleBtn == 0) then toggleBtn = 1 setZero = 0 ipc.writeSTR(0x3380, "TILLER CONTROL\0") ipc.writeSW(0x32FA, 4) elseif (btnPressed == 1 and toggleBtn == 1) then toggleBtn = 0 setZero = 0 ipc.writeSTR(0x3380, "RUDDER CONTROL\0") ipc.writeSW(0x32FA, 4) end if btnPressed > 25 then btnPressed = 25 end else if btnPressed > 0 then btnPressed = btnPressed - 1 end end -- read aileron axis from FS axisSW = ipcPARAM -- write to rudder depending of selection if toggleBtn == 1 then -- write TILLER diffT = (axisSW - tilOut) / 5 tilOut = tilOut + diffT ipc.control(65695, tilOut) if setZero == 0 then setZero = 1 rudOut = 0 ipc.control(65764, 0) ipc.log("RUD nCTR") end else -- write RUDDER diffR = (axisSW - rudOut) / 5 rudOut = rudOut + diffR ipc.control(65764, rudOut) if setZero == 0 then setZero = 1 tilOut = 0 ipc.control(65695, 0) ipc.log("TIL nCTR") end end end --Aileron 65695 --Steering 66818 --Rudder 65764 RudTilSW.lua
  7. Hi Thomas, Thanks again, i appreciate it, but somehow your script wont work with FSLabs A3xx , any other aircraft is fine. I tried to edit the script but its too confusing, basically what i tried to do is this : If "A button" is pressed, use X axis as Rudder, if "A button" is pressed again, use X axis as Steering. im relatively new to LUA programming, do you think you can help me achieve it ? Thanks
  8. Hi Thomas, Thank you for your reply, but in what part i cant get the "joyNumber", "joyAxis", and the "btnNumber" ? is it in the FSUIPC application or in the .ini files ? im sorry for such a noob question 😄 Thanks
  9. Hi pete, Thanks for your answer, unfortunately i dont know how to write a program in LUA. Can you guide me which doumentation is relevant for my goals? Thanks.
  10. Hi, So, my rudder is broken and now im a liltle short on money, so i have a joystick (CH Flightstick PRO) that only has 2 axis, X and Z. I Assign my Z axis as my Elevator, and X axis as my Aleiron. Some addon , lets say FSLab a3xx and BBS require steering/rudder to move on ground, i tried with auto rudder setting within the simulation but no luck with those 2 add on, is there any way to make the X axis as Rudder in ground and as Aleiron in Sky ?. What i've tried to do : Asign both Aleiron and Rudder/Steering to the X axis in FSUIPC, but when on final the aircraft becomes unstable. What i wanted to do : Change the X axis from aleiron to rudder/steering vice versa with a toogle of a button. Thanks.
×
×
  • 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.