Skip to content

Commit

Permalink
add public accessible calculated max-ec-per-second power stat to moto…
Browse files Browse the repository at this point in the history
…r module for BonVoyage compatibility
  • Loading branch information
shadowmage45 committed Mar 19, 2017
1 parent 6229507 commit aae7dcf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Binary file modified GameData/KSPWheel/Plugin/KSPWheel.dll
Binary file not shown.
4 changes: 4 additions & 0 deletions VSProject/KSPWheel/PartModules/KSPWheelMotor.cs
Expand Up @@ -124,6 +124,9 @@ public class KSPWheelMotor : KSPWheelSubmodule
[KSPField]
public FloatCurve torqueCurve = new FloatCurve();

[KSPField]
public float maxECDraw = 0f;

public float torqueOutput;

private float powerCorrection = 4f;
Expand Down Expand Up @@ -425,6 +428,7 @@ private void calcPowerStats()
powerMidpoint = 1f / motorEfficiency * peakOutputPower;

peakInputPower = 1f * powerMidpoint * powerCorrection;
maxECDraw = peakInputPower / powerConversion;
minInputPower = motorPowerFactor * powerMidpoint * powerCorrection;

float radius = wheelData.scaledRadius(part.rescaleFactor * controller.scale);
Expand Down

0 comments on commit aae7dcf

Please sign in to comment.