Jump to content
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

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

gGzCVFp.jpg
Core i7-7700K / 32Gb DDR4 / Gigabyte GTX1070 / 1080p x 3 x weird / Win7 64 Pro

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).


MarkH

gGzCVFp.jpg
Core i7-7700K / 32Gb DDR4 / Gigabyte GTX1070 / 1080p x 3 x weird / Win7 64 Pro

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  

  • 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.
×
×
  • Create New...