Skip to content

Commit

Permalink
Merge pull request #89 from ZiwKerman/v2.0-overhaul
Browse files Browse the repository at this point in the history
Fix for acceleration not affecting Stop command.
  • Loading branch information
ZiwKerman committed Apr 21, 2016
2 parents 9790bb2 + 2c1b117 commit 5d03e6a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
Binary file not shown.
2 changes: 1 addition & 1 deletion InfernalRobotics/InfernalRobotics/Command/Interpolator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public void Update(float deltaT)
Logger.Log(string.Format("Update: targetPos={0}, cmdPos={1},min/maxpos={2},{3}", targetPos, CmdPosition, MinPosition, MaxPosition), Logger.Level.SuperVerbose);

if ((Math.Abs(Velocity) < maxDeltaVel) &&
(targetPos == Position) || (CmdVelocity == 0f))
((targetPos == Position) || (CmdVelocity == 0f)))
{
Active = false;
Velocity = 0;
Expand Down
14 changes: 7 additions & 7 deletions InfernalRobotics/InfernalRobotics/Module/ModuleIRServo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,18 @@ public class ModuleIRServo : PartModule, IRescalable
[KSPField(isPersistant = true)] public bool limitTweakableFlag = false;

[KSPField(isPersistant = true, guiActive = true, guiActiveEditor = true, guiName = "Max", guiFormat = "F2", guiUnits = ""),
UI_FloatEdit(minValue = -360f, maxValue = 360f, incrementSlide = 0.01f, scene = UI_Scene.All)]
UI_FloatEdit(minValue = -360f, maxValue = 360f, incrementSlide = 0.01f, scene = UI_Scene.All, sigFigs = 2)]
public float maxTweak = 360;

[KSPField(isPersistant = true, guiActive = true, guiActiveEditor = true, guiName = "Min", guiFormat = "F2", guiUnits = ""),
UI_FloatEdit(minValue = -360f, maxValue = 360f, incrementSlide = 0.01f, scene = UI_Scene.All)]
UI_FloatEdit(minValue = -360f, maxValue = 360f, incrementSlide = 0.01f, scene = UI_Scene.All, sigFigs = 2)]
public float minTweak = 0;

[KSPField(isPersistant = true, guiActive = false, guiActiveEditor = false, guiName = "Spring Power", guiFormat = "0.00"),
UI_FloatEdit(minValue = 0.00f, incrementSlide = 0.05f, incrementSmall=1f, incrementLarge=10f, scene = UI_Scene.None)]
UI_FloatEdit(minValue = 0.00f, incrementSlide = 0.05f, incrementSmall=1f, incrementLarge=10f, scene = UI_Scene.None, sigFigs = 2)]
public float jointSpring = 0;
[KSPField(isPersistant = true, guiActive = false, guiActiveEditor = false, guiName = "Damping", guiFormat = "0.00"),
UI_FloatEdit(minValue = 0.00f, incrementSlide = 0.05f, incrementSmall=1f, incrementLarge=10f, scene = UI_Scene.None)]
UI_FloatEdit(minValue = 0.00f, incrementSlide = 0.05f, incrementSmall=1f, incrementLarge=10f, scene = UI_Scene.None, sigFigs = 2)]
public float jointDamping = 0;

[KSPField(isPersistant = true)] public bool rotateLimits = false;
Expand Down Expand Up @@ -82,15 +82,15 @@ public class ModuleIRServo : PartModule, IRescalable
[KSPField(isPersistant = true)] public bool invertAxis;
[KSPField(isPersistant = true)] public float torqueMax = 30f;
[KSPField(isPersistant = true, guiActive = true, guiActiveEditor = true, guiName = "Torque", guiFormat = "0.00"),
UI_FloatEdit(minValue = 0f, maxValue=30f, incrementSlide = 0.05f, incrementSmall=0.5f, incrementLarge=1f, scene = UI_Scene.All)]
UI_FloatEdit(minValue = 0f, maxValue=30f, incrementSlide = 0.05f, incrementSmall=0.5f, incrementLarge=1f, scene = UI_Scene.All, sigFigs = 2)]
public float torqueTweak = 1f;

[KSPField(isPersistant = true, guiActive = true, guiActiveEditor = true, guiName = "Speed", guiFormat = "0.00"),
UI_FloatEdit(minValue = 0f, incrementSlide = 0.05f, incrementSmall=0.5f, incrementLarge=1f)]
UI_FloatEdit(minValue = 0f, incrementSlide = 0.05f, incrementSmall=0.5f, incrementLarge=1f, sigFigs = 2)]
public float speedTweak = 1f;

[KSPField(isPersistant = true, guiActive = true, guiActiveEditor = true, guiName = "Acceleration", guiFormat = "0.00"),
UI_FloatEdit(minValue = 0.05f, incrementSlide = 0.05f, incrementSmall=0.5f, incrementLarge=1f)]
UI_FloatEdit(minValue = 0.05f, incrementSlide = 0.05f, incrementSmall=0.5f, incrementLarge=1f, sigFigs = 2)]
public float accelTweak = 4f;

[KSPField(isPersistant = false, guiActive = false, guiActiveEditor = true, guiName = "Electric Charge required", guiUnits = "EC/s")]
Expand Down

0 comments on commit 5d03e6a

Please sign in to comment.