ark1320 Posted June 25, 2024 Report Posted June 25, 2024 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
John Dowson Posted June 26, 2024 Report Posted June 26, 2024 On 6/25/2024 at 10:29 PM, ark1320 said: How does the control ipc.control(0x1151) work? Expand 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) On 6/25/2024 at 10:29 PM, 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? Expand 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. Expand So auto-save must be active, and then the toggle allows you to enable/disable it. On 6/25/2024 at 10:29 PM, ark1320 said: Is there a way within a Lua script to detect if auto-save is running (active)? Expand 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
ark1320 Posted June 26, 2024 Author Report Posted June 26, 2024 On 6/26/2024 at 8:33 AM, 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) Expand Yes, of course! Thanks for catching that.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now