Jump to content
The simFlight Network Forums

Recommended Posts

Posted

John,

How does the control ipc.control(0x1151) work? Does it automatically detect if auto-save is active and if so, disables it. But if auto-save is disabled, the control will activate auto-save? Or do you write a 1 or 0 with the control to toggle auto-save on and off?

Is there a way within a Lua script to detect if auto-save is running (active)?

Thanks,

Al

Posted
9 hours ago, ark1320 said:

How does the control ipc.control(0x1151) work?

Control numbers are given in decimal, not hex, so the to send the auto-save on/off toggle control you would need to use
    ipc.control(1151)

9 hours ago, ark1320 said:

Does it automatically detect if auto-save is active and if so, disables it. But if auto-save is disabled, the control will activate auto-save? Or do you write a 1 or 0 with the control to toggle auto-save on and off?

No. As it says in the documentation (Advanced User manual, page 30):

Quote

1151 Auto-Save enable/disable toggle. An additional control to toggle AutoSave on/off.

This is only active once the AutoSave functionality has been activated.

So auto-save must be active, and then the toggle allows you to enable/disable it.

9 hours ago, ark1320 said:

Is there a way within a Lua script to detect if auto-save is running (active)?

No, not directly. But as it should always be on when you start a flight (*), you should be able to determine the current state of auto-save by the number of times it has been toggled.

* auto-save should always be on when a flight is started, regardless of the state of the auto-save after the previous flight, but I am not sure if this is the case...if not, I would need to correct this.

John

Posted
4 hours ago, John Dowson said:

Control numbers are given in decimal, not hex, so the to send the auto-save on/off toggle control you would need to use
    ipc.control(1151)

Yes, of course! Thanks for catching that.

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.