Skip to content

Commit 9bb14bd

Browse files
authored
Merge pull request #38 from Falki-git/dev
v1.8.1 Fixed Drag & Lift
2 parents f6c23aa + 2938aaf commit 9bb14bd

File tree

3 files changed

+6
-26
lines changed

3 files changed

+6
-26
lines changed

plugin_template/swinfo.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"name": "Micro Engineer",
66
"description": "Get in-flight and VAB information about your current vessel",
77
"source": "https://github.com/Falki-git/MicroEngineer",
8-
"version": "1.8.0",
8+
"version": "1.8.1",
99
"version_check": "https://raw.githubusercontent.com/Falki-git/MicroEngineer/master/plugin_template/swinfo.json",
1010
"ksp2_version": {
1111
"min": "0.2.0",

src/MicroEngineer/Entries/FlightEntries.cs

Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -244,20 +244,10 @@ public TotalLift()
244244

245245
public override void RefreshData()
246246
{
247-
EntryValue = AeroForces.TotalLift;
247+
EntryValue = AeroForces.TotalLift * 1000;
248248
}
249249

250-
public override string ValueDisplay
251-
{
252-
get
253-
{
254-
if (EntryValue == null)
255-
return "-";
256-
257-
double toReturn = (double)EntryValue * 1000;
258-
return String.IsNullOrEmpty(base.Formatting) ? toReturn.ToString() : String.Format(base.Formatting, toReturn);
259-
}
260-
}
250+
public override string ValueDisplay => base.ValueDisplay;
261251
}
262252

263253
public class TotalDrag : FlightEntry
@@ -279,20 +269,10 @@ public TotalDrag()
279269

280270
public override void RefreshData()
281271
{
282-
EntryValue = AeroForces.TotalDrag;
272+
EntryValue = AeroForces.TotalDrag * 1000;
283273
}
284274

285-
public override string ValueDisplay
286-
{
287-
get
288-
{
289-
if (EntryValue == null)
290-
return "-";
291-
292-
double toReturn = (double)EntryValue * 1000;
293-
return String.IsNullOrEmpty(base.Formatting) ? toReturn.ToString() : String.Format(base.Formatting, toReturn);
294-
}
295-
}
275+
public override string ValueDisplay => base.ValueDisplay;
296276
}
297277

298278
public class LiftDivDrag : FlightEntry

src/MicroEngineer/Utilities/TransferInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ private static bool CalculateParameters()
5656
from.localPosition = Utility.ActiveVessel.Orbit.Position.localPosition;
5757
from.currentOrbit = Utility.ActiveVessel.Orbit;
5858

59-
// Inner lookp => ActiveVessel (from)
59+
// Inner loop => ActiveVessel (from)
6060
for (int j = 0; j < numberOfLoopTries; j++)
6161
{
6262
if (from.referenceBody == to.referenceBody)

0 commit comments

Comments
 (0)