Jump to content

Archived

This topic is now archived and is closed to further replies.

Guest anton_il

C gauge Autopilot Airspeed question

Recommended Posts

Guest anton_il

Hi everybodyHow do I enable autopilot airspeed speed?Here is my code, it doesn't work, please help me to understand what I'm doing wrong?

if( IAS_key == -1  && AUTOPILOT_AIRSPEED_HOLD_var.var_value.n == 1 )	{		trigger_key_event (KEY_AP_AIRSPEED_OFF , 0);				}if( IAS_key == 0 && AUTOPILOT_AIRSPEED_HOLD_var.var_value.n == 0 )	{		trigger_key_event ( KEY_AP_SPD_VAR_SET, Speed_Ind);   // Speed_Ind is a value of IAS I want AP will hold		trigger_key_event (KEY_AP_AIRSPEED_ON , 1);						}

Share this post


Link to post
Share on other sites

Are you absolutely sure that the autopilot is turned on? You might want to add an AUTOPILOT_AVAILABLE check.-Dai

Share this post


Link to post
Share on other sites
Guest anton_il

Problem is found , I didn't enable auto throttle

trigger_key_event ( KEY_AUTO_THROTTLE_ARM, 0);

Share this post


Link to post
Share on other sites

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
  • Donation Goals

    AVSIM's 2020 Fundraising Goal

    Donate to our annual general fundraising goal. This donation keeps our doors open and providing you service 24 x 7 x 365. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. We reset this goal every new year for the following year's goal.


    34%
    $8,560.00 of $25,000.00 Donate Now
×
×
  • Create New...