Jump to content
The simFlight Network Forums

Modifying an Offset value based on a time interval


Recommended Posts

I am using one of the available FSUIPC offsets to light up an annunciator. I use a switch to set a value in that Offset. I want to keep that annunciator lit up for a small period of time (say 5 seconds). And then set the offset value back to 0 - thereby turning the annunciator off. The switch however continues to stay on.

With FSUIPC's extensive facilities (I learn newer ways of using it each day i use it!) Is there a way to do this without resorting to writing a program?

For example - say a timer facility within FSUIPC that i can use to reset the offset value?

I can also see a situation where based on a timer, I can increment the value in an offset.

Any suggestion would be much appreciated.

Thanks in advance.

Regards,

CPJ

Link to comment
Share on other sites

I am using one of the available FSUIPC offsets to light up an annunciator. I use a switch to set a value in that Offset. I want to keep that annunciator lit up for a small period of time (say 5 seconds). And then set the offset value back to 0 - thereby turning the annunciator off. The switch however continues to stay on.

With FSUIPC's extensive facilities (I learn newer ways of using it each day i use it!) Is there a way to do this without resorting to writing a program?

For example - say a timer facility within FSUIPC that i can use to reset the offset value?

No, but it would be easy to do with a Lua plug-in --just three lines, by the sound of it. You could call it "programming", but it is a lot easier than messing with some of the Button 'programming' tricks.

Something like

  • ipc.writeUB(, )
    ipc.sleep(5000)
    ipc.writeUB(, )

Save that as, say, "MyLight.lua", and assign the switch to "lua mylight" in the drop-down.

Regards

Pete

Link to comment
Share on other sites

Thanks Pete.

Your work and insights are invaluable.

Will try it out tonight and post my results here.

P.S: Did some pretty good use of Compound Button programming over the past few weeks. Very happy with what i was able to achieve.

Immensely grateful.

Best regards,

CPJ

Link to comment
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.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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.

Loading...
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.