Skip to content

Commit

Permalink
Fix Drag and Lift values not updating properly when their units chang…
Browse files Browse the repository at this point in the history
…e (e.g. mN -> N) - reported by Kayser
  • Loading branch information
Falki-git committed Mar 24, 2024
1 parent 8aa74bc commit 295423d
Showing 1 changed file with 4 additions and 24 deletions.
28 changes: 4 additions & 24 deletions src/MicroEngineer/Entries/FlightEntries.cs
Original file line number Diff line number Diff line change
Expand Up @@ -244,20 +244,10 @@ public TotalLift()

public override void RefreshData()
{
EntryValue = AeroForces.TotalLift;
EntryValue = AeroForces.TotalLift * 1000;
}

public override string ValueDisplay
{
get
{
if (EntryValue == null)
return "-";

double toReturn = (double)EntryValue * 1000;
return String.IsNullOrEmpty(base.Formatting) ? toReturn.ToString() : String.Format(base.Formatting, toReturn);
}
}
public override string ValueDisplay => base.ValueDisplay;
}

public class TotalDrag : FlightEntry
Expand All @@ -279,20 +269,10 @@ public TotalDrag()

public override void RefreshData()
{
EntryValue = AeroForces.TotalDrag;
EntryValue = AeroForces.TotalDrag * 1000;
}

public override string ValueDisplay
{
get
{
if (EntryValue == null)
return "-";

double toReturn = (double)EntryValue * 1000;
return String.IsNullOrEmpty(base.Formatting) ? toReturn.ToString() : String.Format(base.Formatting, toReturn);
}
}
public override string ValueDisplay => base.ValueDisplay;
}

public class LiftDivDrag : FlightEntry
Expand Down

0 comments on commit 295423d

Please sign in to comment.