MaxMotoring Posted August 15, 2017 Report Posted August 15, 2017 Hi, I am having trouble in returning to 0 the value of "ixeg/733/MCP/mcp_at_disengage_act". Using the software button on the side of the throttles it works as it should: when pressed, the value goues to 1 thus disconnecting the AT (releasing returns to 0), the second time puts the A/T annunciator off. create_switch( 9, "ixeg/733/MCP/mcp_at_disengage_act", 0, 0, 1) Using a LUA script, the command above conflicts with somethnig, because it is constantly rattling as if it is forcing the switch to "0" Then using this one the trick is done, but the value remains in 1, never returning to 0. Hitting the soft button again it cycles and returns to 0. create_positive_edge_trigger( 9, "ixeg/733/MCP/mcp_at_disengage_act", 0, 1 ) Any ideas? Regards, Max Quote
jfjoubert Posted August 15, 2017 Report Posted August 15, 2017 May I ask what you're trying to achieve with your LUA script? Quote
MaxMotoring Posted August 15, 2017 Author Report Posted August 15, 2017 Sure, disconnect the Autothrottles. Quote
jfjoubert Posted August 15, 2017 Report Posted August 15, 2017 Why not just use the Disengage AT command already supplied by IXEG to map to your buttons? You will find it under ixeg - 733 - autopilot in the X-plane Joystick mapping screen. No need for a LUA script. Quote
MaxMotoring Posted August 15, 2017 Author Report Posted August 15, 2017 Because I am just a masochist! I use to ¨fly¨ a few different jet planes and assigning that button to the IXEG does not work with the others. So I make a LUA script to solve that. Quote
jfjoubert Posted August 15, 2017 Report Posted August 15, 2017 Ok, but you'll still need to map a button to a command irrespective of whether the command is already available or coded via LUA. So in effect what you need is to be able to map the button to different commands depending on the plane you're flying... if I understand it correctly. Not sure this is possible, but maybe someone has a solution. Quote
MaxMotoring Posted August 15, 2017 Author Report Posted August 15, 2017 The lua script allows you to configure each joystick button to do the same function on each plane using the dataref each plane has for that function. For example, the fuel start/cutoff levers on IXEG are switched with "create_switch( 3, "ixeg/733/fuel/fuel_start_lever1_act", 0, 0, 1 )" while on the FF763 is "create_switch( 3, "1-sim/fuel/fuelCutOffLeft", 0, 0, 2 )" This enables you to load each plane and have the joystick configured for that plane without having to touch anything on XP11. Quote
jfjoubert Posted August 15, 2017 Report Posted August 15, 2017 Makes sense, I never really looked into the create_switch commands. I will see if I can get the AT disengage to work like this... Quote
jfjoubert Posted August 15, 2017 Report Posted August 15, 2017 Yes, it's weird. I also get the "rattling" with both the AT and AP disconnect manipulators. If I use the "ixeg/733/MCP/mcp_toga_act" for example then it's working fine. I'll play around and see if I can find anything... Quote
jfjoubert Posted August 15, 2017 Report Posted August 15, 2017 I tried with the create_positive_edge_trigger( 21, "ixeg/733/MCP/mcp_at_disengage_act", 0, 1 ) and it's working as expected. Is there any particular reason that you need the value to reset back to 0? I did find a way around it though... but it might just be a hack. Simply create both a positive_edge_flip and negative_edge_flip on the same button. This will work exactly like pressing the virtual AT disconnect button on the throttle. create_positive_edge_flip( 21, "ixeg/733/MCP/mcp_at_disengage_act", 0, 1, 0 ) create_negative_edge_flip( 21, "ixeg/733/MCP/mcp_at_disengage_act", 0, 1, 0 ) Quote
MaxMotoring Posted August 15, 2017 Author Report Posted August 15, 2017 Your hack seems to work Ok! The question is why the soft button works ok but the script needs 2 commands to return the value to 0. Quote
jfjoubert Posted August 16, 2017 Report Posted August 16, 2017 7 hours ago, MaxMotoring said: Your hack seems to work Ok! The question is why the soft button works ok but the script needs 2 commands to return the value to 0. Your guess is as good as mine... 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.