Sign in to follow this  
Swamech

event.timer

Recommended Posts

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

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
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).

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this