Vertical Speed Hold

From FSDeveloper Wiki
Revision as of 06:54, 7 February 2020 by Dragonflightdesign (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Vertical speed hold has not worked since FS2K/FS2K2. The workround to get this to function is to set altitude hold to some unfeasible height for the aircraft if wanting a positive vertical speed and to zero feet if wanting a negative vertical speed. The following code snip then sets the required vertical speed.

if(vsi_target>0)send_key_event(KEY_AP_ALT_VAR_SET_ENGLISH,50000); 	//Positive VS
else send_key_event(KEY_AP_ALT_VAR_SET_ENGLISH,0);			//Negative VS
send_key_event(KEY_AP_VS_VAR_SET_ENGLISH,(int)vsi_target);		//Set required VS
send_key_event(KEY_AP_ALT_HOLD_ON,0);					//Set alt hold on

From information received from the Prepar3D team at Lockheed-Martin, the bug for this one is buried so deep that it can’t be fixed. They’ve removed it from the list of KEY_EVENTS in the later P3D SDKs.