mirror of
https://github.com/hawkeye-stan/msfs-popout-panel-manager.git
synced 2024-11-21 13:20:11 +00:00
Update pop out logic and home cockpit mode logic
This commit is contained in:
parent
1999a5c84f
commit
f1f8005820
12 changed files with 146 additions and 94 deletions
|
@ -11,9 +11,9 @@
|
|||
<PackageProjectUrl>https://github.com/hawkeye-stan/msfs-popout-panel-manager</PackageProjectUrl>
|
||||
<RootNamespace>MSFSPopoutPanelManager.DomainModel</RootNamespace>
|
||||
<Platforms>x64</Platforms>
|
||||
<Version>4.0.2.2</Version>
|
||||
<AssemblyVersion>4.0.2.2</AssemblyVersion>
|
||||
<FileVersion>4.0.2.2</FileVersion>
|
||||
<Version>4.0.2.3</Version>
|
||||
<AssemblyVersion>4.0.2.3</AssemblyVersion>
|
||||
<FileVersion>4.0.2.3</FileVersion>
|
||||
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
||||
<DebugType>Embedded</DebugType>
|
||||
<Configurations>Debug;Release;Local</Configurations>
|
||||
|
|
|
@ -19,6 +19,7 @@ namespace MSFSPopoutPanelManager.DomainModel.Profile
|
|||
PanelConfigs = new ObservableCollection<PanelConfig>();
|
||||
ProfileSetting = new ProfileSetting();
|
||||
MsfsGameWindowConfig = new MsfsGameWindowConfig();
|
||||
HomeCockpitModeZoomFactor = 50;
|
||||
|
||||
this.PropertyChanged += (sender, e) =>
|
||||
{
|
||||
|
@ -74,6 +75,8 @@ namespace MSFSPopoutPanelManager.DomainModel.Profile
|
|||
|
||||
public MsfsGameWindowConfig MsfsGameWindowConfig { get; set; }
|
||||
|
||||
public int HomeCockpitModeZoomFactor { get; set; }
|
||||
|
||||
public int CompareTo(UserProfile other)
|
||||
{
|
||||
int result = this.Name.ToLower().CompareTo(other.Name.ToLower());
|
||||
|
|
|
@ -7,7 +7,7 @@ namespace MSFSPopoutPanelManager.DomainModel.Setting
|
|||
public KeyboardShortcutSetting()
|
||||
{
|
||||
IsEnabled = true;
|
||||
StartPopOutKeyBinding = "P";
|
||||
StartPopOutKeyBinding = "O";
|
||||
}
|
||||
|
||||
public bool IsEnabled { get; set; }
|
||||
|
|
|
@ -14,9 +14,9 @@
|
|||
<RootNamespace>MSFSPopoutPanelManager.MainApp</RootNamespace>
|
||||
<ApplicationIcon>logo.ico</ApplicationIcon>
|
||||
<Platforms>x64</Platforms>
|
||||
<Version>4.0.2.2</Version>
|
||||
<AssemblyVersion>4.0.2.2</AssemblyVersion>
|
||||
<FileVersion>4.0.2.2</FileVersion>
|
||||
<Version>4.0.2.3</Version>
|
||||
<AssemblyVersion>4.0.2.3</AssemblyVersion>
|
||||
<FileVersion>4.0.2.3</FileVersion>
|
||||
<DebugType>embedded</DebugType>
|
||||
<SatelliteResourceLanguages>en</SatelliteResourceLanguages>
|
||||
<!-- Publishing options -->
|
||||
|
|
|
@ -11,9 +11,9 @@
|
|||
<PackageProjectUrl>https://github.com/hawkeye-stan/msfs-popout-panel-manager</PackageProjectUrl>
|
||||
<RootNamespace>MSFSPopoutPanelManager.Orchestration</RootNamespace>
|
||||
<Platforms>x64</Platforms>
|
||||
<Version>4.0.2.2</Version>
|
||||
<AssemblyVersion>4.0.2.2</AssemblyVersion>
|
||||
<FileVersion>4.0.2.2</FileVersion>
|
||||
<Version>4.0.2.3</Version>
|
||||
<AssemblyVersion>4.0.2.3</AssemblyVersion>
|
||||
<FileVersion>4.0.2.3</FileVersion>
|
||||
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
||||
<DebugType>Embedded</DebugType>
|
||||
<Configurations>Debug;Release;Local</Configurations>
|
||||
|
|
|
@ -15,6 +15,8 @@ namespace MSFSPopoutPanelManager.Orchestration
|
|||
{
|
||||
// This will be replaced by a signal from Ready to Fly Skipper into webserver in version 4.0
|
||||
private const int READY_TO_FLY_BUTTON_APPEARANCE_DELAY = 2000;
|
||||
private const int CAMERA_VIEW_HOME_COCKPIT_MODE = 8;
|
||||
private const int CAMERA_VIEW_CUSTOM_CAMERA = 7;
|
||||
|
||||
private ProfileData _profileData;
|
||||
private AppSettingData _appSettingData;
|
||||
|
@ -110,6 +112,8 @@ namespace MSFSPopoutPanelManager.Orchestration
|
|||
|
||||
await StepPostPopout();
|
||||
|
||||
OnPopOutCompleted?.Invoke(this, null);
|
||||
|
||||
StatusMessageWriter.IsEnabled = false;
|
||||
}
|
||||
|
||||
|
@ -195,6 +199,12 @@ namespace MSFSPopoutPanelManager.Orchestration
|
|||
{
|
||||
StatusMessageWriter.WriteMessageWithNewLine("Setting auto panning camera view", StatusMessageType.Info);
|
||||
|
||||
if (_flightSimData.CameraViewTypeAndIndex1 == CAMERA_VIEW_HOME_COCKPIT_MODE)
|
||||
{
|
||||
SetCockpitZoomLevel(_profileData.ActiveProfile.HomeCockpitModeZoomFactor);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Remember current game's zoom level to be recall after pop out
|
||||
_prePopOutCockpitZoomLevel = _flightSimData.CockpitCameraZoom;
|
||||
|
||||
|
@ -215,6 +225,7 @@ namespace MSFSPopoutPanelManager.Orchestration
|
|||
SetCockpitZoomLevel(50);
|
||||
}, true);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -412,9 +423,6 @@ namespace MSFSPopoutPanelManager.Orchestration
|
|||
StatusMessageWriter.WriteMessageWithNewLine("Pop out has been completed with error.", StatusMessageType.Info);
|
||||
else
|
||||
StatusMessageWriter.WriteMessageWithNewLine("Pop out has been completed successfully.", StatusMessageType.Info);
|
||||
|
||||
Thread.Sleep(1000);
|
||||
OnPopOutCompleted?.Invoke(this, null);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -523,6 +531,12 @@ namespace MSFSPopoutPanelManager.Orchestration
|
|||
|
||||
StatusMessageWriter.WriteMessageWithNewLine("Applying cockpit view after pop out", StatusMessageType.Info);
|
||||
|
||||
if (_flightSimData.CameraViewTypeAndIndex1 == CAMERA_VIEW_HOME_COCKPIT_MODE)
|
||||
{
|
||||
FlightSimOrchestrator.ResetCameraView();
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (AppSetting.PopOutSetting.AfterPopOutCameraView.CameraView)
|
||||
{
|
||||
case AfterPopOutCameraViewType.CockpitCenterView:
|
||||
|
@ -559,6 +573,7 @@ namespace MSFSPopoutPanelManager.Orchestration
|
|||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private bool CheckForPopOutError()
|
||||
{
|
||||
|
@ -583,8 +598,8 @@ namespace MSFSPopoutPanelManager.Orchestration
|
|||
for(var i = 0; i < retry; i++)
|
||||
{
|
||||
InputEmulationManager.LoadCustomView(keybinding);
|
||||
Thread.Sleep(1000); // wait for flightsimdata to be updated
|
||||
if (_flightSimData.CameraViewTypeAndIndex1 == 7) // 7 = custom camera view enum
|
||||
Thread.Sleep(750); // wait for flightsimdata to be updated
|
||||
if (_flightSimData.CameraViewTypeAndIndex1 == CAMERA_VIEW_CUSTOM_CAMERA) // custom camera view enum
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -595,7 +610,7 @@ namespace MSFSPopoutPanelManager.Orchestration
|
|||
for (var i = 0; i < retry; i++)
|
||||
{
|
||||
FlightSimOrchestrator.SetCockpitCameraZoomLevel(zoom);
|
||||
Thread.Sleep(1000); // wait for flightsimdata to be updated
|
||||
Thread.Sleep(750); // wait for flightsimdata to be updated
|
||||
|
||||
if (_flightSimData.CockpitCameraZoom == zoom)
|
||||
break;
|
||||
|
|
|
@ -11,6 +11,9 @@ namespace MSFSPopoutPanelManager.Orchestration
|
|||
{
|
||||
public class PanelSourceOrchestrator : ObservableObject
|
||||
{
|
||||
private const int CAMERA_VIEW_HOME_COCKPIT_MODE = 8;
|
||||
private const int CAMERA_VIEW_CUSTOM_CAMERA = 7;
|
||||
|
||||
private ProfileData _profileData;
|
||||
private AppSettingData _appSettingData;
|
||||
private FlightSimData _flightSimData;
|
||||
|
@ -62,8 +65,17 @@ namespace MSFSPopoutPanelManager.Orchestration
|
|||
if (AppSetting.PopOutSetting.AutoPanning.IsEnabled)
|
||||
{
|
||||
_prePanelConfigurationCockpitZoomLevel = _flightSimData.CockpitCameraZoom;
|
||||
|
||||
if(_flightSimData.CameraViewTypeAndIndex1 == CAMERA_VIEW_HOME_COCKPIT_MODE)
|
||||
{
|
||||
FlightSimOrchestrator.SetCockpitCameraZoomLevel(_profileData.ActiveProfile.HomeCockpitModeZoomFactor);
|
||||
}
|
||||
else
|
||||
{
|
||||
LoadCustomView(AppSetting.PopOutSetting.AutoPanning.KeyBinding);
|
||||
SetCockpitZoomLevel(50);
|
||||
}
|
||||
|
||||
WindowActionManager.BringWindowToForeground(ApplicationHandle);
|
||||
}
|
||||
});
|
||||
|
@ -88,20 +100,33 @@ namespace MSFSPopoutPanelManager.Orchestration
|
|||
// Save last auto panning camera angle
|
||||
if (AppSetting.PopOutSetting.AutoPanning.IsEnabled)
|
||||
{
|
||||
// !!! Fix MSFS bug that without setting zoom, everything will be off by few pixels
|
||||
FlightSimOrchestrator.SetCockpitCameraZoomLevel(_flightSimData.CockpitCameraZoom);
|
||||
|
||||
// If using windows mode, save MSFS game window configuration
|
||||
if (_appSettingData.ApplicationSetting.WindowedModeSetting.AutoResizeMsfsGameWindow)
|
||||
_profileData.SaveMsfsGameWindowConfig();
|
||||
|
||||
if (_flightSimData.CameraViewTypeAndIndex1 == CAMERA_VIEW_HOME_COCKPIT_MODE)
|
||||
{
|
||||
_profileData.ActiveProfile.HomeCockpitModeZoomFactor = _flightSimData.CockpitCameraZoom;
|
||||
}
|
||||
else
|
||||
{
|
||||
// !!! Fix MSFS bug that without setting zoom, everything will be off by few pixels
|
||||
FlightSimOrchestrator.SetCockpitCameraZoomLevel(_flightSimData.CockpitCameraZoom);
|
||||
|
||||
InputEmulationManager.SaveCustomView(AppSetting.PopOutSetting.AutoPanning.KeyBinding);
|
||||
}
|
||||
}
|
||||
|
||||
await Task.Run(() =>
|
||||
{
|
||||
Thread.Sleep(500); // wait for custom view save to be completed
|
||||
|
||||
if (_flightSimData.CameraViewTypeAndIndex1 == CAMERA_VIEW_HOME_COCKPIT_MODE)
|
||||
{
|
||||
FlightSimOrchestrator.ResetCameraView();
|
||||
}
|
||||
else
|
||||
{
|
||||
// Recenter game or return to after pop out camera view
|
||||
if (!AppSetting.PopOutSetting.AfterPopOutCameraView.IsEnabled)
|
||||
{
|
||||
|
@ -122,6 +147,7 @@ namespace MSFSPopoutPanelManager.Orchestration
|
|||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
WindowActionManager.BringWindowToForeground(ApplicationHandle);
|
||||
|
||||
|
@ -195,7 +221,7 @@ namespace MSFSPopoutPanelManager.Orchestration
|
|||
{
|
||||
InputEmulationManager.LoadCustomView(keybinding);
|
||||
Thread.Sleep(750); // wait for flightsimdata to be updated
|
||||
if (_flightSimData.CameraViewTypeAndIndex1 == 7) // 7 = custom camera view enum
|
||||
if (_flightSimData.CameraViewTypeAndIndex1 == CAMERA_VIEW_CUSTOM_CAMERA) // custom camera view enum
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,12 +1,16 @@
|
|||
## Version 4.0.2
|
||||
********* NOTE: The speed for Pop Out Panel Manager to execute pop outs will be slower than previous version because latest version MSFS had made existing POPM logic to not work reliably. Updated pop out logic requires wider timing threshold which unfortunately resulted in slower pop out speed. *********
|
||||
|
||||
* Added new logic to detect when flight session is ready to initiate pop out process for auto pop out panel.
|
||||
|
||||
* Updated logic to load custom camera view when performing pop out. The new logic is more reliable but unfornately will be a little slower because MSFS AAU2 may have introduced issue in loading and saving camera view. Pop out progress messages will show steps being taken when adjusting camera view.
|
||||
* Updated logic to save and load custom camera view when performing pop out to workaround AAU2 issues. Pop out progress messages will now show steps being taken when adjusting camera view.
|
||||
|
||||
* Added workaround for MSFS bug when using cockpit camera zoom setting is set with value other than 50 in MSFS general options. Pop out was failing before because saving and loading custom camera view does not work correctly in MSFS.
|
||||
|
||||
* Added workaround for CJ4 CDU panel not popping out because of MSFS bug.
|
||||
|
||||
* Added configurable keyboard shortcut to initiate pop out process (default is Ctrl-Shift-P). This keyboard shortcut can be configured in preference setting. This setting can be disabled to improve computing resource needed to constantly detect keyboard inputs.
|
||||
* Added configurable keyboard shortcut to initiate pop out process (default is Ctrl-Shift-O). This keyboard shortcut can be configured in preference setting. This setting can be disabled to improve computing resource needed to constantly detect keyboard inputs.
|
||||
|
||||
* Added separate logic to configure panels if using camera options of Home Cockpit Mode. Since in this mode, saving and loading of custom camera angle to define pop out panels is not avaible, new updated logic is needed.
|
||||
|
||||
* Fixed issue where full screen mode for pop out panel does not work on certain aircraft configuration.
|
|
@ -11,9 +11,9 @@
|
|||
<PackageProjectUrl>https://github.com/hawkeye-stan/msfs-popout-panel-manager</PackageProjectUrl>
|
||||
<RootNamespace>MSFSPopoutPanelManager.Shared</RootNamespace>
|
||||
<Platforms>x64</Platforms>
|
||||
<Version>4.0.2.2</Version>
|
||||
<AssemblyVersion>4.0.2.2</AssemblyVersion>
|
||||
<FileVersion>4.0.2.2</FileVersion>
|
||||
<Version>4.0.2.3</Version>
|
||||
<AssemblyVersion>4.0.2.3</AssemblyVersion>
|
||||
<FileVersion>4.0.2.3</FileVersion>
|
||||
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
||||
<DebugType>Embedded</DebugType>
|
||||
<Configurations>Debug;Release;Local</Configurations>
|
||||
|
|
|
@ -11,9 +11,9 @@
|
|||
<PackageProjectUrl>https://github.com/hawkeye-stan/msfs-popout-panel-manager</PackageProjectUrl>
|
||||
<RootNamespace>MSFSPopoutPanelManager.SimConnectAgent</RootNamespace>
|
||||
<Platforms>x64</Platforms>
|
||||
<Version>4.0.2.2</Version>
|
||||
<AssemblyVersion>4.0.2.2</AssemblyVersion>
|
||||
<FileVersion>4.0.2.2</FileVersion>
|
||||
<Version>4.0.2.3</Version>
|
||||
<AssemblyVersion>4.0.2.3</AssemblyVersion>
|
||||
<FileVersion>4.0.2.3</FileVersion>
|
||||
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
||||
<DebugType>Embedded</DebugType>
|
||||
<Configurations>Debug;Release;Local</Configurations>
|
||||
|
|
|
@ -2,15 +2,19 @@
|
|||
<hr/>
|
||||
|
||||
## Version 4.0.2
|
||||
********* NOTE: The speed for Pop Out Panel Manager to execute pop outs will be slower than previous version because latest version MSFS had made existing POPM logic to not work reliably. Updated pop out logic requires wider timing threshold which unfortunately resulted in slower pop out speed. *********
|
||||
|
||||
* Added new logic to detect when flight session is ready to initiate pop out process for auto pop out panel.
|
||||
|
||||
* Updated logic to load custom camera view when performing pop out. The new logic is more reliable but unfornately will be a little slower because MSFS AAU2 may have introduced issue in loading and saving camera view. Pop out progress messages will show steps being taken when adjusting camera view.
|
||||
* Updated logic to save and load custom camera view when performing pop out to workaround AAU2 issues. Pop out progress messages will now show steps being taken when adjusting camera view.
|
||||
|
||||
* Added workaround for MSFS bug when using cockpit camera zoom setting is set with value other than 50 in MSFS general options. Pop out was failing before because saving and loading custom camera view does not work correctly in MSFS.
|
||||
|
||||
* Added workaround for CJ4 CDU panel not popping out because of MSFS bug.
|
||||
|
||||
* Added configurable keyboard shortcut to initiate pop out process (default is Ctrl-Shift-P). This keyboard shortcut can be configured in preference setting. This setting can be disabled to improve computing resource needed to constantly detect keyboard inputs.
|
||||
* Added configurable keyboard shortcut to initiate pop out process (default is Ctrl-Shift-O). This keyboard shortcut can be configured in preference setting. This setting can be disabled to improve computing resource needed to constantly detect keyboard inputs.
|
||||
|
||||
* Added separate logic to configure panels if using camera options of Home Cockpit Mode. Since in this mode, saving and loading of custom camera angle to define pop out panels is not avaible, new updated logic is needed.
|
||||
|
||||
* Fixed issue where full screen mode for pop out panel does not work on certain aircraft configuration.
|
||||
|
||||
|
|
|
@ -11,9 +11,9 @@
|
|||
<PackageProjectUrl>https://github.com/hawkeye-stan/msfs-popout-panel-manager</PackageProjectUrl>
|
||||
<RootNamespace>MSFSPopoutPanelManager.WindowsAgent</RootNamespace>
|
||||
<Platforms>x64</Platforms>
|
||||
<Version>4.0.2.2</Version>
|
||||
<AssemblyVersion>4.0.2.2</AssemblyVersion>
|
||||
<FileVersion>4.0.2.2</FileVersion>
|
||||
<Version>4.0.2.3</Version>
|
||||
<AssemblyVersion>4.0.2.3</AssemblyVersion>
|
||||
<FileVersion>4.0.2.3</FileVersion>
|
||||
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
||||
<DebugType>Embedded</DebugType>
|
||||
<Configurations>Debug;Release;Local</Configurations>
|
||||
|
|
Loading…
Reference in a new issue