Bonbod Posted May 19, 2016 Report Posted May 19, 2016 (edited) Hi, after assigning one of my second saitek throttle quadrant lever to the gear-function in the preferences/Joystick/Axis menue, the gear of the aircraft will go up and down by moving the saitek lever, but the lever inside the VC will not move. missposition between VC-Lever and gear wil lead to a 'warning'-sound until both positions match again by moving the handle in the vc manually. When the VC-lever is in OFF-Position using the Hardware lever will do nothing. It would be nice if you could check why the default assignment did not work. I tried to do a workaround with a flywithlua script, but writing to the dataref leads to stack overflows after a period of time during flight. --------------------------------------------------------------------------------------------------- saitek_axis_lever=10 dataref("Gear_Position", "ixeg/733/gear/gear_handle_act", "writable") dataref("gear_axis_value", "sim/joystick/joystick_axis_values", "readonly", saitek_axis_lever) Old_Gear_Axis_Value=gear_axis_value function check_737_Gear() if math.abs(Old_Gear_Axis_Value - gear_axis_value) > 0.005 then -- print("Neue Hebelposition") -- print(gear_axis_value) -- print(Gear_Position) Old_Gear_Axis_Value=gear_axis_value if gear_axis_value>0.44 and gear_axis_value<0.51 then Gear_Position=0.5 else Gear_Position=gear_axis_value end end end do_every_frame("check_737_Gear()") ------------------------------------------------------------------------------------------------------ Edited May 19, 2016 by Bonbod Quote
Bonbod Posted May 21, 2016 Author Report Posted May 21, 2016 (edited) With 1.04 gear lever still not working with X-Plane standard preferences.. videolink attached... gear_lever_issue https://onedrive.live.com/redir?resid=A11656F02AE4AD4C!7476&authkey=!AMk9hBnwrzBdZ4Q&ithint=video%2cmpg Greetings Dirk Edited May 21, 2016 by Bonbod Quote
mokny Posted May 21, 2016 Report Posted May 21, 2016 On 19.5.2016 at 8:57 AM, Bonbod said: I tried to do a workaround with a flywithlua script, but writing to the dataref leads to stack overflows after a period of time during flight. Change "do_every_frame" to "do_often" and the stack-overflows are gone. Quote
Bonbod Posted May 22, 2016 Author Report Posted May 22, 2016 Hi Cosmo, thx for the advice. Tried 'do often' before. No change of behavior. In my opinion.. working or not... i think there should be no need of an extra script. The gearlever in the virtual cockpit should work by itself, when configured in the preferences section of X-Plane. The script was only a try to build a workaround. I think the gear lever not working is a bug in the IXEG 737. greetings dirk. GizmoLog.txt Quote
mokny Posted May 23, 2016 Report Posted May 23, 2016 On 22.5.2016 at 4:13 PM, Bonbod said: Tried 'do often' before. No change of behavior. Hm strange, I got a script for my Warthog running and that did the trick. But what I also do, is to check if the value that I want to set, is already set, because that way the script doesn't fire dataref changes all the time to Gizmo. Maybe that helps you out. Quote
Bonbod Posted May 24, 2016 Author Report Posted May 24, 2016 10 hours ago, Cosmopilot said: Hm strange, I got a script for my Warthog running and that did the trick. But what I also do, is to check if the value that I want to set, is already set, because that way the script doesn't fire dataref changes all the time to Gizmo. Maybe that helps you out. Hi again Cosmo, thx for your interests in my issue :). I also want to minimize the dataref write commands. The following line of my script should realize a write only after a real move of the Hardware Lever.: -------------------- if math.abs(Old_Gear_Axis_Value - gear_axis_value) > 0.005 -------------------- Today in the evening i will try some debug-entries to Count the numbers of dataref-write commands and will Report the results. I am still thinking, that the gear lever should work by default like the thrust-, or the speedbreak Levers ;). greetings dirk Quote
Bonbod Posted May 24, 2016 Author Report Posted May 24, 2016 I made some debuging to count the movements of the gear lever. During flight there are up to 6 movements, which write to the 'gear_handle_act'. But even if i did not move the lever and no value was written into "ixeg/733/gear/gear_handle_act" (aircraft standing on the ground) the stack-overflows happend. I am also using the 'Flap Axis Detent'-Script from LRDN which works fine with do_every_frame (no stack-overflows). When adding the dataref definition for the 'gear_handle_act' into this working script the overflows appear. Have no idea.... Quote
Bonbod Posted May 26, 2016 Author Report Posted May 26, 2016 HI everyone... Update: I deleted every line of my script leaving only the following two: ------------------------------------------------------ local bod_gear_position dataref("bod_gear_position", "ixeg/733/gear/gear_handle_act", "writable") ------------------------------------------------------ With this two-line-script i get a Gizmo-crash and stack-overflow-errors during flight. I am also using a script for the flap-lever. This one uses a dataref definition for "ixeg/733/hydraulics/hyd_flap_lever_act" and is working without any problem. My testflight is from EDDL to EDDW. It would be nice if someone could try my gear_position script to check if he or she gets the same crashes like i do. Thx. Greetings... GizmoLog.txt bod_Gear_Position.lua Quote
jfjoubert Posted May 27, 2016 Report Posted May 27, 2016 Hi Bonbod, I tried your "full" script and ran it for almost 3 hours without any issues. I'll keep it active and let you know if do get any stack overflows... Quote
Slayer Posted May 28, 2016 Report Posted May 28, 2016 A bunch of the animations with the commands don't react properly in the VC when used (IE MCP buttons stick in ) but they are still functional. I reported a bunch of button problems too but it's going to be low on their priority list to fix because it doesn't really impact the functionality, it's just aesthetics. You will get stack overflows with FlywithLUA because the method that it writes datarefs isn't quite right for this aircraft. If you can convince the author of the plugin to use the same method to send datarefs that DRT uses you probably won't have stack overflow crashes anymore. Slowing commands down is a bandaid, eventually you get a crash if you use dataref enough times. With a gear lever it should be only a couple of times a flight but eventually you will still get a crash, Quote
Bonbod Posted May 28, 2016 Author Report Posted May 28, 2016 8 hours ago, jfjoubert said: Hi Bonbod, I tried your "full" script and ran it for almost 3 hours without any issues. I'll keep it active and let you know if do get any stack overflows... H jfjoubert, thx for your test. So it seems to be a personal problem with my environment. Knowing that the script can work generally let me change perspective and go to the issue by another angle :). greetings Quote
Bonbod Posted May 30, 2016 Author Report Posted May 30, 2016 I was not able to solve the Problem in my Environment using FlywithLua. I left that road and switched to the python-plugin xjoymap. After installing and configuring the plugin, the gear lever works fine now. Thx everyone for the help. Greetings Quote
Rodeo Posted June 5, 2016 Report Posted June 5, 2016 On 28 May 2016 at 4:01 AM, Slayer said: You will get stack overflows with FlywithLUA because the method that it writes datarefs isn't quite right for this aircraft. If you can convince the author of the plugin to use the same method to send datarefs that DRT uses you probably won't have stack overflow crashes anymore. Out of curiosity (I don't use FlyWithLua), could you elaborate on what it does differently from DRT? Quote
jfjoubert Posted June 5, 2016 Report Posted June 5, 2016 On 5/28/2016 at 8:33 AM, Bonbod said: H jfjoubert, thx for your test. So it seems to be a personal problem with my environment. Knowing that the script can work generally let me change perspective and go to the issue by another angle :). greetings Hi Bonbod, Which version of FlyWithLua are you using? I downloaded the latest v 2.2. Just a thought... Quote
Slayer Posted June 7, 2016 Report Posted June 7, 2016 On 6/5/2016 at 4:31 AM, Rodeo said: Out of curiosity (I don't use FlyWithLua), could you elaborate on what it does differently from DRT? I have very limited programming experience. Here is what Ben had to say on it: http://forums.x-pilot.com/forums/topic/9357-gizmo-x-plane-crash-when-sending-datarefs/?page=2#comment-103628 bottom line is you can use DRE or DRT to change datarefs and they way they access the datarefs works with the IXEG. DRE is open source so possibly have a look at his source code to see why his method works and the FlywithLUA plugin crashes? Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.