Jump to content
The simFlight Network Forums

Recommended Posts

Posted

Hi Pete!

I’m writing an application that will run on a second PC connected to FS via WideFS. The software needs to check if FS is “frozen” or not due to menu activity and I found that offset 3365 is exactly what I need.

However, I do not get the non-zero values when FS is frozen. Instead I get zeros almost all the time. Once in a while the byte flickers and reads a value of 2 or 3 for a second or two, but it never stays at a non-zero value while FS is frozen.

With monitor=3365,1 in the WideClient.ini file I could se that that WideClient receives a value of 3 for a short time (about a second or two).

Here is a subset of the WideClient.log file:

110979 Monitored LAN data received:
              Offset 03365:  
              00                                             
112151 Monitored LAN data received:
              Offset 03365:  
              03                                                .
112982 Monitored data read by app:
              Offset 03365:  
              03                                                .
113062 Monitored LAN data received:
              Offset 03365:  
              00               

I also did a test running the application on the FS computer and had no problem at all with the offset. It gave me a non-zero value all the time I was in a menu or a dialog.

I am not 100% sure that I’m not doing anything wrong here but since I only get incorrect values when running the application on the second PC connected to FS via WideFS I get the feeling that this might be an issue related to WideFS.

Posted

I get the feeling that this might be an issue related to WideFS.

Hmmm. The whole business of detecting the "in menu" situation is actually not very good and the indicator does flicker internally.

It may be that I arranged it so that when FSUIPC supplies it locally it is set properly, but WideFS is grabbing it asynchronously and therefore not getting it set before supply.

I'm not sure how or where I can fix it, but I will take a look -- maybe in FSUIPC, not WideFS.

Regards,

Pete

Posted

I'll wait and see.

Right. I've found the reason.

Whilst Windows is processing the Menus (rather than the dialogues they may produce), it apparently isn't sending any messages to any other Windows, and doesn't call any of its Chains, so my WideServer variable scanning is suspended. It only sees the setting when you actually get into a dialogue and messages resume.

Looks like I'll need either to make WideServer intercept other parts of FS (ugh), or make FSUIPC send WideServer some special message when 3365 changes. I'm looking at that possibility first.

Regards,

Pete

Posted
Great Pete, I'm looking forward to whatever the outcome may be.

I've fixed it in FSUIPC by sending one of the messages to WideServer which it would normally get but which is being inhibited in "menu" modes. The fix will be in the next Interim Update for FSUIPC, which will be available in the Interim Versions announcement above either later today or over the weekend.

Regards,

Pete

Posted

Hi Pete

Now I have done som testing with the offset 3365.

I'm running FS9 in full screen mode and I'm having the menu hidden (I have to press the Alt-key to enter the menu)

FSUIPC version 3.558

WideFS version 6.510

Now I'm getting a non-zero value from offset 3365 but only if I'm entering the "Select Aircraft" or the "View options ..." menu. The other menus gives me a zero value. However, once in a while when I'm leaving som of these menus I get a non-zero value for a short period.

Pressing the Alt-key freezes FS but I still read a zero-value from the 3365 offset.

Posted

Now I'm getting a non-zero value from offset 3365 but only if I'm entering the "Select Aircraft" or the "View options ..." menu. The other menus gives me a zero value.

Erthe change I made only operates on menus, not on dialogues. In all my testing the other bit in 3365 is always set when I'm in a dialogue.

Before I try to do anything else (not that I can think of anything else at present) can you please clarify EXACTLY now what you mean by "menu" in this context. Evidently you meant something different to what I thought originally. :-(

Pressing the Alt-key freezes FS but I still read a zero-value from the 3365 offset.

Hmmm. Odd. That most certainly doesn't happen here -- if goes non-zero directly. What Windows system are you using? Maybe there are differences in the messages it sends when ALT is pressed.

I'm not sure I can help any further, but I'll have one further look if you can be very explicit. Since it now works 100% here on all my Winodws XP SP2 systems I will have difficulty figuring a solution. It would be guesswork I think.

Regards,

Pete

Posted
can you please clarify EXACTLY now what you mean by "menu" in this context. Evidently you meant something different to what I thought originally.

Hmmlooking at what I actually wrote I realize that I'm not very clear. Let me refrase my self:

My application is running on a a second computer connected to the FS computer via WideFS 6.510.

Case 1

When I'm activating the menu bar (pressing the Alt-key and the menu gets visible) FS becomes frozen. My application on the second PC, however still, reads a zero value.

Case 2

If I'm selecting the menu item "Aircraft|Select Aircraft" a dialog (not menu as I incorrectly wrote) is opened up. My application on the second PC reads a non-zero value.

Case 3

If I'm selecting the menu item "Aircraft|Fuel and Payload" a dialog is opened up. My application on the secon PC reads a zero value.

When I'm running exactly the same application on the FS computer and doing exactly the same activities I get a non-zero value in all the three above cases.

What Windows system are you using?

FS computer: WinXP Home edition with service pack 2

Second PC: WinXP Professional with service pack 2

Please tell me if I'm not explaining my self well enough.

Best regards.[/b]

Posted

Please tell me if I'm not explaining my self well enough.

No, that's clear now -- though previously I had assumed you only meant menu movements not entry into dialogues, because here I cannot, on any PC (I have 12 on my Network) reproduce the case where it is not non-zero when in any of the dialogues -- though maybe I didn't test all of them. I will certainly re-test the ones you mention.

I was getting zero in 3365 when pressing ALT and moving around in the menus, without selecting anything. But the change I made to FSUIPC did fix it 100% here, so your results are indeed a puzzle.

But of course I am using the latest interim release of WideFS (WideServer 6.596 and WideClient 6.598, available above). Perhaps you could just re-test with those, in case there's some quirk or timing difference, and let me know, before I start trying to find other ways of fixing something which isn't broken here?

Regards,

Pete

Posted

I attach FSUIPC 3.559. Please try this.

I could not reproduce your problem any way I tried, including the circumstances you listed. All I have tried now is forcing a message through to WideServer using a separate thread running continuously in FSUIPC but only sending the message when the value in 3365 is non-zero.

I really can't think of anything else to try. Please let me know.

Regards,

Pete

FSUIPC3559.zip

Posted

Success! :!: :!: :!:

The new WideFS version did the trick! :D

I started to try that and was going to test the new Fsuipc version as well but I wanted to do one thing at a time. With the new versions of WideClient and WideServer everything went just perfect. So I did not have to install version 3.559. Maybe you still want me to do that for some reason - please let me know if that's the case. :?:

You previous thoughts were probably correct about some quirk and timing difference in the new WideFS version.

GREAT job Pete! Thanks for your time and all good work. :D

I'm really happy now.

Posted
Success! :!: :!: :!:

The new WideFS version did the trick! :D

I started to try that and was going to test the new Fsuipc version as well but I wanted to do one thing at a time. With the new versions of WideClient and WideServer everything went just perfect. So I did not have to install version 3.559. Maybe you still want me to do that for some reason - please let me know if that's the case. :?:

It would be a good idea, please, to check the FSUIPC solution too if you can. I probably won't be taking the extra code out.

Regards

Pete

Posted
It would be a good idea, please, to check the FSUIPC solution too if you can. I probably won't be taking the extra code out.

Now I've done it.

I have tested the new fsuipc version (3.559) with WideFS 6.596

Everything went as expected = good!

Thanks!

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.