{"action":"opened","issue":{"url":"https://api.github.com/repos/MuMech/MechJeb2/issues/1041","repository_url":"https://api.github.com/repos/MuMech/MechJeb2","labels_url":"https://api.github.com/repos/MuMech/MechJeb2/issues/1041/labels{/name}","comments_url":"https://api.github.com/repos/MuMech/MechJeb2/issues/1041/comments","events_url":"https://api.github.com/repos/MuMech/MechJeb2/issues/1041/events","html_url":"https://github.com/MuMech/MechJeb2/issues/1041","id":351913519,"node_id":"MDU6SXNzdWUzNTE5MTM1MTk=","number":1041,"title":"NRE engaging Ascent Autopilot via RasterPropMonitor or MOARdV's Avionics Systems","user":{"login":"MOARdV","id":6089493,"node_id":"MDQ6VXNlcjYwODk0OTM=","avatar_url":"https://avatars0.githubusercontent.com/u/6089493?v=4","gravatar_id":"","url":"https://api.github.com/users/MOARdV","html_url":"https://github.com/MOARdV","followers_url":"https://api.github.com/users/MOARdV/followers","following_url":"https://api.github.com/users/MOARdV/following{/other_user}","gists_url":"https://api.github.com/users/MOARdV/gists{/gist_id}","starred_url":"https://api.github.com/users/MOARdV/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MOARdV/subscriptions","organizations_url":"https://api.github.com/users/MOARdV/orgs","repos_url":"https://api.github.com/users/MOARdV/repos","events_url":"https://api.github.com/users/MOARdV/events{/privacy}","received_events_url":"https://api.github.com/users/MOARdV/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-08-19T15:57:02Z","updated_at":"2018-08-19T15:57:02Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"RPM and MAS use the following technique to control the MJ ascent autopilot from IVA (all relevant interactions are through delegates created from reflection, and I throw exceptions myself if any of the MJ modules are null):\r\n\r\n* Get the 'users' field for MechJebModuleAscentAutopilot.\r\n* Query the AscentAutopilot.enabled property.\r\n* If 'true', remove MechJebModuleAscentGuidance from AscentAutopilot.users (turn off AAP).\r\n* If 'false', add AscentGuidance to AscentAutopilot.users (engage AAP).\r\n\r\nIn KSP 1.3.1 and earlier, this approach successfully enabled and disabled the ascent autopilot.\r\n\r\nIn KSP 1.4.x with MJ 2.7.3, when I engage the AAP, AscentAutopilot.enabled returns 'true', but the throttle doesn't ramp to 100%, and I get the following log spam:\r\n\r\n```\r\n[ERR 10:48:54.985] MechJeb module MechJebModuleAscentAutopilot threw an exception in Drive: System.NullReferenceException: Object reference not set to an instance of an object\r\n  at MuMech.MechJebModuleAscentAutopilot.DriveAscent (.FlightCtrlState s) [0x00000] in <filename unknown>:0 \r\n  at MuMech.MechJebModuleAscentAutopilot.Drive (.FlightCtrlState s) [0x00000] in <filename unknown>:0 \r\n  at MuMech.MechJebCore.Drive (.FlightCtrlState s) [0x00000] in <filename unknown>:0 \r\n```\r\n\r\nI thought maybe I needed to set AAP.enabled = true before adding AscentGuidance as a user, but even that doesn't resolve the issue.\r\n\r\nIf I open the AAP GUI and close it again (or leave it open), then I don't get the NREs in the log, and the MJ AAP engages and functions normally.\r\n\r\nCan you give me some guidance on what else MAS needs to do in order to successfully activate the ascent autopilot without the player needing to open and close the MJ GUI?  I know the AAP had some substantial changes made between 1.3.1 and 1.4.0, but I haven't followed the MJ code changes closely enough to pin down what I need to do."}}
{"actor":{"display_login":"MOARdV"}}