Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Help with a little programming

Featured Replies

Hello,

I am looking for some help to write a small function that calls upon default FSX autopilot behaviour. Here is how the sim behaves right now for ATT (attitude hold mode). When ATT hold is entered, the Autopilot reverts to roll hold for lateral control. I am looking for a way to keep the existing lateral mode when ATT hold is entered - so it can be used for enroute climbs and descents. It is possible to manually re-engage NAV or HDG mode. However, I would like to create a custom function that goes something like this:

function flight_level_change ()
    is NAV mode engaged?
    if yes - AP_ATT_HOLD
               AP_NAV_HOLD
    else - AP_ATT_HOLD
              AP_HDG_HOLD

end

is someone able to help me out with this? the above assumes that the autopilot is always in either HDG or NAV (true for me). It could use some kind of nested IF to also include roll_hold mode but I dont think its necessary...

thanks so much!!!

 

 

  • Author

this is what i have so far

function F406_FLCH_ON ()
    if D07C4 == 1
        then    ipc.control(65722,1)
                ipc.control(65811,1)
        else    ipc.control(65722,1)
                ipc.control(66106,1)
        end
end

but the conditional always returns false, so either i am reading the wrong offset, or expecting the wrong value or something else?

Edited by clarklidbury
typo

Archived

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.