Skip to content

Commit

Permalink
Merge pull request #103 from TheTransitClock/tc_issue_102
Browse files Browse the repository at this point in the history
Set precedence of assignment correctly.
  • Loading branch information
scrudden authored Aug 21, 2018
2 parents bd5aa56 + afe7464 commit da7905c
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -199,15 +199,18 @@ private void processMessage(FeedMessage message) {
if (vehicle.hasTrip()) {
TripDescriptor tripDescriptor = vehicle.getTrip();


if (tripDescriptor.hasRouteId()) {
avlReport.setAssignment(tripDescriptor.getRouteId(),
AssignmentType.ROUTE_ID);
}

if (tripDescriptor.hasTripId()) {
avlReport.setAssignment(tripDescriptor.getTripId(),
AssignmentType.TRIP_ID);
}

if (tripDescriptor.hasRouteId()) {
avlReport.setAssignment(tripDescriptor.getRouteId(),
AssignmentType.ROUTE_ID);
}

}

logger.debug("Processed {}", avlReport);
Expand Down

0 comments on commit da7905c

Please sign in to comment.