Skip to content

Commit

Permalink
core: remove etcs logic from const braking curves logic in max speed …
Browse files Browse the repository at this point in the history
…envelope

Signed-off-by: Erashin <[email protected]>
  • Loading branch information
Erashin committed Jan 17, 2025
1 parent 52c2703 commit 5fd6dac
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -135,19 +135,17 @@ object MaxSpeedEnvelope {
var envelope = curveWithDecelerations
val stops = makeSimStops(context, stopPositions, envelope)
envelope = addETCSStopBrakingCurves(etcsSimulator, context, envelope, stops)
envelope = addConstStopBrakingCurves(etcsSimulator, context, envelope, stops)
envelope = addConstStopBrakingCurves(context, envelope, stops)
return envelope
}

/** Generate braking curves overlay at every stop position */
private fun addConstStopBrakingCurves(
etcsSimulator: ETCSBrakingSimulator,
context: EnvelopeSimContext,
curveWithDecelerations: Envelope,
stops: List<SimStop>,
): Envelope {
var envelope = curveWithDecelerations
envelope = addETCSStopBrakingCurves(etcsSimulator, context, envelope, stops)
for (stop in stops) {
if (stop.isETCS) continue // Already handled
val partBuilder = EnvelopePartBuilder()
Expand Down

0 comments on commit 5fd6dac

Please sign in to comment.