Jump to content

FlyWithLua - unable to write to Landing_Alt dataref for Zibo Mod

Recommended Posts

Hi , I'm using Leo Bodnar cards for my 737 overhead (testing using Zibo Mod) and scripting all of the switches, encoders etc. All seems to be going well with the exception of setting the 'Landing Altitude' (the 'Cabin Pressure' encoder above it works just fine using the same script - see below).

I've confirmed the correct button numbers using the FlyWithLua macro for checking joystick button numbers. The dataref I'm unsuccessfully trying to write to is "laminar/B738/pressurization/knobs/landing_alt" (I am able to update the dataref values using DataRefEditor though). The strange thing  is that I cannot find this dataref in the Zibo's datarefs.txt or on the SimInnovations site (I know it shouldn't show on the latter).

This is the script I'm using (note: Cabin Pressure works, Landing Altitude does not):

    dataref("m68_CabinPressure", "sim/cockpit/pressure/max_allowable_altitude", "writable")
    dataref("m68_LandingAltitude", "laminar/B738/pressurization/knobs/landing_alt", "writable")

    m68_CabinPressureUp      = 645    -- Increase Cabin Pressure
    m68_CabinPressureDn      = 644    -- Decrease Cabin Pressure
    m68_LandingAltitudeUp     = 643    -- Increase Landing Altitude
    m68_LandingAltitudeDn     = 642    -- Decrease Landing Altitude

    do_every_frame( [[
    -- Set Cabin Pressure
    if button(m68_CabinPressureUp) and last_button(m68_CabinPressureUp) then
    m68_CabinPressure = m68_CabinPressure + 250
    if button(m68_CabinPressureDn) and last_button(m68_CabinPressureDn) then
    m68_CabinPressure = m68_CabinPressure - 250
    -- Set Landing Altitude
    if button(m68_LandingAltitudeUp) and last_button(m68_LandingAltitudeUp) then
    m68_LandingAltitude = m68_LandingAltitude + 50
    if button(m68_LandingAltitudeDn) and last_button(m68_LandingAltitudeDn) then
    m68_LandingAltitude = m68_LandingAltitude - 50
    end]] )

Any help would really be appreciated.

Edited by FlyKiwi

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Current Donation Goals

  • Threshold News

  • Threshold articles

  • Threshold clubs

  • Top Downloads

    1. By audiobirdxp
         703   78
    2. By Captain Kitten
         596   12
    3. By Xephyr
         72   5
    1. By audiobirdxp
         3,230   78
    2. By Captain Kitten
         2,854   12
    3. By Xephyr
         285   5
    1. By audiobirdxp
         40,085   78
    2. By Captain Kitten
         19,054   12
    1. By audiobirdxp
         40,085   78
    2. By Captain Kitten
         20,686   12
  • Create New...

Important Information

Please read the Terms of Use