vonmarty Posted December 25, 2014 Report Share Posted December 25, 2014 I am new to JS32. Very nice aircraft. I need help binding a yoke button to turn ON the autopilot (blue switch/button on the panel). I tried servos ON and servos Toggle but thse just blinks the Autopilot blue switch/button .... autopilot will not stay ON. Quote Link to comment Share on other sites More sharing options...
Japo32 Posted December 26, 2014 Report Share Posted December 26, 2014 I am right now out of the office.. but if I don't remember bad I made a custom dataref for this one because need some logic to behave like the real one. I think there is a plugin to assign any keyboard or joystick button to any custom dataref... but right now I don't remember which one it is. Maybe others can help you with that. Quote Link to comment Share on other sites More sharing options...
vonmarty Posted December 26, 2014 Author Report Share Posted December 26, 2014 (edited) Thanks for the reply. Ok, I wait here for other help. Edit:Your location ... Madrid - SpainYes, I know from the manual introduction (good reading it) I will file over your house on my first CRJ200 tutor flight ... after I finish reading data into my head.But today I finish setting up your JS32 on PC .. all is OK. Edited December 26, 2014 by vonmarty Quote Link to comment Share on other sites More sharing options...
vonmarty Posted December 26, 2014 Author Report Share Posted December 26, 2014 (edited) Sorry for double post .. i must have it save button two times. Edited December 26, 2014 by vonmarty Quote Link to comment Share on other sites More sharing options...
cessna729 Posted December 26, 2014 Report Share Posted December 26, 2014 (edited) I need help binding a yoke button to turn ON the autopilot (blue switch/button on the panel).I tried servos ON and servos Toggle but thse just blinks the Autopilot blue switch/button .... autopilot will not stay ON.Try this one: (Note:1=ON, 0=OFF).J32/AutopilotServosON Remember it's one of javier's custom datarefs, so you might not see it in DataRefEditor unless you define it in DataRefs.txt like I did on my Windows 7 installation, and remember to backup the original DataRefs.txt file in X-Plane 10\Resources\plugins cos you will crash XP if you get the formatting wrong!.Javier posted a full list of JS32 datarefs here:cessna729. Edited December 26, 2014 by cessna729 Quote Link to comment Share on other sites More sharing options...
vonmarty Posted December 26, 2014 Author Report Share Posted December 26, 2014 Thank you. I will do it today and test for no crash. Quote Link to comment Share on other sites More sharing options...
vonmarty Posted December 26, 2014 Author Report Share Posted December 26, 2014 (edited) I downloaded the DRE.I have it in my top XP10 menu.I can view the contents of the DataRefs.txtI know now I cannot edit with it! "Remember it's one of javier's custom datarefs, so you might not see it in DataRefEditor unless you define it in DataRefs.txt like I did on my Windows 7 installation,"I need to know how to do it ( I have win 7 also). So, now I know I have to manually edit the DataRefs.txt file .. correct?I need to know exactly what DATA I have to put into the the file and does Upper and lower case matter?And can I put it anywhere in the file? If so, I need to know what this means:Try this one: (Note:1=ON, 0=OFF).J32/AutopilotServosON Do I add e.g. :J32/AutopilotServos1 to the top of the DataRefs.txt file? or e.g.:J32/AutopilotServos=1 or : J32/AutopilotServosON After looking around I wonder if it is the Commands file that should get the new data? edit:What I see in Dataref file is very program'ish e.g.:sim/cockpit/autopilot/autopilot_mode int y enum The autopilot master mode (off=0, flight director=1, on=2)sim/cockpit/autopilot/airspeed_mode int n enum Airspeed mode for the autopilot. DEPRECATEDsim/cockpit/autopilot/heading_mode int n enum Lateral navigation mode (GPS, heading, L-Nav approach). DEPRECATEDsim/cockpit/autopilot/altitude_mode int n enum Vertical navigation (alt hold, VVI hold, V-Nav approach). DEPRECATEDsim/cockpit/autopilot/backcourse_on int y boolean Back course selectionsim/cockpit/autopilot/altitude float y ftmsl Altitude dialed into the AP Edited December 26, 2014 by vonmarty Quote Link to comment Share on other sites More sharing options...
cessna729 Posted December 27, 2014 Report Share Posted December 27, 2014 (edited) No, sorry I'd assumed as you said "I need help binding a yoke button to turn ON the autopilot (blue switch/button on the panel)." that you were building a cockpit & just had trouble figuring out what the dataref was called, I didn't realise you didn't know what DRE was.You need something like Ben's Gizmo , SASL or FlyWithLua ect. to "be able to do something" with the dataref, DRE will just allow you to view and change a dataref by typing a new value into a list, it just shows you what happens when the value changes. To enable DRE to display the custom dataref J32/AutopilotServosON(note: normal XP Joystick & Equipment, Buttons & Keys option won't display undeclared Custom DataRefs)Just backup the original DataRefs.txt file in X-Plane 10\Resources\plugins and then add this one line at the end of DataRefs.txt.J32/AutopilotServosON int n ??? ServosOnStart X-Plane, go to plugins and start DRE, go Show Datarefs get it to display all datarefs starting with "J32" by entering J32 in the window at the bottonleft corner of the list.Then by editing the value, you can show what happens. cessna729. Edited December 27, 2014 by cessna729 Quote Link to comment Share on other sites More sharing options...
vonmarty Posted December 27, 2014 Author Report Share Posted December 27, 2014 Ok,Thanks.I will go test it. Quote Link to comment Share on other sites More sharing options...
vonmarty Posted December 27, 2014 Author Report Share Posted December 27, 2014 (edited) I copied and pasted ********* using a text editor .... is that OK?? :J32/AutopilotServosON int n ??? ServosOn It does not show up in the DRE when I search .... I can search for other items ok.. Is this line supposed to be formatted in a special way .. number of spaces between columns? Is this ??? ServosOn :ServosOn a zero 0n or a letter On I do not know what is wrong. I have my Yoke button already assigned to the servo ON.it does not turn ON the autopilot .( blue light) just the servos (two green). Am I supposed to assign to a different one? I also tried servo toggle (that is what I really want) ... it does not turn ON the autopilot .( blue light) just the servos (two green). Does not lite the Autopilot light just the 2 green . Edited December 27, 2014 by vonmarty Quote Link to comment Share on other sites More sharing options...
vonmarty Posted December 27, 2014 Author Report Share Posted December 27, 2014 (edited) "You need something like Ben's Gizmo , SASL or FlyWithLua ect. to "be able to do something" with the dataref" Is this needed to just add a line to the dataref text file? Or is this for programmers? Edited December 27, 2014 by vonmarty Quote Link to comment Share on other sites More sharing options...
vonmarty Posted December 27, 2014 Author Report Share Posted December 27, 2014 In you screenshots: First 2 green off and one blue off (my lights during taxi) Then 2 green ON and one blue off (during climb My yoke button pressed). Then 2 green ON and one blue ON (what did you do to get this)? I cannot get this Autopilot ON? Quote Link to comment Share on other sites More sharing options...
cessna729 Posted December 27, 2014 Report Share Posted December 27, 2014 (edited) I copied and pasted ********* using a text editor .... is that OK?? :J32/AutopilotServosON int n ??? ServosOnSorry, I was trying to help, but you appear to be getting more confused. So, I'll try one last time.DRE will only allow you to see and edit datarefs, (to enable DRE to display a Custom Dararef you need a good quality text editor, on my Windows 7 machine I use Notepad++ and add that line to dataref.txt file. There is a Tab Character between each of the fieldsJ32/AutopilotServosON int n ??? ServosOnThe only numerals in that line is the "32", all the rest are letters. It dos'nt allow X-Plane Joystick & Equipment, Buttons & Keys option to suddenly start using Custom DataRefs! (I never said that, but I'm sorry if I gave that impression). J32/AutopilotServosON is a Custom DataRef, and You need something like Ben's Gizmo , SASL or FlyWithLua or some other tool ect. to "be able to do something" with the dataref".Checkout the links I've included, follow them and they will explain how to bind custom datarefs to your joystick or keyboard.For example in the FlyWithLua_Manual_en.pdf see section 11, Manage your joysticks.cessna729. Edited December 27, 2014 by cessna729 Quote Link to comment Share on other sites More sharing options...
vonmarty Posted December 27, 2014 Author Report Share Posted December 27, 2014 Ok, I will check it out. Thanks. Quote Link to comment Share on other sites More sharing options...
vonmarty Posted December 27, 2014 Author Report Share Posted December 27, 2014 (edited) Well, I took a quick look and discovered I am not a programmer. It takes all this to assign one yoke button to turn on the AutoPilot in JRollon Jetstream32? Question: For a programmer .. who knows the steps ... load this .. do this etc. Are there many steps to accomplish this? Edited December 27, 2014 by vonmarty Quote Link to comment Share on other sites More sharing options...
Rusny Posted January 18, 2015 Report Share Posted January 18, 2015 I had the same problem and I followed your tutorial here, All is good now. Asus crosshair v formular z, GTX 760 4gb, AMD fx8350, 32Gb corsair vengeance DDR3 1600Mhz. Quote Link to comment Share on other sites More sharing options...
vonmarty Posted January 18, 2015 Author Report Share Posted January 18, 2015 I had the same problem and I followed your tutorial here, All is good now. Glad to hear you got it working. Which Tutor did you use that gives the steps to do it? Quote Link to comment Share on other sites More sharing options...
andyw248 Posted February 1, 2015 Report Share Posted February 1, 2015 Great thread, almost like a dataref tutorial... thanks Cessna729 for explaining all this! Quote Link to comment Share on other sites More sharing options...
MH1212 Posted March 2, 2015 Report Share Posted March 2, 2015 (edited) 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 endend 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! Edited March 3, 2015 by MH1212 Quote Link to comment Share on other sites More sharing options...
vonmarty Posted March 2, 2015 Author Report Share Posted March 2, 2015 "My solution uses FlyWithLua (see the x-plane forums on how to install this)." Ok, I am going to read up on Flywithlua and see if I can get the autopliot (on/off) assigned to a button on my yoke using your programming. Quote Link to comment Share on other sites More sharing options...
MH1212 Posted March 3, 2015 Report Share Posted March 3, 2015 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 :-) ) Quote Link to comment Share on other sites More sharing options...
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.