1
0
Fork 0
mirror of https://github.com/hawkeye-stan/msfs-popout-panel-manager.git synced 2024-10-16 06:00:45 +00:00

Version 3.4.4 Release

This commit is contained in:
Stanley 2022-10-08 07:51:46 -04:00
parent 023a474fda
commit f6923e7a4d
13 changed files with 207 additions and 67 deletions

View file

@ -0,0 +1,160 @@
#include <Joystick.h>
#include <NewEncoder.h>
// Rotary Encoder Inputs
#define CLK1 19
#define DT1 18
#define SW1 17
#define CLK2 2
#define DT2 3
#define SW2 4
#define VRx A0
#define VRy A1
#define JSW 8
// Rotatry encoder variables
int currentStateCLK1;
int lastStateCLK1;
int currentStateCLK2;
int lastStateCLK2;
String currentEvent = "";
String currentDir1 = "";
String currentDir2 = "";
boolean rotaryEncoderRotating1 = false;
boolean rotaryEncoderRotating2 = false;
unsigned long lastButton1Press = 0;
unsigned long lastButton2Press = 0;
Joystick joystick(VRx, VRy, JSW);
NewEncoder encoderLower(DT1, CLK1, -32768, 32767, 0, FULL_PULSE);
NewEncoder encoderUpper(DT2, CLK2, -32768, 32767, 0, FULL_PULSE);
int16_t prevEncoderValueLower;
int16_t prevEncoderValueUpper;
void setup() {
// Set encoder pins as inputs
pinMode(SW1, INPUT_PULLUP);
pinMode(SW2, INPUT_PULLUP);
// Setup joystick
joystick.initialize();
joystick.calibrate();
joystick.setSensivity(3);
// Setup Serial Monitor
Serial.begin(9600);
NewEncoder::EncoderState encoderState1;
NewEncoder::EncoderState encoderState2;
encoderLower.begin();
encoderLower.getState(encoderState1);
prevEncoderValueLower = encoderState1.currentValue;
encoderUpper.begin();
encoderUpper.getState(encoderState2);
prevEncoderValueUpper = encoderState2.currentValue;
}
void loop() {
int16_t currentEncoderValueLower;
int16_t currentEncoderValueUpper;
NewEncoder::EncoderState currentEncoderStateLower;
NewEncoder::EncoderState currentEncoderStateUpper;
// Read rotary encoder lower
if (encoderLower.getState(currentEncoderStateLower)) {
currentEncoderValueLower = currentEncoderStateLower.currentValue;
if (currentEncoderValueLower != prevEncoderValueLower) {
if(currentEncoderValueLower > prevEncoderValueLower){
Serial.println("EncoderLower:CW:" + String(currentEncoderValueLower - prevEncoderValueLower));
}
else{
Serial.println("EncoderLower:CCW:" + String(prevEncoderValueLower - currentEncoderValueLower));
}
prevEncoderValueLower = currentEncoderValueLower;
}
}
// Read rotary encoder upper
if (encoderUpper.getState(currentEncoderStateUpper)) {
currentEncoderValueUpper = currentEncoderStateUpper.currentValue;
if (currentEncoderValueUpper != prevEncoderValueUpper) {
if(currentEncoderValueUpper > prevEncoderValueUpper){
Serial.println("EncoderUpper:CW:" + String(currentEncoderValueUpper - prevEncoderValueUpper));
}
else{
Serial.println("EncoderUpper:CCW:" + String(prevEncoderValueUpper - currentEncoderValueUpper));
}
prevEncoderValueUpper = currentEncoderValueUpper;
}
}
// Read the rotary encoder button state
int btnState1 = digitalRead(SW1);
int btnState2 = digitalRead(SW2);
//If we detect LOW signal, button is pressed
if (btnState1 == LOW) {
//if 500ms have passed since last LOW pulse, it means that the
//button has been pressed, released and pressed again
if (millis() - lastButton1Press > 500) {
Serial.println("EncoderLower:SW");
}
// Remember last button press event
lastButton1Press = millis();
}
if (btnState2 == LOW) {
//if 500ms have passed since last LOW pulse, it means that the
//button has been pressed, released and pressed again
if (millis() - lastButton2Press > 500) {
Serial.println("EncoderUpper:SW");
}
// Remember last button press event
lastButton2Press = millis();
}
// Read joystick
if(joystick.isPressed())
{
Serial.println("Joystick:SW");
}
if(joystick.isReleased())
{
// left
if(joystick.isLeft())
{
Serial.println("Joystick:UP");
}
// right
if(joystick.isRight())
{
Serial.println("Joystick:DOWN");
}
// up
if(joystick.isUp())
{
Serial.println("Joystick:RIGHT");
}
// down
if(joystick.isDown())
{
Serial.println("Joystick:LEFT");
}
}
// slow down a bit
delay(200);
}

View file

@ -10,9 +10,9 @@
<PackageProjectUrl>https://github.com/hawkeye-stan/msfs-popout-panel-manager</PackageProjectUrl>
<RootNamespace>MSFSPopoutPanelManager.ArduinoAgent</RootNamespace>
<Platforms>x64</Platforms>
<Version>3.4.4.0923</Version>
<AssemblyVersion>3.4.4.0923</AssemblyVersion>
<FileVersion>3.4.4.0923</FileVersion>
<Version>3.4.4.1008</Version>
<AssemblyVersion>3.4.4.1008</AssemblyVersion>
<FileVersion>3.4.4.1008</FileVersion>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<DebugType>Embedded</DebugType>
<Configurations>Debug;Release;DebugTouchPanel;ReleaseTouchPanel</Configurations>

View file

@ -10,9 +10,9 @@
<PackageProjectUrl>https://github.com/hawkeye-stan/msfs-popout-panel-manager</PackageProjectUrl>
<RootNamespace>MSFSPopoutPanelManager.Orchestration</RootNamespace>
<Platforms>x64</Platforms>
<Version>3.4.4.0923</Version>
<AssemblyVersion>3.4.4.0923</AssemblyVersion>
<FileVersion>3.4.4.0923</FileVersion>
<Version>3.4.4.1008</Version>
<AssemblyVersion>3.4.4.1008</AssemblyVersion>
<FileVersion>3.4.4.1008</FileVersion>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<DebugType>Embedded</DebugType>
<Configurations>Debug;Release;DebugTouchPanel;ReleaseTouchPanel</Configurations>

View file

@ -16,16 +16,16 @@ Please follow [FlightSimulator.com](https://forums.flightsimulator.com/t/msfs-po
## Touch Panel Feature
With SU10 Beta v1.27.11+, Asobo seems to have fix a major [bug](#touch-enable-pop-out-feature) (in SU9 and before) that stops Pop Out Panel Manager's touch panel feature from working reliably. I'm happy to announce touch enabled feature works pretty well out of the box on either direct connected touch monitor or on pop out window that is displayed on tablet using software tool such as SpaceDesk. Until Asobo actually allow touch passthrough for panels, this tool can serve as a stopgap solution.
I'm happy to announce touch enabled feature works pretty well out of the box with the release of MSFS SU10 on either direct connected touch monitor or on pop out window that is displayed on tablet using software tool such as SpaceDesk. Until Asobo actually allow touch passthrough for panels, this tool can serve as a stopgap solution.
I've tested touch operation on GTN750, GTN530, KingAir PFD/MFD, TMB 930 FMS, Flybywire A32NX EFB and they are operational. Please report any issues that you encounter when using touch enable feature. There is still lots of room for improvement and I'll continue my effort to make touch work better and better.
I've tested touch operation on GTN750, GTN530, KingAir PFD/MFD, TMB 930 FMS, Flybywire A32NX EFB and they are operational. Please report any issues that you encounter when using touch enable feature. There is still room for improvement and I'll continue my effort to make touch work better and better.
Things that work out of the box:
* General button click using touch
* Touch and drag such as when panning maps or using scrollbars
* Works on touch monitor or tablet with SpaceDesk
* Flight control will be regained after 0.5 second (adjustable) of touch inactivity on a panel. This will minimize the lost of flight control when when operating touch panel.
* Flight control will be regained after 0.5 second (adjustable) of touch inactivity on a panel. This will minimize current MSFS bug where lost of flight control when operating pop out panels.
If using SpaceDesk to host pop out panel display, since there is a latency for touch response in wireless display, your touch may not register consistently. Please go to Preferences => Touch Settings => Touch Down Touch Up Delay, and increase the value to 25ms or higher to increase touch sensitivity.
@ -149,7 +149,7 @@ The app will try to find a matching profile with the current selected aircraft.
[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:
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 and are not limited to:
- King Air 350
- PMS GTN750
@ -157,31 +157,16 @@ This feature will make pop out panel touch enabled on touch screen monitor or ta
- Lower touch panel in TBM 930
- Flybywire A32NX EFB
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.
This touch enabled pop out feature solved 2 limitations but currently in MSFS.
- 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 youre using Spacedesk with tablet by disabling USB HID within Spacedesk drivers in Windows device manager. But if youre using touch monitors directly connected to your gaming PC, then Spacedesk workaround is not an option.
- 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 cant operate flight control without clicking the game window again.
**EDITED (July 31st)** - Asobo have fixed the below bug in SU10 Beta v1.27.11. And hopefully it won't be broken 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 havent 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 theyre 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.~~
<p align="center">
<img src="assets/readme/images/touch_support_bug.png" width="900" hspace="10"/>
</p>
#### 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.
#### Known Issues
~~- 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.~~ **Fixed in SU10 Beta 1.27.11.**
~~- 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.~~ **Fixed in SU10 Beta 1.27.11.**
- 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.
<hr/>
## User Profile Data Files

View file

@ -11,9 +11,9 @@
<PackageProjectUrl>https://github.com/hawkeye-stan/msfs-popout-panel-manager</PackageProjectUrl>
<RootNamespace>MSFSPopoutPanelManager.Shared</RootNamespace>
<Platforms>x64</Platforms>
<Version>3.4.4.0923</Version>
<AssemblyVersion>3.4.4.0923</AssemblyVersion>
<FileVersion>3.4.4.0923</FileVersion>
<Version>3.4.4.1008</Version>
<AssemblyVersion>3.4.4.1008</AssemblyVersion>
<FileVersion>3.4.4.1008</FileVersion>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<DebugType>Embedded</DebugType>
<Configurations>Debug;Release;DebugTouchPanel;ReleaseTouchPanel</Configurations>

View file

@ -11,9 +11,9 @@
<PackageProjectUrl>https://github.com/hawkeye-stan/msfs-popout-panel-manager</PackageProjectUrl>
<RootNamespace>MSFSPopoutPanelManager.SimConnectAgent</RootNamespace>
<Platforms>x64</Platforms>
<Version>3.4.4.0923</Version>
<AssemblyVersion>3.4.4.0923</AssemblyVersion>
<FileVersion>3.4.4.0923</FileVersion>
<Version>3.4.4.1008</Version>
<AssemblyVersion>3.4.4.1008</AssemblyVersion>
<FileVersion>3.4.4.1008</FileVersion>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<DebugType>Embedded</DebugType>
<Configurations>Debug;Release;DebugTouchPanel;ReleaseTouchPanel</Configurations>

View file

@ -11,9 +11,9 @@
<PackageProjectUrl>https://github.com/hawkeye-stan/msfs-popout-panel-manager</PackageProjectUrl>
<RootNamespace>MSFSPopoutPanelManager.TouchPanelAgent</RootNamespace>
<Platforms>x64</Platforms>
<Version>3.4.4.0923</Version>
<AssemblyVersion>3.4.4.0923</AssemblyVersion>
<FileVersion>3.4.4.0923</FileVersion>
<Version>3.4.4.1008</Version>
<AssemblyVersion>3.4.4.1008</AssemblyVersion>
<FileVersion>3.4.4.1008</FileVersion>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<DebugType>Embedded</DebugType>
<Configurations>Debug;Release;DebugTouchPanel;ReleaseTouchPanel</Configurations>

View file

@ -10,9 +10,9 @@
<PackageProjectUrl>https://github.com/hawkeye-stan/msfs-popout-panel-manager</PackageProjectUrl>
<RootNamespace>MSFSPopoutPanelManager.UserDataAgent</RootNamespace>
<Platforms>x64</Platforms>
<Version>3.4.4.0923</Version>
<AssemblyVersion>3.4.4.0923</AssemblyVersion>
<FileVersion>3.4.4.0923</FileVersion>
<Version>3.4.4.1008</Version>
<AssemblyVersion>3.4.4.1008</AssemblyVersion>
<FileVersion>3.4.4.1008</FileVersion>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<DebugType>Embedded</DebugType>
<Configurations>Debug;Release;DebugTouchPanel;ReleaseTouchPanel</Configurations>

View file

@ -1,6 +1,14 @@
# Version History
<hr/>
## Version 3.4.4
* Updated pop out panels separation reliability on all monitor resolutions during panel pop out process. A new algorithm had been implemented to improve Pop Out Panel Manager accuracy when it tries to click on panel's "magnifying glass" icon to separate panels.
* Added flight control refocus support for RealSimGear GTN750 Generation 1 when using touch enabled feature.
* Increased configurable maximum flight control refocus delay from 2 seconds to 10 seconds.
## Version 3.4.3
* Added ability to remember MSFS game window size and location for aircraft profile when running the game in windows display mode. This new preference setting is used to resize game window to match original size and location of MSFS game window when panel profile was defined initially. For existing aircraft profile, when running the game in windows display mode, the profile will automatically save MSFS game window position after the first successful pop out.

View file

@ -11,9 +11,9 @@
<PackageProjectUrl>https://github.com/hawkeye-stan/msfs-popout-panel-manager</PackageProjectUrl>
<RootNamespace>MSFSPopoutPanelManager.WebServer</RootNamespace>
<Platforms>x64</Platforms>
<Version>3.4.4.0923</Version>
<AssemblyVersion>3.4.4.0923</AssemblyVersion>
<FileVersion>3.4.4.0923</FileVersion>
<Version>3.4.4.1008</Version>
<AssemblyVersion>3.4.4.1008</AssemblyVersion>
<FileVersion>3.4.4.1008</FileVersion>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<DebugType>Embedded</DebugType>
<Configurations>Debug;Release;DebugTouchPanel;ReleaseTouchPanel</Configurations>

View file

@ -11,9 +11,9 @@
<PackageProjectUrl>https://github.com/hawkeye-stan/msfs-popout-panel-manager</PackageProjectUrl>
<RootNamespace>MSFSPopoutPanelManager.WindowsAgent</RootNamespace>
<Platforms>x64</Platforms>
<Version>3.4.4.0923</Version>
<AssemblyVersion>3.4.4.0923</AssemblyVersion>
<FileVersion>3.4.4.0923</FileVersion>
<Version>3.4.4.1008</Version>
<AssemblyVersion>3.4.4.1008</AssemblyVersion>
<FileVersion>3.4.4.1008</FileVersion>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<DebugType>Embedded</DebugType>
<Configurations>Debug;Release;DebugTouchPanel;ReleaseTouchPanel</Configurations>

View file

@ -14,9 +14,9 @@
<RootNamespace>MSFSPopoutPanelManager.WpfApp</RootNamespace>
<ApplicationIcon>logo.ico</ApplicationIcon>
<Platforms>x64</Platforms>
<Version>3.4.4.0923</Version>
<AssemblyVersion>3.4.4.0923</AssemblyVersion>
<FileVersion>3.4.4.0923</FileVersion>
<Version>3.4.4.1008</Version>
<AssemblyVersion>3.4.4.1008</AssemblyVersion>
<FileVersion>3.4.4.1008</FileVersion>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<DebugType>embedded</DebugType>
<SatelliteResourceLanguages>en</SatelliteResourceLanguages>

View file

@ -1,27 +1,14 @@
Version 3.4.3
Version 3.4.4
This release is optional and please feel to skip this update.
Change Log:
* Added ability to remember MSFS game window size and location for aircraft profile when
running the game in windows display mode. This new preference setting is used to resize
game window to match original size and location of MSFS game window when panel profile was
defined initially. For existing aircraft profile, when running the game in windows display
mode, the profile will automatically save MSFS game window position after the first
successful pop out.
* Updated pop out panels separation reliability on all monitor resolutions during panel pop
out process. A new algorithm had been implemented to improve Pop Out Panel Manager accuracy
when it tries to click on panel's "magnifying glass" icon to separate panels.
* Added ability to include in-game menu bar panels such as VFR Map, ATC, Checklist, etc to
aircraft profile. During the pop out process, if any in-game menu bar panels are in popped
out state, they will be included in panel configurations. This feature will only work if
in-game menu bar panels are popped out and if using in conjunction with auto pop out, it
relies on MSFS re-opens these panels when flight starts (SU 10+). This also allows in-game
menu bar panels to be touch enabled. Toggling the include in-game menu bar panels checkbox
for a profile will reset these panels' inclusion and configurations. When using this
feature with Auto Pop Out, there will be a delay in the pop out process to allow in-game
menu bar panels to appear on screen before they're being configured to previously defined
settings.
* Added flight control refocus support for RealSimGear GTN750 Generation 1 when using touch
enabled feature.
* Added UI cue to show number circles momentarily when popping out panel.
* Fixed an issue where touch does not work for panel when using full screen mode.
* Increased configurable maximum flight control refocus delay from 2 seconds to 10 seconds.