Jump to content

WideFS (WideClient) and FS's Pause function


Recommended Posts

 

Hello. I am confused as to how FSX's Pause function affects WideFS7. I have set up a "watchdog" timer using G:Var's so that when I pause FS, the timer continues to run and it does. This timer goes to an offset through event.Lvar into 0x66DC. In addition, through event.Lvar, I am importing L:AlarmB into 0x66D9. In WideFS's pause.lua, I have a couple of ways to parse the needed bit. Either 1) logicvalB128 = logic.And(valB, 128) or 2) Decimal to Binary where I extract the needed bit; in this case bit 7. In addition, I tried using the event.timer method and the event.offset method. Using either parse method and either event method, the result is the same.

When using "repeat" .... "until," it only partially works as desired when I use: until(ipc.readUB(0x0264) == 0). But it also pauses the watchdog (66DC) at WideFS even though it continues to run within FS (observing 66DC through logging). I tried using:

until (logicalvalB128 ~= 1) and:
until(valB < 127) and:
until(ExtractBit7 == 0),

as they are within the pause.lua but they lock up WideFS when FS is paused. It is as though WideFS is paused too. When I use:

until(ExtractBit7 ~= 1),

WideFS doesn't lock up but the "repeat" ... "until" doesn't work properly either. Only when using:

until(ipc.readUB(0x0264) == 0)

does the "repeat" ... "until" partially work as desired. So the question is what is causing WideFS to NOT see the offset change of (0x66D9)? WideFS only sees the data change of the Pause offset (0x0264)? There are no errors in the logs.

Link to comment
Share on other sites

18 hours ago, gr8guitar said:

This timer goes to an offset through event.Lvar into 0x66DC.

What does this mean? It would be helpful if you could attach the pause.lua that you are using...

18 hours ago, gr8guitar said:

I am confused as to how FSX's Pause function affects WideFS7.

The FS's pause function dies not affect WideFS7 directly.  However, pausing the FS will restrict the data updates going to FSUIPC and so many offsets are not updated when the sim is paused, and so WideFS will also not see the offset changes. If you run the lua script on the server (PC running FSX and FSUIPC4) do you see the same behavior? I would expect so,,,

18 hours ago, gr8guitar said:

So the question is what is causing WideFS to NOT see the offset change of (0x66D9)? WideFS only sees the data change of the Pause offset (0x0264)?

Is the offset actually changing? If you log the offset value in FSUIPC4, can you see the change there?
 

Link to comment
Share on other sites

Hello. Thank you for your reply. As I mentioned above, yes, I can see 0x66D9 (my watchdog offset) change using the logging function of FSUIPC even though FS is paused. That is good, that is what I wanted. However, it does not change in the pause.lua on the WideClient.  I did not try it on the host because I need the client to work. The 0x66D9 won't update when I use the repeat-until unless I am reading 0x0264. What I wanted was to have the Pause light blink and using 0x66D9, that FS is still running in the pause.lua. So far, I can only choose to have a blinking pause light, but then 0x66D9 pauses too or have the light stay on using the other repeat-until options I listed above. The pause.lua is attached: Notice that I have a few WND that I was using to troubleshoot.

pause.lua

Link to comment
Share on other sites

No problem. I know people get busy. I think I fixed it but the solution is what I expected. For a few days now, as you may recall, I've been fighting the wnd and wifi. To be honest, I've been fighting the wnd and Ethernet too on a couple of Windows 8 tablets too. I've messed with the firewall, turning it off, changing from private to public networks, and vice versa and27 etc. and no success. I have a couple of Windows 7 computers and there were no issues but they aren't touchscreen. For some reason, this computer (a Toshiba laptop, Windows 10 Pro x64 using WiFi) has no communication issues but it's not a touchscreen. I've looked at all the computers' firewall settings and didn't find anything that stood out. Okay, I digressed a bit. So I have these Windows 7 computers and an old Windows XP touchscreen so I tried it. No communication problems but as the WideClient ran, it really slowed down. Instead of getting 1 second updates as my watchdogs showed, they were updating about every 5 seconds, so obviously I have a slow computer. I decided to separate the wnd into their respective offsets. Now they all currently are running smoothly and... I can get the pause light to alternate and I also get my FS watchdog to continue to work. Again, what is going on with that pause.lua attached I have no idea or why I'm struggling to get the wnd's to work, even after I split them up, on the Windows 8 and 10 tablets (except for one, this one) has me confused but I do have the Windows XP touchscreen running just fine. The wnd is strange too in the fact there are no issues with the WideClient buttons or using the display function. So that is where I am currently. Thanks for replying.

Link to comment
Share on other sites

Glad you found a workaround. I've looked into this further and WideClient IS certainly receiving offset updates when paused, regardless of the offset in question. All offsets in WideClient are treated equally in this respect, so I am not sure what your original issue was.

I have attached the scripts I used for testing if you want to try them on your system. The server lua script eventTest.lua waits until the sim is paused, and then updates offset 0xA000 with a counter, once a second. The client lua script eventTestClient.lua has an event on this offset, and the handling function just logs the count and repeatedly reads the same offset until the sim is unpaused and the lua on the server sets the offset value back to 0.

John

eventTest.lua

eventTestClient.lua

 

Link to comment
Share on other sites

Hello John. Thank you for your reply. I will test those luas later today. Okay, update. Attached is the modified EventTestClient.lua that I changed and renamed to: pauseTest.lua. I added a display so I could see 0XA000's value and see if I could get the "PAUSED" light to blink. I was able to get the "PAUSED" light to blink but not a steady of OFF and ON at 250 millisecond intervals. It may have to do with timing of the 1000 millisecond timer. The pauseTest.lua was checked out on my Toshiba Windows 10 Pro x64 computer. Also, after about 30 minutes, the 0xA000 display began to slow down to updating about every 2 seconds. So I'm not sure why of the above issues. I do have a blinking "PAUSED" light working but it doesn't require a host lua. I think separating the WND's really help to solve two problems. 1) The blinking of the "PAUSED" light and updating the G:Var timer and 2) The slowing down of them updating - especially on an old XP tablet. I now need to solve why WND's don't work on some Windows 8 and 10 tablets. As you can probably tell, I have a few tablets accumulated through the years that I use for actual flying.  I would like to get the Windows 8 and/or 10 tablets to work as they are thinner and provide a better screen. I'm curious John, where did the 0xA000 offset come from and how many offsets are available starting with 0xA000? Thanks for your help.

pauseTest.lua

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
 Share

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