Skip to content

Commit 575b845

Browse files
authored
Merge pull request #1 from brettjenkins/feature-make-work-with-vizix
Changes for VIZIX controller
2 parents 2573707 + 20bd0c6 commit 575b845

File tree

3 files changed

+17
-60
lines changed

3 files changed

+17
-60
lines changed

PilotsDeck_FNX2PLD/ElementManager.cs

Lines changed: 8 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -168,19 +168,14 @@ private void UpdateFCU(MemoryPattern fcu, bool isLightTest)
168168
result = "8888\n888*";
169169
else
170170
{
171-
if (isModeSpd)
172-
result = "SPD\n";
173-
else
174-
result = "MACH\n";
175-
176171
if (isSpdManaged)
177-
result += "---*";
172+
result = "---*";
178173
else
179174
{
180175
if (isModeSpd)
181-
result += ((int)Math.Round(fcu.MemoryOffsets["fcuSpd"].GetValue())).ToString();
176+
result = ((int)Math.Round(fcu.MemoryOffsets["fcuSpd"].GetValue())).ToString();
182177
else
183-
result += "." + ((int)Math.Round(fcu.MemoryOffsets["fcuSpd"].GetValue())).ToString();
178+
result = "." + ((int)Math.Round(fcu.MemoryOffsets["fcuSpd"].GetValue())).ToString();
184179
}
185180
}
186181
}
@@ -194,24 +189,19 @@ private void UpdateFCU(MemoryPattern fcu, bool isLightTest)
194189
result = "888\n888*";
195190
else
196191
{
197-
if (isModeHdgVs)
198-
result = "HDG\n";
199-
else
200-
result = "TRK\n";
201-
202192
string hdgDisp = fcu.MemoryOffsets["fcuHdgDisplay"].GetValue()?.ToString("D3") ?? "000";
203193
string hdgFma = fcu.MemoryOffsets["fcuHdgFma"].GetValue()?.ToString("D3") ?? "000";
204194

205195
if (isHdgManaged)
206196
{
207197
if (hdgDisp != "000")
208-
result += hdgDisp + "*";
198+
result = hdgDisp + "*";
209199
else
210-
result += "---*";
200+
result = "---*";
211201
}
212202
else
213203
{
214-
result += hdgFma;
204+
result = hdgFma;
215205
}
216206
}
217207
}
@@ -242,19 +232,6 @@ private void UpdateFCU(MemoryPattern fcu, bool isLightTest)
242232
result = "888\n+8888";
243233
else
244234
{
245-
if (isModeHdgVs)
246-
result = "V/S\n";
247-
else
248-
result = "FPA\n";
249-
250-
//int vs = 0;
251-
//if (isAltVs)
252-
// vs = fcu.MemoryOffsets["fcuVsFma"].GetValue() ?? 0;
253-
//else
254-
// vs = fcu.MemoryOffsets["fcuVsDisplay"].GetValue() ?? 0;
255-
256-
//if (!isAltVs)
257-
// result += "-----";
258235
int vs = fcu.MemoryOffsets["fcuVsDisplay"].GetValue() ?? 0;
259236
bool sourceIsDisplay = vs != 0;
260237
if (isAltVs)
@@ -267,15 +244,15 @@ private void UpdateFCU(MemoryPattern fcu, bool isLightTest)
267244
if (vs >= 0)
268245
result += "+";
269246

270-
result += vs.ToString("D4");
247+
result = vs.ToString("D4");
271248
}
272249
else //fpa
273250
{
274251
float fpa = vs / 1000.0f;
275252
if (fpa >= 0.0f)
276253
result += "+";
277254

278-
result += fpa.ToString("F1", formatInfo);
255+
result = fpa.ToString("F1", formatInfo);
279256
}
280257
lastValueVS = vs;
281258
}

PilotsDeck_FNX2PLD/PilotsDeck_FNX2PLD.csproj

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,4 @@
3131
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
3232
</None>
3333
</ItemGroup>
34-
35-
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
36-
<Exec Command="powershell -ExecutionPolicy Unrestricted -file &quot;$(ProjectDir)CopyToMSFS.ps1&quot; $(ConfigurationName)" />
37-
</Target>
38-
3934
</Project>

README.md

Lines changed: 9 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,13 @@
1-
# PilotsDeck_FNX
2-
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.<br/>
3-
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).<br/>Currently compatible with Fenix Version **1.0.3.128** and MSFS **SU10**.<br/>
1+
# PilotsDeck_VIZIX
42

5-
# Installation
6-
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).<br/>
7-
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).<br/>
3+
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.
84

9-
It is designed to be started by FSUIPC - add this to your ini File:
10-
```
11-
[Programs]
12-
RunIf1=READY,KILL,X:\PATH\YOU\USED\PilotsDeck_FNX2PLD.exe
13-
```
14-
But you can also start it manually when MSFS/FSUIPC are loaded (Main Menu).
5+
Read their readme for more details but simply:
156

16-
# Usage
17-
If you don't start it automatically, make sure to start it after MSFS is in the Main Menu (and FSUIPC7 is running).<br/>
18-
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.<br/>
19-
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.<br/>
20-
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).<br/>
21-
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).
22-
23-
# Configuration
24-
You can configure some Parameters in the PilotsDeck_FNX2PLD.dll.config File:
25-
- **offsetBase**: The first (FSUIPC) Offset Address to use (hexadecimal), defaults to 0x5408
26-
- **updateIntervall**: The time between each Update in Milliseconds, defaults to 50
27-
- **waitReady**: The time to wait before the User clicked "Ready to Fly" in Seconds, defaults to 25
7+
1) Make sure you have the latest version of FSUIPC installed
8+
2) Put this .exe say C:\pilotsdeck\
9+
3) Run it (and FSUIPC) after MSFS has started
10+
4) Load the Fenix A320 - PilotsDeck profile
11+
5) Should magically work!
2812

13+
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!

0 commit comments

Comments
 (0)