From 4899c213ed9c414db39582dd13a9d9bba72c4169 Mon Sep 17 00:00:00 2001 From: Brett Jenkins Date: Thu, 29 Sep 2022 22:24:38 +0100 Subject: [PATCH 1/2] Changes for VIZIX controller --- PilotsDeck_FNX2PLD/ElementManager.cs | 39 ++++---------------- PilotsDeck_FNX2PLD/PilotsDeck_FNX2PLD.csproj | 5 --- 2 files changed, 8 insertions(+), 36 deletions(-) diff --git a/PilotsDeck_FNX2PLD/ElementManager.cs b/PilotsDeck_FNX2PLD/ElementManager.cs index af12c5d..4fd392d 100644 --- a/PilotsDeck_FNX2PLD/ElementManager.cs +++ b/PilotsDeck_FNX2PLD/ElementManager.cs @@ -168,19 +168,14 @@ private void UpdateFCU(MemoryPattern fcu, bool isLightTest) result = "8888\n888*"; else { - if (isModeSpd) - result = "SPD\n"; - else - result = "MACH\n"; - if (isSpdManaged) - result += "---*"; + result = "---*"; else { if (isModeSpd) - result += ((int)Math.Round(fcu.MemoryOffsets["fcuSpd"].GetValue())).ToString(); + result = ((int)Math.Round(fcu.MemoryOffsets["fcuSpd"].GetValue())).ToString(); else - result += "." + ((int)Math.Round(fcu.MemoryOffsets["fcuSpd"].GetValue())).ToString(); + result = "." + ((int)Math.Round(fcu.MemoryOffsets["fcuSpd"].GetValue())).ToString(); } } } @@ -194,24 +189,19 @@ private void UpdateFCU(MemoryPattern fcu, bool isLightTest) result = "888\n888*"; else { - if (isModeHdgVs) - result = "HDG\n"; - else - result = "TRK\n"; - string hdgDisp = fcu.MemoryOffsets["fcuHdgDisplay"].GetValue()?.ToString("D3") ?? "000"; string hdgFma = fcu.MemoryOffsets["fcuHdgFma"].GetValue()?.ToString("D3") ?? "000"; if (isHdgManaged) { if (hdgDisp != "000") - result += hdgDisp + "*"; + result = hdgDisp + "*"; else - result += "---*"; + result = "---*"; } else { - result += hdgFma; + result = hdgFma; } } } @@ -242,19 +232,6 @@ private void UpdateFCU(MemoryPattern fcu, bool isLightTest) result = "888\n+8888"; else { - if (isModeHdgVs) - result = "V/S\n"; - else - result = "FPA\n"; - - //int vs = 0; - //if (isAltVs) - // vs = fcu.MemoryOffsets["fcuVsFma"].GetValue() ?? 0; - //else - // vs = fcu.MemoryOffsets["fcuVsDisplay"].GetValue() ?? 0; - - //if (!isAltVs) - // result += "-----"; int vs = fcu.MemoryOffsets["fcuVsDisplay"].GetValue() ?? 0; bool sourceIsDisplay = vs != 0; if (isAltVs) @@ -267,7 +244,7 @@ private void UpdateFCU(MemoryPattern fcu, bool isLightTest) if (vs >= 0) result += "+"; - result += vs.ToString("D4"); + result = vs.ToString("D4"); } else //fpa { @@ -275,7 +252,7 @@ private void UpdateFCU(MemoryPattern fcu, bool isLightTest) if (fpa >= 0.0f) result += "+"; - result += fpa.ToString("F1", formatInfo); + result = fpa.ToString("F1", formatInfo); } lastValueVS = vs; } diff --git a/PilotsDeck_FNX2PLD/PilotsDeck_FNX2PLD.csproj b/PilotsDeck_FNX2PLD/PilotsDeck_FNX2PLD.csproj index d008c40..dfbca70 100644 --- a/PilotsDeck_FNX2PLD/PilotsDeck_FNX2PLD.csproj +++ b/PilotsDeck_FNX2PLD/PilotsDeck_FNX2PLD.csproj @@ -31,9 +31,4 @@ Always - - - - - From 20bd0c682df0568dee2e6526359f7b64a30645c9 Mon Sep 17 00:00:00 2001 From: Brett Jenkins Date: Thu, 29 Sep 2022 22:32:55 +0100 Subject: [PATCH 2/2] Add Readme --- README.md | 33 +++++++++------------------------ 1 file changed, 9 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index f70076c..9cdfb7e 100644 --- a/README.md +++ b/README.md @@ -1,28 +1,13 @@ -# PilotsDeck_FNX -This Binary is used read out some (Quartz) Displays of the Fenix A320 and write their Data to FSUIPC Offsets. There PilotsDeck (or any other Application using FSUIPC basically) can pick it up to display it on the StreamDeck.
-To make one Thing directly clear: it is a **HACK**. Literally: It accesses the Process Memory directly (read-only!) to get the Data. It will likely break with the next Update (until I'll managed to find the correct Spots again).
Currently compatible with Fenix Version **1.0.3.128** and MSFS **SU10**.
+# PilotsDeck_VIZIX -# Installation -Put the Folder/Binary generally anywhere you want, but *don't* use: Any Application's Folder (e.g. MSFS, Fenix, StreamDeck) or any of the User Folders (Documents, Downloads, etc).
-You need at least FSUIPC7 Version **7.3.9** (current is 7.3.10)! Please make sure you install / update the WASM Module (its manifest.json should show 0.9.0).
+This is a fork of the briliant https://github.com/Fragtality/PilotsDeck_FNX with modifications to make it work better with the VIZIX autopilot controller. -It is designed to be started by FSUIPC - add this to your ini File: -``` -[Programs] -RunIf1=READY,KILL,X:\PATH\YOU\USED\PilotsDeck_FNX2PLD.exe -``` -But you can also start it manually when MSFS/FSUIPC are loaded (Main Menu). +Read their readme for more details but simply: -# Usage -If you don't start it automatically, make sure to start it after MSFS is in the Main Menu (and FSUIPC7 is running).
-When it is running (started either automatically or manually) just set up your Flight as you normally would. The Tool will wait in the Background until the Fenix becomes active.
-It waits 25 Seconds after the Fenix Executables are loaded before scanning the Memory - just make sure you hit "Ready to Fly" before the Time runs out! Else some Memory Locations can't be found (most often the Com Displays won't work - in that Case stop/start the Executable manually). You can configure the Delay to match your Loading Times / Behaviour.
-Note that this Application has no Window - you have to use Task Manager if you want to see if is running (it should close automatically after MSFS is closed).
-The Memory Scan usually takes under one Second and the time it takes for an Update Cycle is arround 0,3ms on average (on my System). - -# Configuration -You can configure some Parameters in the PilotsDeck_FNX2PLD.dll.config File: -- **offsetBase**: The first (FSUIPC) Offset Address to use (hexadecimal), defaults to 0x5408 -- **updateIntervall**: The time between each Update in Milliseconds, defaults to 50 -- **waitReady**: The time to wait before the User clicked "Ready to Fly" in Seconds, defaults to 25 +1) Make sure you have the latest version of FSUIPC installed +2) Put this .exe say C:\pilotsdeck\ +3) Run it (and FSUIPC) after MSFS has started +4) Load the Fenix A320 - PilotsDeck profile +5) Should magically work! +I'll try to keep this updated with the base repo, because as this is doing memory reading it's prone to breaking, but it works! \ No newline at end of file