Jump to content

MH1212

Members
  • Posts

    5
  • Joined

  • Last visited

MH1212's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Normally this should not be necessary, so yes it is a workaround (it should be possible to use separate axis if you have a left and right throttle -> you just have to find the right dataref to bind to). So it is temporary, although I also use this technique to dampen the response curve of the left and right toe brake (something XP offers for other axis but not for the brakes). I use a lua file to manage the axis and button setting for all planes (so no separate lua file for this), but the essential lines are these: local axisValues = dataref_table("sim/joystick/joystick_axis_values")local cl_axis = 34local cl_val = 0local throt_axis = 36local throt_val = 0 function Saab_axis()-- Condition Levercl_val=axisValues[cl_axis]set("LES/saab/CL/manip_common",cl_val)-- Throttle: axis is reversedthrot_val=1-axisValues[throt_axis]set("sim/cockpit2/engine/actuators/throttle_ratio_all",throt_val)end set_axis_assignment( 34, "none", "normal" )set_axis_assignment( 36, "none", "normal" )do_every_frame("Saab_axis()") Quite simple... As you can see I use axis 34 and 36 (=throttle) of my joystick -> you can find the axis assignments in the file "initial_assignments.txt" in the FlyWithLua folder. NB: the fact that this works also suggests that there is nothing wrong with the code of the plugin (the datarefs work OK), but that is is something in the communication between X-Plane and the plugin... Good luck! Cheers, Matthijs
  2. I do have the same problem as described with my X52 Pro (Windows 10, XP10.42). I "solved" my problem with a FlyWithLua script: I read the value from the throttle axis and pass it through to "sim/cockpit2/engine/actuators/throttle_ratio_all". It works without any jitters or other problems. Off topic, but I use the same technique for the Condition levers with: "LES/saab/CL/manip_common", for which I use another axis... Maybe it helps others until a solution is found. The challenge to fly this wonderful airplane is big enough without having to fight my joystick :-)
  3. I noticed that autostart only works if the throttle and condition lever are in exactly the right position (while trying to start the left engine). Maybe this helps.... Good luck!
  4. Installing FlyWithLua is very simple, see: http://forums.x-plane.org/index.php?app=downloads&showfile=17468 and http://forums.x-plane.org/index.php?showtopic=71006 NB: I edited the script -> I moved the dataref line to prevent an error when loading another plane before the Jetstream (for me FlyWithLua is new as well :-) )
  5. I had some small issues to get it working the way I wanted. My solution uses FlyWithLua (see the x-plane forums on how to install this). I added the reference to the J32 autopilot in DataRefs.txt as explained above by cessna729 just as an extra possibility to see if things are working as expected (but the script works without this reference as well). EDIT: the dataref is only visible if you directly load the Jetstream at startup (otherwise the dataref is unknown and ignored -> therefore when it all worked I removed the reference...) Create a lua script (with Notepad or Notepad++) with the following code (EDIT: I edited the script to make it simpler and moved the dataref line!): ----- function toggle_AP() if button(484) then J32_APengage = 1 - J32_APengage end end if PLANE_ICAO == "JS32" then dataref( "J32_APengage" , "J32/AutopilotServosON" , "writable" ) do_often("toggle_AP()") end ----- I used button 484, but change that to the button you want. NB: X-plane will report this button with a value of 1 higher. So my 484 button shows in X-plane (Buttons:Adv) as 485... Be sure that no other command is assigned to this button: the script does not clear any assignments. Give the script a name (for instance APJ32.lua) and put it in the scripts folder (within the FlyWithLua folder). When you load the Jetstream it should work. You have to hold the button a bit longer -> until the autopilot light goes on or off. Because I used 'do_often' instead of 'do_every_frame', a short 'click' is often not enough. For me it works fine this way... If I use do_every_frame on my PC it reacts way too nervous and sometimes switches on and off with the same click...but perhaps it works fine on other PC's... I hope it helps!
×
×
  • Create New...