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.

event.timer

Featured Replies

Hello everyone,

 

        Adding some stuff to a aircraft module and trying to use event.timer function from the event.lua. When I run linda it says event cannot be found.

Any ideas why it is not finding the function from the event.lua.

 

 

Thanks,

 

Chris

When I run linda it says event cannot be found.

Any ideas why it is not finding the function from the event.lua.

 

Are you sure it is not saying that the function your are trying to register (i.e. the event) is not found? In which case you may have mis-spelled the name, or maybe its definition appears below the event.timer() call? Just guessing, I have yet to play with events.

MarkH

https://www.youtube.com/@AlmostAviation
AMD Ryzen 7 9800X3D / 64Gb DDR5 / Zotac RTX 5070 Ti / 2560 x 1440 display

  • Author

Mark,

 

Thanks for the input. I believe it did say function event not found. Not at the house for a couple days so wont be able to check. But I will update after I look it over real carefully.

 

Chris

  • Author

Mark, 

 

I entered it wrong. But turns out its not the function I needed for making course and fine adjustments on a encoder in linda. Did this instead:

 

 

function HDG_INC()
 
    HDG_INC_TIME = ipc.elapsedtime()
    if mcp_hdg_mode == 1 then
 
        if (HDG_INC_TIME - Hdg_inc) < 150 then
            local i
            for i = 1, 4 do ipc.control(70022, 16384) end
         else
            ipc.control(70022, 16384)
        end
 
     else
        NGX_AP_BANK_inc()
     end
 
   NGX_AP_HDG_show()
   Hdg_inc = HDG_INC_TIME
 
end
 
function HDG_DEC()
 
    HDG_DEC_TIME = ipc.elapsedtime()
    if mcp_hdg_mode == 1 then
 
        if (HDG_DEC_TIME - Hdg_dec) < 150 then
            local i
            for i = 1, 4 do ipc.control(70022, 8192) end
        else
            ipc.control(70022, 8192)
        end
 
    else
        NGX_AP_BANK_dec()
    end
 
    NGX_AP_HDG_show()
    Hdg_dec = HDG_DEC_TIME
 
end
 
Chris
I entered it wrong. But turns out its not the function I needed for making course and fine adjustments on a encoder in linda. Did this instead:

 

Oh yeah, it looks like you get coarse adjust if you spin the knobs faster? I did something like that to ignore the double-clicks generated by the nasty rotaries on Saitek radio panels. I use a SHIFT function for coarse/fine adjust, although that relies on having a rotary control with a central push-switch (push-and-turn is coarse control, just turning the knob is fine control).

MarkH

https://www.youtube.com/@AlmostAviation
AMD Ryzen 7 9800X3D / 64Gb DDR5 / Zotac RTX 5070 Ti / 2560 x 1440 display

Create an account or sign in to comment

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.