Skip to content

Commit

Permalink
setting blinker when approaching a parking stop. refs #5126
Browse files Browse the repository at this point in the history
  • Loading branch information
namdre committed Jan 31, 2019
1 parent 48b590e commit 68ccb2d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/microsim/MSVehicle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4932,6 +4932,12 @@ MSVehicle::setBlinkerInformation() {
}
}
}
if (myStopDist < (myLane->getLength() - getPositionOnLane())
// signal parking stop on the current lane when within braking distance (~2 seconds before braking)
&& myStops.begin()->pars.parking
&& myStopDist < getCarFollowModel().brakeGap(myLane->getVehicleMaxSpeed(this), getCarFollowModel().getMaxDecel(), 3)) {
switchOnSignal(MSNet::getInstance()->lefthand() ? VEH_SIGNAL_BLINKER_LEFT : VEH_SIGNAL_BLINKER_RIGHT);
}
if (myInfluencer != nullptr && myInfluencer->getSignals() >= 0) {
mySignals = myInfluencer->getSignals();
myInfluencer->setSignals(-1); // overwrite computed signals only once
Expand Down

0 comments on commit 68ccb2d

Please sign in to comment.