From 6dee757f10b504abe91fa10193645fe771d98c93 Mon Sep 17 00:00:00 2001 From: Michele Segata Date: Wed, 10 Apr 2024 16:00:02 +0200 Subject: [PATCH] MSCFModel_CC: avoid setting chosing the speed factor when using a fixed acceleration This avoids problems if the user sets the CC desired speed to 0 by chance --- src/microsim/cfmodels/MSCFModel_CC.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/microsim/cfmodels/MSCFModel_CC.cpp b/src/microsim/cfmodels/MSCFModel_CC.cpp index 289174b60ef2..300db08b63b5 100644 --- a/src/microsim/cfmodels/MSCFModel_CC.cpp +++ b/src/microsim/cfmodels/MSCFModel_CC.cpp @@ -281,7 +281,7 @@ MSCFModel_CC::finalizeSpeed(MSVehicle* const veh, double vPos) const { } } - if (vars->activeController != Plexe::DRIVER) { + if (vars->activeController != Plexe::DRIVER && !vars->useFixedAcceleration) { veh->setChosenSpeedFactor(vars->ccDesiredSpeed / veh->getLane()->getSpeedLimit()); }