Jump to content

Gear handle


mokny
 Share

Recommended Posts

Hi,

i have a 3 way switch.

Up: Gear lever up
Down: Gear lever down
Middle: Gear lefer off

Works, but as soon as I address the dataref ixeg/733/gear/gear_handle_act with write access with FlyWithLua (without setting any value) I get a constant sound of the lever. Is there a different solution?

This line is enough to get a constant sound loop (of course the line itself is not placed in a loop...):

    dataref("GEAR", "ixeg/733/gear/gear_handle_act", "writable")

Thanks for reading and suggestions!
 

Link to comment
Share on other sites

  • 1 year later...

Hello Captains,

since there was no answer to this subject, i like to hijack this one ;-)

With a self-made gear-lever and a Bodnar interface i like to control the gear lever of the IXEG 733.

So far:

Dataref to manipulate :  /ixeg/733/gear/gear_handle_act

Values to be used :  "0" = UP   "1" = Down   "0.5" = Neutral

Bodnar Switch Numbers  "480" =GEAR UP      "481" =GEAR DOWN

The DIY Levers position is detected via 2 micro-switches (up/down) and if necessary !? by a third one for neutral.

I tried to get this working with a lua-script using either create_switch, create_positive_edge_flip or positive_edge_trigger.

The micro-switches will be "ON" when Lever-position is achieved (UP / DOWN) and stay "ON" until moved to "neutral" position.

Leaving the "UP" / "DOWN" position it should default to "0.5"

That was my idea of doing it ;-)

Problem: None of the above mentioned Lua commands worked for me (in combination, it works for a single switch, but not for both assigned)

If someone could help with me this

 

(As of now, i am only using a lua-script to assign buttons and levers PER aircraft, so no "do often" / "do ... etc

Link to comment
Share on other sites

if PLANE_ICAO == "B733" and EnableIXEGGear == true then

	
	dataref("GEAR", "ixeg/733/gear/gear_handle_act", "writable")
	dataref("GEARSTATUS", "sim/cockpit2/controls/gear_handle_down", "readonly")
	
	
 leverpos = 3
	
	function b733gear2functions()	
		if not button(HotasThrottle+21) and not button(HotasThrottle+22) and GEARSTATUS == 0 then
			leverpos=1
			GEAR = 0.5
		end
		
		if button(HotasThrottle+21) and GEARSTATUS == 1 then
			command_once("sim/flight_controls/landing_gear_up")
			GEAR = 0
			leverpos=0
		end
		
		if button(HotasThrottle+22) and GEARSTATUS == 1  then
			command_once("sim/flight_controls/landing_gear_down")
			GEAR = 1
			leverpos=2
		end
	end
	do_often ("b733gear2functions()")
end

 

  • Upvote 1
Link to comment
Share on other sites

  • 3 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...