Jump to content
The simFlight Network Forums

Disallow Pause Offset 0x0262


CXA001

Recommended Posts

Our Acars program does not allow pilots to slew, use time acceleration or pause their flight simulator.

I am having an issue where I am using offset 0X0262 to send a value of 0 to the simulator if a pause is detected.

I have declared my offsets as follows:

Offset<short> FSUIPCUnPause = new Offset<short>("FSUIPCUnPause", 0x0262, false); //Prevents flight simulator from being paused.
Offset<short> FSUIPCNoAcceleraton = new Offset<short>("FSUIPCNoAcceleration", 0x0C1A, false); //Prevents flight simulator from increasing or decreasing sim rate.
Offset<short> FSUIPCNoSlew = new Offset<short>("FSUIPCNoSlew", 0x05DC, false); //Prevents flight simulator from slewing.

All three offsets are executed at the same time:

FSUIPCConnection.Process(new string[] { "FSUIPCUnPause", "FSUIPCNoSlew", "FSUIPCNoAcceleration" });
FSUIPCUnPause.Value = 0;
FSUIPCNoSlew.Value = 0;
FSUIPCNoAcceleraton.Value = 256;

If I look at the FSUIPC.log the values are be sent for NoSlew & NoAcceleration but not for UnPause:

657547 WRITEex 0C1A,   2 bytes: 00 01
664563 WRITEex 05DC,   2 bytes: 00 00
671157 ### Mode: PAUSE on

This did work in the past, but it does not seem to work anymore.

Any assistance would be appreciated.

Thanks in advance,

Marc

Link to comment
Share on other sites

Hi Marc,

You've declared these an standard read/write offsets (WriteOnly set to false). They will only send values if the value you sent is different from the current value (at last process()).

If you want to send these values even if the current values are the same, you need to make them WriteOnly (set last boolean parameter to true). That way the offsets will write the value on every process. You won't be able to monitor the values with these offsets however.

If you do want to monitor them and only send the values only when you detect a pause or different sim rate then leave them as read/write, but note that the DLL won't bother to write the values that haven't changed. e.g. if the user pauses, it won't send the simrate or slew mode.

Earlier versions of the DLL did behave slightly differently in this regard, but it didn't really work properly so I had to fix it. I suspect you wrote this feature using one of those earlier versions and you're now seeing a different behaviour.

Paul  

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.