Caravan Autopilot - won't disarm?
-
Thanks for the update. Was this recently? I just received the first batch of emails from tech support in several weeks since the holidays. They take time off over the holidays, but I don't allow myself such luxuries, haha. You may have been the one occurrence of this issue that I mentioned above, in which case I did respond to those emails. If something got lost in the chain of communication, I apologize. I would rather work on getting you a functioning autopilot, rather than dwelling on that, though.
While the Caravan has the ability to use the default Asobo GNS 530, I have been removing that ability from my current and future aircraft, to prevent more bugs, like the second one you are describing. It does reinforce my understanding of what's causing your original error, though. Like I said, if you're interested in trying again, let me know. If you give me the name you used to contact JF support, I can have them reach out to you directly, or we could just troubleshoot together right here.
-
@Black-Square said in Caravan Autopilot - won't disarm?:
Thanks for the update. Was this recently? I just received the first batch of emails from tech support in several weeks since the holidays. They take time off over the holidays, but I don't allow myself such luxuries, haha. You may have been the one occurrence of this issue that I mentioned above, in which case I did respond to those emails. If something got lost in the chain of communication, I apologize. I would rather work on getting you a functioning autopilot, rather than dwelling on that, though.
While the Caravan has the ability to use the default Asobo GNS 530, I have been removing that ability from my current and future aircraft, to prevent more bugs, like the second one you are describing. It does reinforce my understanding of what's causing your original error, though. Like I said, if you're interested in trying again, let me know. If you give me the name you used to contact JF support, I can have them reach out to you directly, or we could just troubleshoot together right here.
As I mentioned, I did get a refund for the plane, however I enjoyed it very much, and in light of having recently redone my entire OS and sim, reached out to JF about the possibility of a trial version to see if the issue was still present. They don't have one available, but your recently increased forum presence and the offer to troubleshoot directly is very tempting and I will very likely take you up on the offer.
The ticket number I was working on with them was #75606, if they provide you with such a thing. My ticket had two issues, the AP we have been discussing here, and the comm panel compatibility with vpilot/VATSIM. You did answer part of the ticket re: the comm panel; my issue was that I could only listen to com 1 and 2 at the same time by also selecting com 3. You gave them some prototype code to give me to hopefully fix it. I'm hoping they flowed the result back to you, as the answer you gave them (copied verbatim to me I believe) included a rightful gripe that no user had gotten back to you about whether or not it worked.
In case they never did, your fix didn't really work. It involved setting K:COM_RECEIVE_ALL_SET if that jogs your memory or makes it easier to dig up in an email, but all the code did was select com 3 automatically if I tried to listen to 1 and 2 at the same time.
I think it works correctly in the TBM, but I'd have to check again, not to get too far away from the main topic.
My ticket with JF was opened in early October and closed mid November, I certainly hope they weren't sitting on the emails for that long. It may very well have been me, but the other user in my linked reddit topic also suggested he opened a ticket with the same issue.
-
Hi @Black-Square - I did apply your WT 530/430 fix, thanks kindly for that. However, it doesn't seem to have helped with this issue, I'm afraid.
-
@Black-Square I have repurchased the Caravan and I'm having the same issue. Ready to try whatever troubleshooting steps you need in order to diagnose this.
I have the WT pointer mod, v1.14 I believe, installed and the Caravan is using the WT avionics. I have your fix in the 530 and 430 .js files; so far all seems well so I'm guessing I didn't bungle that.
The Caravan is configured with a 530 and 430 unit in the cockpit. I don't have any third party GNS units or mods installed.
Symptoms are the same; the AP randomly comes on and takes over. Disengaging the AP in cruise with Nav and Alt, for example, will reactivate it with Roll and Pitch mode. It takes several activations and deactivations to keep it off.
From my untrained eye it seems like Alt mode is armed "under the hood" and will turn the AP on, only when ALT is seen on the annunciator by itself will it finally stay off.
Edit: would like to add I have tried both the Autopilot Off and Autopilot Disconnect MSFS bindings (set, not toggle) and clicking the in-cockpit button, all with the same results.
-
I'm glad you were willing to give it a second try. I'll do my best to help you however I can.
"WT pointer mod"? I've never heard of this, nor should it be necessary for any of my aircraft.
I know you've probably received this advice from tech support already, but when things aren't working, we need to rule out as many things as possible first:
- Remove all items from your community folder except the Caravan.
- Update your PMS50 GTN and TDS GTNxi, if you have them installed.
- Download the WT GNS 530 from the in-game marketplace.
- Double check the 530 and 430 .js modifications after the above.
- Give that a try, and let me know how it goes.
- If it doesn't work at first, try cycling the radio configuration to the no GPS option, wait a few seconds, and then try the GNS 530 again.
Thanks for taking the time to work on this. Hopefully we can learn something while finding you a solution that can help other users down the line too.
-
@Black-Square said in Caravan Autopilot - won't disarm?:
- Download the WT GNS 530 from the in-game marketplace.
This is the "pointer" I refer to, as I understand it redirects aircraft that don't have the WT avionics natively integrated to them, instead of calling the old Asobo one. Without that installed, your aircraft don't use the WT avionics.
I have tried just about all of those as mentioned in my recent post. I will try with cycling between the radios and the GNS units and try cleaning out my community folder.
It's just aircraft and liveries (I am experiencing this with the stock green livery, have not tried a third party one), so I would be amazed if that fixed it, but stranger things have happened.
-
OK, I have cleared my Community folder of everything except the Caravan, the Real Sim Gear MSFS module, and the FSUIPC lvar module. All other planes, liveries, scenery, nav data, all moved out and the sim loaded with just those three. Did not fix the problem.
I then switched both the 530 and the 430 to the radio stacks while still in the air. The AP panel also flickered like it was changing, and it lost my set altitude. I did not have it engaged at the time. I played with the AP and the radios for a minute or three, the AP with just the radios did not have the issue.
Of note: the AP with the radio stack did not revert to Roll and Pitch mode when disengaged, it turned off and stayed off entirely.
Went back to the GNS units, issue came back.
-
Thank you for helping rule some things out and give me an idea of where to look. After many hours of testing, I was able to reproduce your issue, and I think I have a solution. For me, I was able to disable the autopilot for good by just pressing the disconnect button a second time, though.
Something very tiny changed in the behavior of the WT GNS's autopilot manager recently. I think I know what, and I am lucky that it is not affecting my other aircraft. I have a one-line patch for you that should hopefully eliminate the symptoms of this change.
In ...\Community\bksq-aircraft-analogcaravan\html_ui\Pages\VCockpit\Instruments\Generic\Radios\bksq-aircraft-analogcaravan\KAP140\KAP140.js...
Please add the following line after the line containing "AP_FLIGHT_LEVEL_CHANGE_OFF". You can search for it, or it should be line 313.
setTimeout(() => {if(SimVar.GetSimVarValue("AUTOPILOT MASTER", "Bool")){SimVar.SetSimVarValue("K:AP_MASTER", "number", 0);}}, 500);
If that works for you to disconnect the autopilot, I have a couple other fixes I can apply to correct the behavior of the display while working with the GNS 530, which I can then distribute in a new file.
Good luck, and let me know how it goes!
-
//Start Normal Operation if(this.autoPilotDisconnectTimer == 0 && !SimVar.GetSimVarValue("AUTOPILOT MASTER", "Bool")){ this.autoPilotDisconnectTimer = 5000; SimVar.SetSimVarValue("K:AP_HDG_HOLD_OFF", "number", 0); SimVar.SetSimVarValue("K:AP_NAV1_HOLD_OFF", "number", 0); SimVar.SetSimVarValue("K:AP_APR_HOLD_OFF", "number", 0); SimVar.SetSimVarValue("K:AP_ALT_HOLD_OFF", "number", 0); SimVar.SetSimVarValue("K:AP_LOC_HOLD_OFF", "number", 0); SimVar.SetSimVarValue("K:AP_BC_HOLD_OFF", "number", 0); SimVar.SetSimVarValue("K:AP_FLIGHT_LEVEL_CHANGE_OFF", "number", 0); setTimeout(() => {if(SimVar.GetSimVarValue("AUTOPILOT MASTER", "Bool")){SimVar.SetSimVarValue("K:AP_MASTER", "number", 0);}}, 500); }
If this is the correct place for it, then no, that fix did not mitigate the problem. Is this something that the sim compiles? Do I need to clear all the Caravan files out of my AppData folder to force the sim to recompile it?
-
Yes, that's the right spot... So long as you restarted the simulator after making those changes, they should take effect. I'm pretty surprised that didn't fix it. Reading your description of the problem again after my troubleshooting yesterday, does the autopilot really reengage when arriving at altitude, and not just when you're disconnecting it? All I could reproduce in my testing was it reengaging roil mode immediately after being disengaged. When you have the chance, please try one more time with a clean community folder and also removing the Real Sim Gear module, and the FSUIPC lvar module. I just want to make sure that there isn't anything else at play here. I'll do some more testing on my end too. I'll revert WT's last changes to the GNS 530 in an attempt to pinpoint what changed, and see if that leads to any hints. Thanks again for working on this with me. It's unreasonably frustrating to me when my users cannot enjoy my products as intended, whatever the reason.
-
Yes, it engages by itself at the armed altitude. In my test with that new line of code, for instance, I set 4000ft and the AP came on and took over as I climbed after takeoff and reached 4000ft.
I made the changes to the file without the sim running, so hopefully it should have taken effect. I'll try with a completely clean folder.
-
Alright, I tried with a completely empty folder and then realized I had also taken out the Caravan 😂
After putting the Caravan, and only the Caravan into the folder (no FSUIPC, no RSG, nothing else), it still does it.
The best way I have to recreate is to be cruising at altitude with the AP engaged in some LNAV mode and in ALT hold. Disengage the autopilot and then hand fly for a little bit. As you gain/lose altitude a little bit and go slightly above/below your set ALT, the AP will eventually capture it again and turn back on. It also happens if I hand fly up to my set cruise altitude, but hand flying you can repeat it every time you disengage the AP until finally ALT stays lit in the annunciator panel, then it will stay off.
I do believe you have fixed the "issue" of reverting to roll and pitch mode when disconnecting the AP, though. I will have to test more next round, as this was a quick test with a blank Community folder and no peripherals setup; just spawn on the runway up and running and then pray I can takeoff with the trim wheel.
Most of my testing has been from cold and dark with my full setup, for what it's worth.
Is this something you could put some extra debugging or logging stuff into a test build and send me?
-
Thank you for providing all this information. I'm going to be looking into this again tonight, and that was exactly the kind of steps I was looking for to reproduce the problem. Hopefully I can make it happen. Unfortunately, the autopilot system is pretty invisible to outside interrogation, so I have to work off hunches and stepping through program execution with the debugger. I have a couple other tricks up my sleeve too. Thank you for the update. I'll do my best later tonight, and let you know how it goes!
-
I think I have a solution for you! You're never going to believe it. I think this is the culprit, because it's definitely not in my KAP140 code, and it's the one thing in the Caravan's autopilot configuration that differs from my other aircraft.
Try changing "flight_director_available" from 0 to 1 in ...\bksq-aircraft-analogcaravan\SimObjects\Airplanes\bksq-aircraft-analogcaravan\systems.cfg
I don't know why this behavior would have changed in the last update, but it also seems to have solved the immediate reactivation of the autopilot after being disconnected, so you likely don't need the first code fix for KAP140.js anymore.
I really hope that solves the problem for you! This has been a tricky one.
Unfortunately, the autopilot will still display the inactive modes when deactivated while using the GNS 530, but that's a solved problem on my end, and has no effect on autopilot functionality. I'll include it in the next update, but if you want to fix it now, you can add the following line directly after these four lines in KAP140.js.
if(!SimVar.GetSimVarValue("AUTOPILOT MASTER", "Bool") && (SimVar.GetSimVarValue("AUTOPILOT WING LEVELER", "Bool") || SimVar.GetSimVarValue("AUTOPILOT BANK HOLD", "Bool")) && !SimVar.GetSimVarValue("L:XMLVAR_GPS_DISABLED_AS530_1", "bool")){ return ""; }
getLateralModeActive(){ getLateralModeArmed(){ getVerticalModeActive(){ getVerticalModeArmed(){
-
@Black-Square Seems like this did the trick! No more abnormalities noticed with the AP at all this last flight. Thanks for putting this together!
-
One down, one to go! Thank you for taking the time to test this. Sorry it took a while to find a solution. It would have taken me much longer to find the problem without your excellent descriptions of the problem.
-
@Black-Square said in Caravan Autopilot - won't disarm?:
I think I have a solution for you! You're never going to believe it. I think this is the culprit, because it's definitely not in my KAP140 code, and it's the one thing in the Caravan's autopilot configuration that differs from my other aircraft.
Try changing "flight_director_available" from 0 to 1 in ...\bksq-aircraft-analogcaravan\SimObjects\Airplanes\bksq-aircraft-analogcaravan\systems.cfg
I don't know why this behavior would have changed in the last update, but it also seems to have solved the immediate reactivation of the autopilot after being disconnected, so you likely don't need the first code fix for KAP140.js anymore.
I really hope that solves the problem for you! This has been a tricky one.
Unfortunately, the autopilot will still display the inactive modes when deactivated while using the GNS 530, but that's a solved problem on my end, and has no effect on autopilot functionality. I'll include it in the next update, but if you want to fix it now, you can add the following line directly after these four lines in KAP140.js.
if(!SimVar.GetSimVarValue("AUTOPILOT MASTER", "Bool") && (SimVar.GetSimVarValue("AUTOPILOT WING LEVELER", "Bool") || SimVar.GetSimVarValue("AUTOPILOT BANK HOLD", "Bool")) && !SimVar.GetSimVarValue("L:XMLVAR_GPS_DISABLED_AS530_1", "bool")){ return ""; }
getLateralModeActive(){ getLateralModeArmed(){ getVerticalModeActive(){ getVerticalModeArmed(){
I'll give the .CFG fix a try momentarily. Question regarding the other fix(es), what do I do with the line I've already added into my KAP140.js file? Should I revert to my backup of the original and put this new line in? Do I need both?
EDIT: immediately after posting this I see it's in the sentence immediately below the fix, I've been really blind these past few days. I revert to my original KAP140.js file and try it with the flight director fix and see what that does, then try this new KAP140 line.
-
I think that did it! It certainly didn't happen in the normal places it would have, and I spent a fair few minutes turning the AP on and off and deviating from my altitude, as well as hand flying up to a set one and waiting for it to take over on me. It didn't. This was with the flight director change and the stock KAP140.js file. How the hell could such a small thing make such a big difference??? Amazing. Good find!
I am not able to successfully add in your new line to the KAP140.js file, though. Those 4 lines you listed are all methods (unless I'm in the completely wrong place), and I tried putting it after the final method's last }, the line after return;, but that completely bricked my avionics when I started the sim back up. No GNS, no AP, hell, no weather radar, either.
Some more guidance on placement would be appreciated. I don't have any proper coding tools; I can get line numbers through WordPad I think, but nothing fancy to highlight bracket pairing or anything.
-
So glad it worked for you! I'll let technical support know about this to make sure that anyone else with the same problem is made aware of the solution. Thank you again for helping me find it. This is the problem with software that's constantly changing... I'm just glad we found a solution for you.
Ah, good thinking on your code edits, but that line should go directly after the four method declarations that I quoted, not after. For instance, the first one should read as follows:
getLateralModeActive(){ if(!SimVar.GetSimVarValue("AUTOPILOT MASTER", "Bool") && (SimVar.GetSimVarValue("AUTOPILOT WING LEVELER", "Bool") || SimVar.GetSimVarValue("AUTOPILOT BANK HOLD", "Bool")) && !SimVar.GetSimVarValue("L:XMLVAR_GPS_DISABLED_AS530_1", "bool")){ return ""; }