diff --git a/FsConnector/FsConnector.csproj b/FsConnector/FsConnector.csproj index 6b650b2..9111e70 100644 --- a/FsConnector/FsConnector.csproj +++ b/FsConnector/FsConnector.csproj @@ -5,15 +5,15 @@ FsConnector MSFS 2020 Popout Panel Manager FsConnector MSFS 2020 Popout Panel Manager FsConnector - 3.4.0.0 + 3.3.4.0 Stanley Kwok Stanley Kwok Stanley Kwok 2021 https://github.com/hawkeye-stan/msfs-popout-panel-manager MSFSPopoutPanelManager.FsConnector x64;AnyCPU - 3.4.0.0 - 3.4.0.0 + 3.3.4.0 + 3.3.4.0 diff --git a/MSFSPopoutPanelManager.sln b/MSFSPopoutPanelManager.sln index da24a71..6c6396d 100644 --- a/MSFSPopoutPanelManager.sln +++ b/MSFSPopoutPanelManager.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.32002.261 +# Visual Studio Version 17 +VisualStudioVersion = 17.2.32602.215 MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WpfApp", "WpfApp\WpfApp.csproj", "{54712A0A-B344-45E4-85C4-0A913305A0E6}" EndProject @@ -23,6 +23,23 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution VERSION.md = VERSION.md EndProjectSection EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "images", "images", "{D8938324-934B-4602-B30E-66B60365B426}" + ProjectSection(SolutionItems) = preProject + images\logo.png = images\logo.png + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "doc", "doc", "{E2AF3E4D-F5B6-44C0-8E15-528206E9F3C7}" + ProjectSection(SolutionItems) = preProject + images\doc\frameworkdownload.png = images\doc\frameworkdownload.png + images\doc\screenshot_1.png = images\doc\screenshot_1.png + images\doc\screenshot_2.png = images\doc\screenshot_2.png + images\doc\screenshot_3.png = images\doc\screenshot_3.png + images\doc\screenshot_4.png = images\doc\screenshot_4.png + images\doc\screenshot_5.png = images\doc\screenshot_5.png + images\doc\screenshot_6.png = images\doc\screenshot_6.png + images\doc\screenshot_7.png = images\doc\screenshot_7.png + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|x64 = Debug|x64 @@ -53,6 +70,10 @@ Global GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {D8938324-934B-4602-B30E-66B60365B426} = {15FC98CD-0A69-437B-A5E5-67D025DB5CDC} + {E2AF3E4D-F5B6-44C0-8E15-528206E9F3C7} = {D8938324-934B-4602-B30E-66B60365B426} + EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {D1607553-61E8-4ED6-B382-ABA6F6944586} EndGlobalSection diff --git a/Model/Model.csproj b/Model/Model.csproj index d89c978..b060306 100644 --- a/Model/Model.csproj +++ b/Model/Model.csproj @@ -5,15 +5,15 @@ MSFSPopoutPanelManager.Model Model MSFS 2020 Popout Panel Manager Model - 3.4.0.0 + 3.3.4.0 Stanley Kwok Stanley Kwok Stanley Kwok 2021 MSFS 2020 Popout Panel Manager Model https://github.com/hawkeye-stan/msfs-popout-panel-manager x64;AnyCPU - 3.4.0.0 - 3.4.0.0 + 3.3.4.0 + 3.3.4.0 diff --git a/Provider/Provider.csproj b/Provider/Provider.csproj index 8173c39..f6b3b2d 100644 --- a/Provider/Provider.csproj +++ b/Provider/Provider.csproj @@ -7,7 +7,7 @@ MSFSPopoutPanelManager.Provider MSFS 2020 Popout Panel Manager Provider MSFS 2020 Popout Panel Manager Provider - 3.4.0.0 + 3.3.4.0 Stanley Kwok Stanley Kwok 2021 https://github.com/hawkeye-stan/msfs-popout-panel-manager diff --git a/Provider/SimConnectManager.cs b/Provider/SimConnectManager.cs index 39b6a08..d356f7f 100644 --- a/Provider/SimConnectManager.cs +++ b/Provider/SimConnectManager.cs @@ -1,7 +1,9 @@ using MSFSPopoutPanelManager.FsConnector; using MSFSPopoutPanelManager.Shared; using System; +using System.Collections.Generic; using System.Diagnostics; +using System.Linq; using System.Threading; using System.Timers; @@ -16,7 +18,6 @@ namespace MSFSPopoutPanelManager.Provider private System.Timers.Timer _requestDataTimer; private SimConnectSystemEvent _lastSystemEvent; - private bool _isSimActive; private bool _isPowerOnForPopOut; private bool _isTrackIRManaged; @@ -44,19 +45,16 @@ namespace MSFSPopoutPanelManager.Provider _requestDataTimer.Elapsed += HandleMessageReceived; }; - _isSimActive = false; _simConnector.Start(); } public void Stop() { - _isSimActive = false; _simConnector.Stop(); } public void Restart() { - _isSimActive = false; _simConnector.StopAndReconnect(); } @@ -111,10 +109,14 @@ namespace MSFSPopoutPanelManager.Provider private void SetTrackIREnable(bool enable) { + // Wait for _simData.ElectricalMasterBattery to refresh + Thread.Sleep(MSFS_DATA_REFRESH_TIMEOUT + 250); + // It is prop3 in SimConnectStruct (by DataDefinitions.cs) SimConnectStruct simConnectStruct = new SimConnectStruct(); + simConnectStruct.Prop01 = _simData.Title; // must set "Title" for TrackIR variable to write correctly - simConnectStruct.Prop02 = _simData.ElectricalMasterBattery ? Convert.ToDouble(1) : Convert.ToDouble(0); // must set "ElectricalMasterBattery" for TrackIR variable to write correctly + simConnectStruct.Prop02 = _simData.ElectricalMasterBattery ? Convert.ToDouble(1) : Convert.ToDouble(0); // must set "ElectricalMasterBattery" for TrackIR variable to write correctly simConnectStruct.Prop03 = enable ? Convert.ToDouble(1): Convert.ToDouble(0); // this is the TrackIR variable _simConnector.SetDataObject(simConnectStruct); } @@ -143,32 +145,46 @@ namespace MSFSPopoutPanelManager.Provider OnSimConnectDataRefreshed?.Invoke(this, new EventArgs(e.Value)); } + private List _systemEventBuffer; + private List FlightRestartBeginBufferDef = new List() { SimConnectSystemEvent.SIMSTOP, SimConnectSystemEvent.VIEW }; + private List FlightRestartEndBufferDef = new List() { SimConnectSystemEvent.SIMSTART, SimConnectSystemEvent.VIEW }; + private List FlightStartBufferDef = new List() { SimConnectSystemEvent.SIMSTOP, SimConnectSystemEvent.SIMSTART, SimConnectSystemEvent.SIMSTOP, SimConnectSystemEvent.SIMSTART, SimConnectSystemEvent.VIEW }; + private List FlightEndBufferDef = new List() { SimConnectSystemEvent.SIMSTOP, SimConnectSystemEvent.SIMSTART, SimConnectSystemEvent.VIEW, SimConnectSystemEvent.SIMSTOP, SimConnectSystemEvent.SIMSTART }; + private bool _systemEventInFlightRestartSequence; + private void HandleReceiveSystemEvent(object sender, EventArgs e) { + if (_systemEventBuffer == null) + _systemEventBuffer = new List(); + var systemEvent = e.Value; + _systemEventBuffer.Add(systemEvent); + Debug.WriteLine($"SimConnectSystemEvent Received: {systemEvent}"); - // to detect flight start at the "Ready to Fly" screen, it has a SIMSTART follows by a VIEW event - if (_lastSystemEvent == SimConnectSystemEvent.SIMSTART && systemEvent == SimConnectSystemEvent.VIEW) + if (_systemEventBuffer.TakeLast(2).SequenceEqual(FlightRestartBeginBufferDef)) { - _isSimActive = true; - _lastSystemEvent = SimConnectSystemEvent.NONE; - OnFlightStarted?.Invoke(this, null); - return; - } - - // look for pair of events denoting sim ended after sim is active - if ((_isSimActive && _lastSystemEvent == SimConnectSystemEvent.SIMSTOP && systemEvent == SimConnectSystemEvent.VIEW) || - (_isSimActive && _lastSystemEvent == SimConnectSystemEvent.SIMSTOP && systemEvent == SimConnectSystemEvent.SIMSTART)) - { - _isSimActive = false; - _lastSystemEvent = SimConnectSystemEvent.NONE; OnFlightStopped?.Invoke(this, null); - return; + _systemEventBuffer = null; + _systemEventInFlightRestartSequence = true; + } + else if (_systemEventInFlightRestartSequence && _systemEventBuffer.TakeLast(2).SequenceEqual(FlightRestartEndBufferDef)) + { + OnFlightStarted?.Invoke(this, null); + _systemEventBuffer = null; + _systemEventInFlightRestartSequence = false; + } + else if (_systemEventBuffer.TakeLast(5).SequenceEqual(FlightStartBufferDef)) + { + OnFlightStarted?.Invoke(this, null); + _systemEventBuffer = null; + } + else if (_systemEventBuffer.TakeLast(5).SequenceEqual(FlightEndBufferDef)) + { + OnFlightStopped?.Invoke(this, null); + _systemEventBuffer = null; } - - _lastSystemEvent = systemEvent; } } } diff --git a/README.md b/README.md index 162f614..54dc288 100644 --- a/README.md +++ b/README.md @@ -1,120 +1,179 @@ # MSFS Pop Out Panel Manager -MSFS Pop Out Panel Manager is an application for MSFS 2020 which helps pop out, save and re-position pop out panels to be used by applications such as Sim Innovations Air Manager or to place pop out panels onto your screen at predetermined locations or on another monitor automatically. -[FlightSimulator.com forum thread regarding this project](https://forums.flightsimulator.com/t/msfs-pop-out-panel-manager-automatically-pop-out-and-save-panel-position/460613) +

+ +

-[Online Video - How to Use](https://vimeo.com/668430955) +MSFS Pop Out Panel Manager is an application for MSFS 2020 which helps pop out, save and re-position pop out panels to be used by utilities such as Sim Innovations Air Manager or to place pop out panels onto your screen or another monitor at predetermined locations automatically. -[Online Video - Auto Pop Out Panels in Action](https://vimeo.com/674073559) +Please follow [FlightSimulator.com](https://forums.flightsimulator.com/t/msfs-pop-out-panel-manager-automatically-pop-out-and-save-panel-position/460613) forum thread regarding this project + +[Online video - How to use](https://vimeo.com/723158934) + +[Online video - How to enable auto pop out panels](https://vimeo.com/723165248)
- - ## Application Features * Display resolution independent. Supports 1080p/1440p/4k display. -* Support multiple user defined profiles to save panel locations to be recalled later. +* Support multiple user defined aircraft profiles to save panel locations to be recalled later. * Intuitive user interface to defined location of panels to be popped out. -* Auto Pop Out feature. The application will detect current aircraft livery and activate the corresponding profile on flight session start. -* Cold Start feature. Panels can be popped out and recalled later even when they're not powered on. +* [Auto Pop Out](#auto-pop-out-feature) feature. The application will detect active aircraft by livery and activate the corresponding profile on start of new flight session. +* [Cold Start feature](#auto-pop-out-feature). Instrumentation panels can be popped out even when they're not powered on (for G1000 planes only). * Auto Panning feature remembers the cockpit camera angle when you first define the pop out panels. You can now pan, zoom in, and zoom out to identify offscreen panels and the camera angle will be saved and reused. This feature requires the use of Ctrl-Alt-0 keyboard binding to save custom camera view per plane configuration. (Can be configured to use 0 through 9). If the keyboard binding is currently being used. The auto-panning feature will overwrite the saved camera view if enabled. -* Fine-grain control in positioning panels down to pixel level. +* Fine-grain control in positioning of panels down to pixel level. * Panels can also be configured to be always on top, with title bar hidden, or stretch to full screen mode. -* User-friendly features such as application Always on Top and Auto Start as MSFS starts. +* Auto disable Track IR when pop out starts. +* User-friendly features such as application always on top, auto start, minimized to tray with keyboard shortcuts. * Auto save feature. All profile and panel changes are saved automatically. -* Please see [Version](VERSION.md) file for latest added application features. +* **Experimental Feature**: Enable touch support for pop outs on touch enable display. Please see [Touch Enable Pop Out Feature](#touch-enable-pop-out-feature) for more information.
-## History: Pop Out Panel Positioning Annoyance -In MSFS, by holding **RIGHT ALT** + **LEFT CLICKING** some instrumentation panels, these panels will pop out as floating windows that can be moved to a different monitor. But this needs to be done every time you start a new flight, RIGHT-ALT clicking, split out child windows, move these windows to final location, rinse and repeat. For predefined toolbar menu windows such as ATC, Checklist, VFR Map, their positions can be saved easily and reposition at the start of each new flight using 3rd party windows positioning tool because these windows have a **TITLE** in the title bar when they are popped out. But any custom pop outs such as PFD and MFD do not have window title. This makes remembering their last used position more difficult and it seems very annoying to resize and re-adjust their positions to be used by Air Manager or other overlay tool on each new flight. +## History: Pop Out Panel Positioning in MSFS +In MSFS, by holding **RIGHT ALT** + **LEFT CLICKING** some instrumentation panels, these panels will pop out as floating windows that can be moved to a different screen location or different monitor. But this needs to be done every time you start a new flight. You've to perform RIGHT-ALT click, split out child windows, move these windows to final location, rinse and repeat. For predefined toolbar menu windows such as ATC, Checklist, VFR Map, their positions can be saved easily and reposition at the start of each new flight using 3rd party windows positioning tool because these windows have a **TITLE** in the title bar when they are popped out. But any custom pop outs such as plane instrumentation panel do not have window title. This makes remembering their last used position more difficult and it is very annoying to resize and re-adjust their positions to be used by Air Manager or other overlay tool on each new flight. -What if you can do the setup once by defining on screen where the pop out panels will be, click a button, and the application will pop these panels out and separate them for you. Then you just need to move these panels to their final positions. Next time when you start a flight, with a single button click, your panels will automatically pop out for you and move to their preconfigured positions. Easy peasy lemon squeezy! +What if you can do the setup once by defining on screen where the pop out panels will be, click a button, and the application will pop these panels out and separate them for you. You just need to move these panels to their final positions only once. Next time when you start a flight, with a single button click, your panels will automatically pop out for you and move to their preconfigured positions. Easy peasy lemon squeezy!
## How to Use - 1. Start the application **MSFSPopoutPanelManager.exe** and it will automatically connect when MSFS/SimConnect starts. You maybe prompt to download .NET framework 5.0. Please see the screenshot below to download and install x64 desktop version of the framework. +[Online video - How to use](https://vimeo.com/723158934) + + Start the application **MSFSPopoutPanelManager.exe** and it will automatically connect when MSFS/SimConnect starts. You maybe prompt to download .NET framework 5.0 x64. Please see the screenshot below to download and install x64 desktop version of the framework.

- +

- 2. First start the game and start a flight. Then, in the app, create a new profile (for example: Cessna 172 G1000) + 1. First start the game and start a flight. Then create a new profile (for example: Kodiak 100) by clicking the "plus" button in step 1 of the app.

- +

- 3. If you want to associate the profile to the current aircraft livery to use in Auto Pop Out feature or automatic profile switching, click the "Plus" button next to the aircraft livery name. The aircraft livery title will become green once the profile is bound to the livery. + 2. For step 2, if you want to associate the profile to the current aircraft livery to use in [Auto Pop Out](#auto-pop-out-feature) feature or for automatic profile switching when selecting a different aircraft, click the "plus" button next to the aircraft livery name. The aircraft livery title will become green once the livery is bound to the profile.

- +

- 3. Once your flight is started, you're ready to select the panels you want to pop out. Please click "Start Panel Selection" to define where the pop out panels will be using LEFT CLICK. Use CTRL-LEFT CLICK when done to complete the selection. You can also move the number circles at this point to do final adjustment. + 3. Now start a flight with your chosen aircraft. Once your flight is started, you're ready to select the panels you want to pop out. Please click "Start Panel Selection" to define where the pop out panels will be using **LEFT CLICK**. Use **CTRL-LEFT CLICK** when selection is completed. You can also move the number circles at this point to do final adjustment.

- +

- 4. Now, click "Start Pop Out". At this point, please be patient. The application will start popping out and separating panels one by one and you will see a lot of movements on screen. If something goes wrong, just follow the instruction in the status message and try again. - - 5. Once the process is done, you will see a list of panels line up in the upper left corner of the screen. All the panels are given a default name. You can name them anything you want if desire. + 4. Next, click "Start Pop Out". At this point, please be patient. The application will start popping out and separating panels one by one and you will see a lot of movements on screen. If something goes wrong, just follow the instruction in the status message and try again. Once the process is done, you will see a list of panels line up in the upper left corner of the screen. All the panels are given a default name. You can name them anything you want as needed. + + 5. You can now start panel configuration by dragging the pop out panels into their final position (to your main monitor or another monitor). You can also type value directly into the data grid to move and resize a panel. The +/- pixel buttons by the lower left corner of the grid allow you to change panel position at the chosen increment/decrement by selecting the data grid cell first (X-Pos, Y-Pos, Width, Height). You can also check "Always on Top", "Hide Title Bar", or "Full Screen Mode" if desire. If the panel is touch capable, you can check "Touch Enabled". Please see [Touch Enable Pop Out Feature](#touch-enable-pop-out-feature) regarding this experimental feature. Once all the panels are at their final position, just click "Lock Panel" to prevent further panel changes.

- +

- 6. Now, start the panel configuration by dragging the pop out panels into their final position (to your main monitor or other monitors). You can also type value directly into the data grid to move and resize a panel. The +/- pixel buttons by the lower left corner of the grid allow you to change panel position at the chosen increment/decrement by selecting the data grid cell (X-Pos, Y-Pos, Width, Height). You can also select "Always on Top", "Hide Title Bar", or "Full Screen Mode" if desire. Once all the panels are at their final position, just click "Lock Panel" to prevent further panel changes. - -

- -

+6. To test if everything is working, please click "Restart" in the File menu. This will close all pop outs. Now click "Start Pop Out" and see the magic happens! -7. To test if everything is working. Once the profile is saved, please click "Restart" in the File menu. This will close all pop outs, except the built-in ones from the game main menu bar, and you're back to the start of the application. Now click "Start Pop Out" and see the magic happens! - -8. With auto panning feature enabled, you do not have to line up the circles that identified the panels in order for the panels to be popped out. But if you would like to do it manually without auto-panning, on next start of the flight, just line up the panels before clicking "Start Pop Out" if needed. +7. With auto panning feature enabled in preferences setting, you do not have to line up the circles that identified the panels in order for the panels to be popped out. But if you would like to do it manually without auto-panning, on next start of the flight, just line up the panels before clicking "Start Pop Out" if needed.

- +

- +


-## How Auto Pop Out Works +## Auto Pop Out Feature -The app will try to find a matching profile with the current selected aircraft livery. It will then automatically detect when a flight is starting and then click the "Ready to Fly" button. It will also power on instrumentation for cold start (if necessary), and pop out all panels. This feature allows panels to be popped out without the need of user interaction. If profiles are set and bound to your frequently used aircraft livery, you can auto-start the app minimized in system tray and as you start your flight, panels will automatically pop out for you. +[Online Video - How to enable auto pop out panels](https://vimeo.com/723165248) -* First make sure in File->Preferences->Auto Pop Out Panel Settings, "Enable Auto Pop Out Panels" option is turned on. +The app will try to find a matching profile with the current selected aircraft livery. It will then detect when a flight is starting and automatically click the "Ready to Fly" button. It will also power on instrumentation for cold start (for G1000/NXi equipped plane only), and then pop out all panels. This feature allows panels to be popped out without the need of user interaction. If profiles are set and bound to your frequently used aircraft livery, you can auto-start the app minimized in system tray and as you start your flight, panels will automatically pop out for you for the selected aircraft. -* For existing profile to use Auto Pop Out feature, just click "Add Binding" (the plus sign) and bind the profile to the active aircraft livery currently being displayed. Any bound aircraft livery will appear in GREEN color. Unbound ones will be in WHITE, and bound livery in another profile will be in RED. You can only bound the livery to a single profile so the Auto Pop Out will work. +* In File->Preferences->Auto Pop Out Panel Settings, "Enable Auto Pop Out Panels" option is turned on. You can also adjust wait delay settings if you've a fast computer. + +* For existing profile to use Auto Pop Out feature, just click the plus sign in the bind active aircraft livery to profile section. This will bind the active aircraft livery being displayed to the profile. Any bound aircraft livery will appear in GREEN color. Unbound ones will be in WHITE, and bound livery in another profile will be in RED. You can bind as many liveries to a profile as you desire but a livery can only bind to a single profile so Auto Pop Out knows which profile to start when a flight session starts. * During my testing, instrumentations only need to be powered on for Auto Pop Out to work for G1000/G1000 NXi plane during cold start. (There seems to be a bug in the game that you can't do Alt-Right click to pop out cold start panel for this particular plane variant). For other plane instrumentations I've tested (G3000, CJ4, Aerosoft CRJ 550/700, FBW A32NX), panels can be popped out without powering on. So please make sure the checkbox "Power on required to pop out panels on cold start" is checked for G1000 related profiles. -* If you want to fly the same plane with different livery, just add the aircraft livery binding to your desire profile when you switch plane. +* **TIPS:** If you want to fly an aircraft with different livery, just add the aircraft livery binding to your desire profile when you switch livery. -* You can go to the preference settings to configure the time delay for each steps for the Auto Pop Out process based on the speed of your computer if things do not work correctly. +* **TIPS:** You can go to the preference settings to configure the time delay for each steps for the Auto Pop Out process based on the speed of your computer if things do not work correctly or if you want to speed up the Auto Pop Out process. -* **TIPS:** One trick to force SimConnect to update the current selected aircraft livery so you can do the binding is after selecting a new livery in the World Map, click the "Go Back" button at the lower left of your screen. You should see aircraft title changes to the active ones. Or you can wait until the flight is almost fully loaded and you will see the aircraft livery gets updated. - -[Online Video - Auto Pop Out in action](https://vimeo.com/674073559) - In the video, after clicking flight restart, the app did all the clicking by itself. +* **TIPS:** One trick to force SimConnect to update the current selected aircraft livery so you can do the binding immediately after selecting a new livery in the World Map is to click the "Go Back" button at the lower left of your screen. You should see aircraft title changes to the active ones. Or you can wait until the flight is almost fully loaded and you will see the current aircraft livery name gets updated.
+## Touch Enable Pop Out Feature + +[Online video - Touch enable panel in action](https://vimeo.com/manage/videos/719651650) + +This feature will make pop out panel touch enabled on touch screen monitor or tablet (through remote display tool such as [Spacedesk](https://www.spacedesk.net/). Currently there is limitation in MSFS regarding the support of touch capability for pop out panels on touch enabled display. Pop out instrumentation panels that have touch capabilities are and not limited to: + +- King Air 350 +- PMS GTN750 +- Lower touch panel in TBM 930 +- Built-in panels such as Checklist, ATC, etc. + +In MSFS, when operating the above panels with pop outs, there are currently 2 limitations and one major bug that Asobo has to solve to make touch panels viable. This touch enable pop out experimental feature will try to solve the 2 limitations but is currently not able to overcome the bug. + +- Limitation #1 - For pop out panel, touch events do not get pass through to panels such as King Air PFD or GTN750 and they can only be operated with a mouse. There is a work around if you’re using Spacedesk with tablet by disabling USB HID within Spacedesk drivers in Windows device manager. But if you’re using touch monitors directly connected to your gaming PC, then Spacedesk workaround is not an option. + + **Limitation solved by**: detect the coordinate where touch event has occurred and sent an extra left mouse click to MSFS. + +- Limitation #2 - When you click or hover your mouse over any pop out panels on your main monitor or on another monitor, the game main window will lose focus and you can’t operate flight control without clicking the game window again. + + **Limitation solved by**: detect when the user has stopped any touch events (after 1 second) and refocus main screen to allow flight control to work again. + +- Bug - If the pop out panel is also display on the main screen, a click through at incorrect coordinate will occur at the relative position where the pop out panel is located. If you click at this particular location in the pop out panel, the click event will register at the wrong coordinate. I haven’t been able to figure out how to work around this issue yet since the bug is deep in the closed source CoherentGT code in how MSFS implements the internal browser control to display to pop out panel. So touch will not work in the relative position of the pop out panel where panel appears on the main screen. This only affects instrumentation pop outs. The built-in ones such as ATC and checklist are fine since once they’re popped out, they no longer appear on the main screen. Below is the screenshot where click through at incorrect coordinate occurs. See the relative position (red box) in the pop out where the same instrumentation appears on the main screen. + +

+ +

+ + If you're a home cockpit builder and your main screen has a view that looks like something below, than touch enable feature will work almost 100% of the time since there is no click through target on your main screen. + +

+ +

+ +#### How to enable touch support + +Perform your regular panel selection and once your touch capable panel has been popped out, in the configuration screen grid, just check "Touch Enabled" to enable touch support for the selected panel. Once you enable touch support for a panel, using a mouse to operate the panel will no longer work correctly because double submit of Left-Click to MSFS will occur. + +#### Know Issues + +- If you enable touch support for a pop out panel, please do not you use a mouse to click the panel. It will register extra click since the app's code simulate a left mouse click when touch. + +- A MSFS click through bug where pop out panel also appears on the main game screen. Touch will not register correctly in the section of the pop out panel where the relative position of the panel corresponds to where the panel is located on the main game screen. + +- When a click through occurs on non-instrumentation panel items such as throttle or switches, even though the switches will not accidentally get clicked, touch response in pop out panel may not work. Just touching a little bit to the left/right in the pop out panel may register your touch event correctly and trigger your intend target. + +- To do a drag such a scrollbar, hold down your finger a little longer then usual and drag your finger. Some scrollbars also has a very narrow touch target and they will be hard to drag. The bigger your touch display and pop out panel size, the easier for touch the register the correct target. + +- If touch suddenly becomes unresponsive, please try to change the main view of the game such as looking left/right using keyboard shortcut. This will sometime reset the mouse coordinate where you touch the pop out panel. + ## User Profile Data Files The user plane profile data and application settings data are stored as JSON files under the following folder path. * userdata/userprofiledata.json + + Stored your various plane profiles. + * userdata/appsettingdata.json + + Stored your application preference settings. + * userdata/autoupdate.json + Stored the application auto update information. This file can be deleted if you want to reset your update status. + +You can backup this folder and restore this folder if you want to uninstall and reinstall MSFS Pop Out Manager or to download prelease version of application to try out. +
## Current Known Issue @@ -139,6 +198,12 @@ The user plane profile data and application settings data are stored as JSON fil * If you encounter an issue with panels that are not restored back to your saved profile locations, please check if you have other apps such as Sizer or Windows PowerToys that may have conflict with Pop Out Manager. +* If you encounter a critical error with error message like this: + + ERROR MSFSPopoutPanelManager.WpfApp.App - Could not load file or assembly 'Microsoft.FlightSimulator.SimConnect, Version=11.0.62651.3, Culture=neutral, PublicKeyToken=baf445ffb3a06b5c'. An attempt was made to load a program with an incorrect format. System.BadImageFormatException: + + This usually happens on clean Windows installation. Pop Out Panel Manager uses x64 version of SimConnect.dll to perform its function and a Visaul C++ redistributable is required for SimConnect to run correctly. Please download and install the following [VC++ redistributable](https://aka.ms/vs/17/release/vc_redist.x64.exe) on your PC to resolve this issue. Further information can be obtained in this [support ticket](https://github.com/hawkeye-stan/msfs-popout-panel-manager/issues/21). + ## Author Stanley Kwok diff --git a/Shared/Shared.csproj b/Shared/Shared.csproj index bfdb97f..0f6c487 100644 --- a/Shared/Shared.csproj +++ b/Shared/Shared.csproj @@ -9,10 +9,10 @@ Stanley Kwok Stanley Kwok 2021 https://github.com/hawkeye-stan/msfs-popout-panel-manager - 3.4.0.0 + 3.3.4.0 AnyCPU;x64 true - 3.4.0.0 + 3.3.4.0 diff --git a/VERSION.md b/VERSION.md index 8d97c3d..fb6c1c6 100644 --- a/VERSION.md +++ b/VERSION.md @@ -1,6 +1,13 @@ # Version History
+## Version 3.3.4 +* Fixed issue when using Auto Pop Out Panel feature in conjunction with Auto Disable Track IR setting. When performing cold start on G1000 / G1000 NXi equipped plane with Power on required checked, PFD and MFD fail to turn on or they will turn off by themselves. This resulted in pop out process to fail. +* Fixed issue when using Auto Pop Out Panel and the game is in Windows mode, Pop Out Manager fails to automatically click the "Ready to Fly" button. +* Made improvements to the detection of flight start and flight end. This help to resolve an issue when exiting a flight, Pop Out Manager tries to pop out panels again. +* Added touch enabled panel experimental feature. Please see github repo README.md on how to use this feature. This feature tries to workaround an outstanding issue regarding lack of support by MSFS with pop out that has touch component (GTN750, King Air 350, Built-in panels such as Check List, ATC, etc). +* Updated documentations and how to videos. + ## Version 3.3.3 * Fixed issue when clicking on "Show/Edit Panel Location Overlay" or setting auto TrackIR disabling option will cause PFD/MFD panels to be turned off when performing auto pop out in cold start for G1000 equipped planes. * Fixed issue where auto panning of cockpit view does not pan to previously saved camera view during pop out process. diff --git a/WpfApp/OnScreenMessageDialog.xaml.cs b/WpfApp/OnScreenMessageDialog.xaml.cs index 480c5e1..9dfe205 100644 --- a/WpfApp/OnScreenMessageDialog.xaml.cs +++ b/WpfApp/OnScreenMessageDialog.xaml.cs @@ -50,10 +50,6 @@ namespace MSFSPopoutPanelManager.WpfApp var x = Convert.ToInt32(rectangle.X + clientRectangle.Width / 2 - this.Width / 2); var y = Convert.ToInt32(rectangle.Y + clientRectangle.Height / 2 - this.Height / 2); - Debug.WriteLine($"Game Location: X:{rectangle.X} Y:{rectangle.Y}"); - Debug.WriteLine($"Game Rectangle: Width:{clientRectangle.Width} Height:{clientRectangle.Height}"); - Debug.WriteLine($"Message Dialog Location: X:{x} Y:{y}"); - PInvoke.MoveWindow(dialogHandle, x, y, Convert.ToInt32(this.Width), Convert.ToInt32(this.Height), false); } } diff --git a/WpfApp/UserControlPanelSelection.xaml b/WpfApp/UserControlPanelSelection.xaml index fe77524..dfc7315 100644 --- a/WpfApp/UserControlPanelSelection.xaml +++ b/WpfApp/UserControlPanelSelection.xaml @@ -92,7 +92,7 @@