Fix issue with inconsistent formatting of "GPS off" buses.
[frank.git] / prod / net / jaekl / frank / Schedule.java
index 8cc4f846124a5a1b628c0d011e3f6069d80ff5d2..eb8cb2bce26cee168d800d2baef13770ff96c580 100644 (file)
@@ -107,7 +107,7 @@ public class Schedule {
                        Route route = stopInfo.getRoute(routeIdx);
                        for (int tripIdx = 0; tripIdx < route.getNumTrips(); ++tripIdx) {
                                Trip trip = route.getTrip(tripIdx);
-                               boolean isGhost = ((-1) == trip.getAdjAge());
+                               boolean isGhost = (trip.getAdjAge() < 0);
                                if (isGhost) {
                                        // GPS is off.  This bus may not exist.
                                        pw.println("    <TR CLASS=\"ghost\">");
@@ -125,7 +125,7 @@ public class Schedule {
                                remainArray.append(trip.getAdjTime());
                                remainCount++;
                                
-                               if (trip.getAdjAge() < 0) {
+                               if (isGhost) {
                                        pw.println("      <TD>" + trans(FrankBundle.GPS_OFF) + "</TD>");
                                }
                                else {