June 26, 20187 yr Hello everyone, I'm using FSX SP2, also using standard aircraft not PMDG. C/O button is not changing air speed display value into decimal point when i assign AP_MACH_HOLD to a joystick's button. i don't know why?, otherwise it's working without joystick when I armed A/T First then enable Speed Hold and finally press C/O button. Please help me how do i resolve the problem?
June 26, 20187 yr As asked over at the FSUIPC forum -What stock aircraft are you actually referring to? The 737, 747 & A321 all have different code for the C/O buttons.. It is not a built in command with FSX. Examples -B737-8 <Script> (M:Event) 'LeftSingle' scmp 0 == if{ 1 (>L:IAS Mach Pressed,bool) (G:Var6) 1 + 2 % (>G:Var6,number) } (G:Var6,number) 0 == (A:autopilot mach hold, bool) 1 == and if{ (>K:AP_PANEL_SPEED_HOLD) } els{ (G:Var6,number) 1 == (A:autopilot airspeed hold, bool) 1 == and if{ (>K:AP_MACH_HOLD) } } (M:Event) 'LeftRelease' scmp 0 == if{ 0 (>L:IAS Mach Pressed,bool) } </Script> A321 <Script> (M:Event) 'LeftSingle' scmp 0 == if{ 1 (>L:IAS Mach Pressed,bool) (G:Var6) 1 + 2 % (>G:Var6,number) } (M:Event) 'LeftRelease' scmp 0 == if{ 0 (>L:IAS Mach Pressed,bool) } </Script> 747-4 <!-- The 747 Doesn't have a C/O switch, it is automatically done when the individual speed hold type is engaged --> <!-- SPEED HOLD --> <Click>0 (>L:Mach-IAS select, bool) 0 (>K:AP_PANEL_SPEED_HOLD)</Click> <!-- MACH HOLD --> <Click>1 (>L:Mach-IAS select, bool) 0 (>K:AP_PANEL_MACH_HOLD)</Click> Irregardless of which aircraft you use, a lua file along with FSUIPC will have to be used for joystick integration. Not only that but the people over at MS used G:Vars for implementation in some aircraft for the autopilot -- BAD!, BAD!, MS!!So... The autopilot will have to be modified to change G:Vars over to L:Vars so lua can be used. Not a daunting task, just has to be done properly. FS RTWR SHRS F-111 JoinFS Little Navmap
June 26, 20187 yr Author Thanks spokes2112 for your response. 1 hour ago, spokes2112 said: What stock aircraft are you actually referring to? I'm using 737-800. where I have to use above scripts? please guide me.
June 26, 20187 yr Multiple items need to be done.. The above scripts are just examples showing the custom code used by Microsoft for the AP buttons. None of them can be used for what needs to be done. This is what needs to be done.. 1) The autopilot.xml located in FSX\SimObjects\Airplanes\B737_800\panel\B737_800.cab will have to be modified to reassign some G:Vars to L:Vars. 2) A .lua file will have to be made to incorporate buttons to FSUIPC 3) The joystick buttons needed assigned to the lua within FSUIPC If wanted I can do the work for you, it may take a day or 2.. please advise. FS RTWR SHRS F-111 JoinFS Little Navmap
June 26, 20187 yr Author Thank you very much spokes2112 for response. 1 hour ago, spokes2112 said: I can do the work for you, it may take a day or 2 I'll be glad if you do the work for me. thanks again.
June 30, 20187 yr The code is done and fully tested.. Made 3 completely different versions, each one had their own little quirks, the last one fixing it all. The hard part - writing the install instructions Should be done by the end of the day or earlier ( US ), on it now with the morning coffee. Stay tuned. FS RTWR SHRS F-111 JoinFS Little Navmap
June 30, 20187 yr Author Thank you spokes2112 12 minutes ago, spokes2112 said: The code is done and fully tested..Made 3 different versions, each one had their own little quirks, the last one fixing it all. Wow! gud :) 15 minutes ago, spokes2112 said: The hard part - writing the install instructions May God make it easy for you. I'm waiting...May God bless you. Thanks again.
June 30, 20187 yr Here you go --> https://www.dropbox.com/s/2p2wzon93x37p4c/MS B738 AT Interface to FSUIPC.zip?dl=1 I plan on putting this and other interfaces up at FSUIPC\User Contributions sub forum once a few more are finished. Request feedback and/or problems please. FS RTWR SHRS F-111 JoinFS Little Navmap
July 1, 20187 yr Author Wow! it's working man :). Under of Thanks spokes2112 for uploading and I appreciate your work. all buttons and knobs are working great. again thanks alot.
July 24, 20187 yr Author Hello spokes2112, the interface is crashing fsx when i fly other air craft except 737...when unload 737SpdControl.lua then fsx does not crach. also help me how do i on/off C/O button using C# without touching fsuipc?
July 24, 20187 yr Ahh.. Possibly a small bug in the check routine. Just turn the routine off and it should work for you. Around line 7 change local a = 1 to local a = 0 There will be no more confirmation of operation display after this, just check operation by toggling the C/O button or other lua command. If that doesn't work just set it up as an [Auto.<profile name>] to start only with the stock 737. Sorry, cant help with the C# portion - out of my league. Just FYI, all C/O buttons are custom for different aircraft. There is no built in command for the operation. FS RTWR SHRS F-111 JoinFS Little Navmap
July 25, 20187 yr Author Thank you very much spokes2112...now it's working fine. not crashing...I converted your coButton lua code into C#...it's working also. :) private void coButton() { if (FSUIPCConnection.ReadLVar("CO_state") == 0) FSUIPCConnection.WriteLVar("CO_state", 1); else FSUIPCConnection.WriteLVar("CO_state", 0); }
Archived
This topic is now archived and is closed to further replies.