April 21, 201016 yr Commercial Member Can't figure this at all (scratches head).... If altitude lock is set to the current altitude (wing leveler off :( ) and I set a new altitude target, the aircraft sails merrily on at the original altitude. send_key_event(KEY_AP_ALT_HOLD_OFF,0);send_key_event(KEY_AP_ALT_VAR_SET_ENGLISH,ap_alt_target);send_key_event(KEY_AP_ALT_HOLD_ON,0); AUTOPILOT_ALTITUDE_LOCK_VAR confirms the new target (ap_alt_target) and AUTOPILOT_ALTITUDE_LOCK confirms that the hold is switched back on. Interestingly, giving the joystick a severe tweak hardly disturbs the aircraft at all in pitch. Does anyone have any idea which bit of the autopilot is fighting back this time?MTIA-Dai
April 21, 201016 yr Dai, Maybe, just maybe, it may be in the aircraft.cfg file in the (autopilot) section... Seehttp://msdn.microsoft.com/en-us/library/cc...#mozTocId942782 check the "default_pitch_mode" & "use_no_default_pitch" entries.Just a thought,Roman FS RTWR SHRS F-111 JoinFS Little Navmap
April 22, 201016 yr Hello!That is weird, The A/C should be fliyng to the new ALT. Hard to say with no code to check, but maybe you are updating a L:var rather than (A:Autopilot altitude lock var, feet) or maybe something else is writing 0 to the V/S parameter thus the plane does not dive nor climb holding the current ALT.Javier
April 23, 201016 yr Author Commercial Member Found it. Danny was right - the VS was being overwritten to zero. Or to be more accurate, after I had turned it off and then turned it back on again, FS was not turning it back on.-Dai
April 23, 201016 yr Author Commercial Member What was it a configuration or an XML issue?JavierNeither :( I don't use XML (don't know how to). I had turned the VS hold off in code, done some work and turned it back on again, only FS was ignoring the command to turn it back on. To fix the problem I moved the 'turn on again' command from the middle of the code block to the end of the code block (a whole eleven lines further down) and that was it. Just another one of those 'FS thingstm'.-Dai
Create an account or sign in to comment