Georgy
-
Posts
15 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Gallery
Downloads
Posts posted by Georgy
-
-
On 5/31/2023 at 1:05 AM, Georgy said:
time1 = ipc.elapsedtime() time2 = 0 if timebutton(false) then -- First press / release counts: see if there's another if timebutton(true) then -- got another press in time, look for release if timebutton(false) then -- this was a double press, send VIEW RIGHT ipc.control() ignorepress = true -- ignore the next press we receive, i.e. the 2nd in a double-press end else -- This was a single press, send VIEW LEFT ipc.control(67279) ignorepress = false end else -- This was a longer press, send VIEW FORWARD ipc.control(65861) end
What strings (lines) can I delete?
I'm sorry. Can You help me? I don't know which lines I can delete, if i need one action (hold press), or 2 actions (hold press and single press) only.
-
On 5/31/2023 at 12:58 AM, Georgy said:
I'm sorry... I used a translator
I would like to do this:
1. In a Boeing 737, I do gear up.
2. Wheels retract
3. After 10 seconds, the gear lever automatically switches to off mode.
I was able to do it.
Assigned "gear up" to physical lever without lua script.
In tripleuse.lua assigned only one action (hold press): move virtual lever to position "gear off" after 10 seconds when the physical lever is up. -
B=TCA YOKE BOEING
B.GUID={E05CFE20-D530-11EC-8003-444553540000}Can I use letter "B" at "joy' line of Tripleuse.lua? Or only number?
-
7 hours ago, John Dowson said:
Or, better still, remove the code that handles a double-press completely if not using this.
time1 = ipc.elapsedtime() time2 = 0 if timebutton(false) then -- First press / release counts: see if there's another if timebutton(true) then -- got another press in time, look for release if timebutton(false) then -- this was a double press, send VIEW RIGHT ipc.control() ignorepress = true -- ignore the next press we receive, i.e. the 2nd in a double-press end else -- This was a single press, send VIEW LEFT ipc.control(67279) ignorepress = false end else -- This was a longer press, send VIEW FORWARD ipc.control(65861) end
What strings (lines) can I delete?
-
7 hours ago, John Dowson said:
Sorry but I don't understand. What is a 'chassis crane'? What do you want to do?
I'm sorry... I used a translator
I would like to do this:
1. In a Boeing 737, I do gear up.
2. Wheels retract
3. After 10 seconds, the gear lever automatically switches to off mode.
-
4 minutes ago, John Dowson said:
Why? The preset is a name, and the documentation for this function is:
The only number needed is the parameter, if the preset uses one (most don't).
John
Thank You!
Tell me please how to implement such a function: I raise the chassis crane in 737 (Thrustmaster Boeing), the lever presses the button all the time. After 10 seconds, the second action is activated: the lever itself is transferred to the off position. Sorry for my bad English)
-
16 minutes ago, John Dowson said:
Вы не можете сделать это сами? Почему бы вам просто не попробовать запустить его и использовать предоставленные средства отладки, если у вас возникнут какие-либо проблемы.
I meant, did I enter the action correctly in brackets and quotes? Shouldn't there be numbers?
-
4 minutes ago, John Dowson said:
No, that won't work, as you are changing the variable value. You can use one script if you know what you are doing (I am not going to explain this to you...!), but it is probably easier to use a separate script for each button.
What don't you understand? Your script contains the following lines to execute the control/event:
ipc.control(67279)
So that sends the control AUTO_THROTTLE_DISCONNECT. To send a preset instead, change that to:
ipc.execPreset("presetName")
where presetName is the name of the preset. Or add the parameter if the preset uses one, e.g. ipc.execPreset("presetName", param)John
Please, check this code):
joy = 3 btn = 8 interval = 100 -- 1/2 second press, gap, press limits ignorepress = false -- Function to time the button being pressed or left released -- Allow only up to "interval" till decide no change local function timebutton(test) while true do time2 = ipc.elapsedtime() if (time2 - time1) > interval then ignorepress = false return false end if ipc.testbutton(joy, btn) == test then time1 = time2 return true end ipc.sleep(20) end end function buttonpress(j, b, du) if ignorepress then ignorepress = false return end -- Note time button was pressed time1 = ipc.elapsedtime() time2 = 0 if timebutton(false) then -- First press / release counts: see if there's another if timebutton(true) then -- got another press in time, look for release if timebutton(false) then -- this was a double press, send VIEW RIGHT ipc.control() ignorepress = true -- ignore the next press we receive, i.e. the 2nd in a double-press end else -- This was a single press, send VIEW LEFT ipc.execPreset("PMDG_B737-7_FUEL_CUT_OFF_LEVER1_UP") ignorepress = false end else -- This was a longer press, send VIEW FORWARD ipc.execPreset("PMDG_B737-7_FUEL_CUT_OFF_LEVER1_DN") end end -- Enable event on button being pressed (only) event.button(joy, btn, 1, "buttonpress")
-
Just now, John Dowson said:
For presets, just use ipc.execPreset instead of ipc.control
John
Sorry, I don't understand(( Can You write example? Thank You!
-
And how I can add another controller to the same script? For example:
joy = 3 btn = 2 joy = 4 btn = 5
It will be work? Or I must to do 2 tripleuse.lua for my controllers?
-
Thank You, John! I thought maybe you did another way)
AT Disengage (67279) and TOGA (65861) I did! Thank you! Code:joy = 3 btn = 2 interval = 100 -- 1/2 second press, gap, press limits ignorepress = false -- Function to time the button being pressed or left released -- Allow only up to "interval" till decide no change local function timebutton(test) while true do time2 = ipc.elapsedtime() if (time2 - time1) > interval then ignorepress = false return false end if ipc.testbutton(joy, btn) == test then time1 = time2 return true end ipc.sleep(20) end end function buttonpress(j, b, du) if ignorepress then ignorepress = false return end -- Note time button was pressed time1 = ipc.elapsedtime() time2 = 0 if timebutton(false) then -- First press / release counts: see if there's another if timebutton(true) then -- got another press in time, look for release if timebutton(false) then -- this was a double press, send VIEW RIGHT ipc.control() ignorepress = true -- ignore the next press we receive, i.e. the 2nd in a double-press end else -- This was a single press, send VIEW LEFT ipc.control(67279) ignorepress = false end else -- This was a longer press, send VIEW FORWARD ipc.control(65861) end end -- Enable event on button being pressed (only) event.button(joy, btn, 1, "buttonpress")
How do I manage the cut off valves? They work as presets. I don't know what code to enter.Unfortunately, the github page https://github.com/joeherwig/msfs-fsuipc-lua-scripts is not working.
-
Hello!I want to turn on the fuel valve cut off in 737 pmdg with a short press of the button and turn it off by long pressing the same button.
Same with autothrottle disengage (short press) and TOGA (long press)
How to do it?
-
Sorry
I typed BrakeReleaseThreshold=0 only for Cessna. Another aircrafts have "BrakeReleaseThreshold=75". It's working!
-
Hello, Pete!
I type "BrakeReleaseThreshold=0" in [JoystickCalibration.Accusim cessna 172 1] (In [General] section value is 75). After that I press brake pedal, and Parking brakes are released in all my aircrafts. How can I do it only for Cessna?
Different actions for short and hold presses of the button
in FSUIPC7 MSFS
Posted
Thank You.) The letter would be more convenient when changing different joysticks, because it is attached to each device, even when it is disabled.