Skip to content

Commit 2dc149e

Browse files
committed
Fixed: Would trigger services on other Planes (incorrect Process-Check) / Fixed: When using LBS the planned Fuel was converted to KGS
1 parent f9d31e0 commit 2dc149e

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

Fenix2GSX/Fenix2GSX.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<ApplicationIcon>phoenix.ico</ApplicationIcon>
1010
<PlatformTarget>x64</PlatformTarget>
1111
<Title>Fenix2GSX</Title>
12-
<Version>0.2.8</Version>
12+
<Version>0.2.9</Version>
1313
<Authors>Fragtality</Authors>
1414
<Copyright>Copyright © 2023</Copyright>
1515
<Description>GSX Integration and Automation for the Fenix A320</Description>

Fenix2GSX/FenixController.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,14 +125,17 @@ public void RefuelStart()
125125
{
126126
if (fuelCurrent > fuelPlanned)
127127
{
128-
Logger.Log(LogLevel.Information, "FenixController:RefuelStart", $"Current Fuel higher than planned - Resetting to 3000kg");
128+
Logger.Log(LogLevel.Information, "FenixController:RefuelStart", $"Current Fuel higher than planned - Resetting to 3000kg (6615lbs)");
129129
Interface.FenixPost(FenixInterface.MsgMutation("float", "aircraft.fuel.total.amount.kg", 3000.0f));
130130
fuelCurrent = 3000;
131131
}
132132

133133
Interface.FenixPost(FenixInterface.MsgMutation("float", "aircraft.refuel.refuelingRate", 0.0f));
134134
Interface.FenixPost(FenixInterface.MsgMutation("bool", "aircraft.refuel.refuelingPower", true));
135-
Interface.FenixPost(FenixInterface.MsgMutation("float", "aircraft.refuel.fuelTarget", fuelPlanned));
135+
if (fuelUnits == "KGS")
136+
Interface.FenixPost(FenixInterface.MsgMutation("float", "aircraft.refuel.fuelTarget", fuelPlanned));
137+
else
138+
Interface.FenixPost(FenixInterface.MsgMutation("float", "aircraft.refuel.fuelTarget", fuelPlanned * weightConversion));
136139
}
137140

138141
public bool Refuel()

Fenix2GSX/IPCManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public static bool WaitForSimulator(ServiceModel model)
4040
public static bool IsProcessRunning(string name)
4141
{
4242
Process proc = Process.GetProcessesByName(name).FirstOrDefault();
43-
return proc != null;
43+
return proc != null && proc.ProcessName == name;
4444
}
4545

4646
public static bool IsSimRunning()

0 commit comments

Comments
 (0)