Skip to content

Commit 7772f58

Browse files
authored
Merge pull request #845 from cesarBLG/adhesion-resume
Save axle integrator status
2 parents 7f7dd99 + 6fa5ef2 commit 7772f58

File tree

1 file changed

+4
-1
lines changed
  • Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerTransmissions

1 file changed

+4
-1
lines changed

Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerTransmissions/Axle.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,6 @@ public Axle()
630630
}
631631
public void Initialize()
632632
{
633-
AxleSpeedMpS = 0;
634633
motor?.Initialize();
635634
}
636635
public void InitializeMoving()
@@ -677,6 +676,8 @@ public void Restore(BinaryReader inf)
677676
previousSlipSpeedMpS = inf.ReadSingle();
678677
AxleForceN = inf.ReadSingle();
679678
AxleSpeedMpS = inf.ReadSingle();
679+
NumOfSubstepsPS = inf.ReadInt32();
680+
integratorError = inf.ReadSingle();
680681
}
681682

682683
/// <summary>
@@ -689,6 +690,8 @@ public void Save(BinaryWriter outf)
689690
outf.Write(previousSlipSpeedMpS);
690691
outf.Write(AxleForceN);
691692
outf.Write(AxleSpeedMpS);
693+
outf.Write(NumOfSubstepsPS);
694+
outf.Write(integratorError);
692695
}
693696

694697
/// <summary>

0 commit comments

Comments
 (0)