paulsk Posted January 21, 2022 Report Posted January 21, 2022 I am finalizing a small project that presents the flown track onto a 64x32 RGB LED panel. The input comes from MSFS2020 / FSUIPC7 GPSout2 and GPRMC message type selected. Script written in Micropython on an Interstate 75 controller (Pimoroni Ltd U.K.) which in fact is built upon a Raspberry Pi Pico (RP2040). To make the script more perfect I need to know how I can order FSUIPC to 'sense' that MSFS2020 is in 'pause' state. Anyone who can give me a hint on this?
John Dowson Posted January 21, 2022 Report Posted January 21, 2022 You can check the pause state in offset 0x0264: Quote Pause indicator: Shows 3 pause states with flags 0x1 (pause set), 0x2 (pause on/off) and 0x4 (esc pause) Note that MSFS can be in multiple pause states. Also, Offset 0x062B can be used to determine if MSFS in the main menu or not. John
ghrasko Posted May 15, 2022 Report Posted May 15, 2022 It seems, only 0x4 (esc pause) is signalled on 0x0264 offset. The value is 0 if running or if in active pause. It is 4 if it is in esc pause. Presently i can't detect the active pause state on this segment. Gábor
ghrasko Posted May 15, 2022 Report Posted May 15, 2022 It seems, only 0x4 (esc pause) is signalled on 0x0264 offset. The value is 0 if running or if in active pause. It is 4 if it is in esc pause. Presently i can't detect the active pause state on this segment.
John Dowson Posted May 17, 2022 Report Posted May 17, 2022 It is still not possible to detect the active pause states, as far as I am aware - although I have not looked into this again for some time. MSFS contains various different pause states, activated by different controls. It is recommended to switch to one of the other pause controls, which are detected. I posted about this in the Asobo forums: https://forums.flightsimulator.com/t/simconnect-mega-thread/116305/79?u=impolitegem5317 John
Luke Kolin Posted October 5, 2023 Report Posted October 5, 2023 Sorry to bump an old thread, but has anything changed in this area? I am trying to detect MSFS, and it feels like 0x264 is a bitmap, but I am unsure what the bits mean. Cheers!
John Dowson Posted October 5, 2023 Report Posted October 5, 2023 Hi Luke, 2 hours ago, Luke Kolin said: has anything changed in this area? I don't know - I only check offsets if/when an issue is reported. I can take a look again if you think there is an issue. This offset changed many times in the first few years but I haven't looked at it in a while. There was a recent change/update to the active pause in MSFS, which basically improved this pause state a bit (although I still wouldn't recommend using this) - see the MSFS release notes for details. 2 hours ago, Luke Kolin said: it feels like 0x264 is a bitmap, but I am unsure what the bits mean. As a long time user, you should know where to look to find this information - from the FSUIPC7 Offset Status document: Pause indicator: Shows 3 pause states with flags 0x1 (pause set), 0x2 (pause on/off) and 0x4 (esc pause) 2 hours ago, Luke Kolin said: I am trying to detect MSFS, To detect when FSUIPC7 is connected to MSFS (you cannot detect it if its not connected!), you are probably better off using offset 0x026D (CAMERA STATE) - this will be none-zero when MSFS is running (and FSUIPC7 is connected). If you want to detect when MSFS is started and is in the main menu, you can use offset 0x026B (Plane in Parking State) which will change to 1 when MSFS is in the main menu. John
Luke Kolin Posted October 5, 2023 Report Posted October 5, 2023 3 hours ago, John Dowson said: As a long time user, you should know where to look to find this information - from the FSUIPC7 Offset Status document: Pause indicator: Shows 3 pause states with flags 0x1 (pause set), 0x2 (pause on/off) and 0x4 (esc pause) That's actually the reason for my question - what is the difference between "Pause Set" and "Pause On"? I have users reporting that the sim is not paused when pause set is toggled. Cheers Luke
John Dowson Posted October 6, 2023 Report Posted October 6, 2023 11 hours ago, Luke Kolin said: That's actually the reason for my question - what is the difference between "Pause Set" and "Pause On"? They are just different pause states, and either one or both can be active at the same time. 'Pause Set' doesn't seem to pause everything - for example you can still here the sound of the engine. I think this is still different from 'active pause' though. And note that none of these pause states stop the sim time - the only way to do this is from the devmode options menu in MSFS. So there are actually 5 distinct pause states, and multiple ones can be active at the same time: - pause set (also pause toggle) - pause on/off - active pause - escape pause - devmode pause I would generally recommend only using the 2nd method, pause on/off. I have noticed a few issues with the pause state offset 0x0264. It is now showing 0x3 when pause on is sent, when it should be 0x2. However, if you then also send a pause set with a parameter of 1 (to also turn pause set on), then send pause off, it changes to 0x1 (pause set active) which is correct, and you then need to send a pause set 0 (clear) to resume. There are also issues now with the pause control offset 0x0262. Setting pause states seems to work ok, but not clearing them. I will look into these issues next week. Cheers, John
John Dowson Posted October 6, 2023 Report Posted October 6, 2023 There is a new(ish) system event PAUSE_EX1 that can be used to detect 'active pause' as well as other pause states. I will look into this to see if I can improve the detection of the various pause states, One of the main problems with this is detecting the various pause states when FSUIPC is started after the sim has been put into a pause state, as I have to also consider the fact that FSUIPC can be started at any time and must accurately report the state of the sim. Hopefully this new sim state event will help with that. John
Luke Kolin Posted October 6, 2023 Report Posted October 6, 2023 Thanks John! Looking forward to testing this. Cheers
John Dowson Posted October 6, 2023 Report Posted October 6, 2023 6 minutes ago, Luke Kolin said: Thanks John! Looking forward to testing this. FYI, these are the pause states that the PAUSE_EX1 event can detect: #define PAUSE_STATE_FLAG_OFF 0 // No Pause #define PAUSE_STATE_FLAG_PAUSE 1 // "full" Pause (sim + traffic + etc...) #define PAUSE_STATE_FLAG_PAUSE_WITH_SOUND 2 // FSX Legacy Pause (not used anymore) #define PAUSE_STATE_FLAG_ACTIVE_PAUSE 4 // Pause was activated using the "Active Pause" Button #define PAUSE_STATE_FLAG_SIM_PAUSE 8 // Pause the player sim but traffic, multi, etc... will still run I think it is the 'Pause with sound' state that Pause Set and Pause Toggle control, which, as it says, is legacy and shouldn't be used...I think I might map these to use Pause On/Off in FSUIPC, although I would still have to handle them if received from the FS (i.e. sent by MSFS or another program). I will see... But I have also seen some bug reports on this, but I will let you know once implemented and tested.
John Dowson Posted October 9, 2023 Report Posted October 9, 2023 Hi Luke, can you try the attached version please, v7.3.25c. In this version, offset 0x0264 will hold the following values, or a combination thereof: 0 - No pause 1 - "full" Pause (sim + traffic + etc...), activated (and disabled) using Pause Set or Pause Toggle 2 - FSX Legacy Pause (not used anymore) - redundant 4 - Pause was activated using the "Active Pause" - only assignable in MSFS (not FSUIPC) 8 - Pause the player sim but traffic, multi, etc... will still run, activated using Pause On, disabled using Pause Off 16 - 'esc' pause So the sim can be in up to 4 distinct pause states at the same time. You can activate/disable all pause states when in another pause state, except for the esc pause state which blocks other pause states until deactivated. I have also updated the pause control offset 0x0262 - you can pause/unpause only two of the above pause states, by setting/clearing 1 and 8. So with this offset you can set/clear up to 2 distinct pause states. Let me know if you have any issues. Cheers, John FSUIPC7.exe
Luke Kolin Posted October 12, 2023 Report Posted October 12, 2023 Thanks! I'll give this a whirl. Cheers!
John Dowson Posted October 25, 2023 Report Posted October 25, 2023 Any feedback Luke? Is it working as expected?
Luke Kolin Posted October 27, 2023 Report Posted October 27, 2023 Sorry for the delay - the changes appear to be working correctly. Thank you! Cheers
John Dowson Posted October 27, 2023 Report Posted October 27, 2023 7 minutes ago, Luke Kolin said: Sorry for the delay - the changes appear to be working correctly. Thank you! Ok, thanks for the update. Have you made any software available that depends on this change? I have been getting some support requests through stating that 7.3.25 is needed to support the ACARS program they are using, which is strange as this has not yet been officially released...
Luke Kolin Posted October 27, 2023 Report Posted October 27, 2023 Yes, that was my error. I'm debating whether I want to roll that back or if an FSUIPC release will be soon.
John Dowson Posted October 27, 2023 Report Posted October 27, 2023 Ah, ok. I can release over the weekend, probably Sunday, if that helps.
John Dowson Posted October 28, 2023 Report Posted October 28, 2023 On 10/27/2023 at 5:18 PM, Luke Kolin said: Yes, that was my error. I'm debating whether I want to roll that back or if an FSUIPC release will be soon. It has now been released. John
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