diff options
Diffstat (limited to 'src/net/cbaines/suma/BusRoute.java')
-rw-r--r-- | src/net/cbaines/suma/BusRoute.java | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/src/net/cbaines/suma/BusRoute.java b/src/net/cbaines/suma/BusRoute.java index e1bf65b..cdb0e4d 100644 --- a/src/net/cbaines/suma/BusRoute.java +++ b/src/net/cbaines/suma/BusRoute.java @@ -62,9 +62,25 @@ public class BusRoute { @DatabaseField(canBeNull = false) String label; + /** + * The direction the bus is travelling if it is moving through the route and sequence is increasing. + * <ul> + * <li>U1 = A</li> + * <li>U2 = B</li> + * <li>U6 = H</li> + * </ul> + */ @DatabaseField(canBeNull = true) String forwardDirection; + /** + * The direction the bus is travelling if it is moving through the route and sequence is decreasing. + * <ul> + * <li>U1 = C</li> + * <li>U2 = C</li> + * <li>U6 = C</li> + * </ul> + */ @DatabaseField(canBeNull = true) String reverseDirection; @@ -304,14 +320,13 @@ public class BusRoute { Log.e(TAG, "Error, unknown bus stop " + busStop.id + " (" + busStop.description + ") that appears mutiple times in " + toString()); throw new RuntimeException("Error, unknown bus stop " + busStop.id + " that appears mutiple times in " + toString()); } + Log.v(TAG, "Selecting " + stopIndex + " for " + busStop.id + " as direction == " + direction); } } } if (moveAmount > 0) { - Log.v(TAG, - "Moving forward in direction " + direction + " " + moveAmount + " stops from " + busStop + " (" + stopIndex + "/" - + routeStopsFound.size() + ")"); + Log.v(TAG, "Moving forward " + moveAmount + " stops from " + busStop + " (" + stopIndex + "/" + routeStopsFound.size() + ")"); int stopWanted = stopIndex + moveAmount; if ((stopWanted + 1) > routeStopsFound.size()) { Log.v(TAG, "Off the end of the route"); @@ -334,9 +349,7 @@ public class BusRoute { Log.v(TAG, "stopWanted " + stopWanted); busStopDao.refresh(routeStopsFound.get(stopWanted).stop); - Log.v(TAG, - "Moving backwards in direction " + direction + " " + moveAmount + " stops from " + busStop + " to " - + routeStopsFound.get(stopWanted).stop + " in route " + this); + Log.v(TAG, "Moving backwards " + moveAmount + " stops from " + busStop + " to " + routeStopsFound.get(stopWanted).stop + " in route " + this); return routeStopsFound.get(stopWanted).stop; } |