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

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