chiark / gitweb /
more debugging of inversions
authorian <ian>
Sun, 24 Aug 2008 22:51:51 +0000 (22:51 +0000)
committerian <ian>
Sun, 24 Aug 2008 22:51:51 +0000 (22:51 +0000)
hostside/safety.c

index f7bd78218e6fc0703d3e45c0a49145709d84f050..4c77c643073659be7ec77191745d2afa68051575 100644 (file)
@@ -361,7 +361,7 @@ static void pred_callback_debug(const char *what, TrackLocation *t,
   PredictUserContext *u= c->u;
   
   DPRINTF(safety,predictseg,"   %s"
-         " %c%s dist=%-4d until=%-4ld %c%c%c.%c (was %s%s..%d dist=%-4d)"
+         " %c%s dist=%-4d until=%-4ld %c%c%c.%c%c (was %s%s..%d dist=%-4d)"
          "  %c%c%c.%c%c%c%c elapsed=%ld la#%d"
          " %s/%s %c%s >%s"
          " nit=%d,%d\n",
@@ -377,6 +377,7 @@ static void pred_callback_debug(const char *what, TrackLocation *t,
          "-V"[ t->seg->pred_vacated ],
          
          "-p"[ t->seg->will_polarise ],
+         "-i"[ t->seg->seg_inverted ],
 
          before && before->backwards?"-":"",
          before ? before->seg->i->pname : "-",
@@ -884,8 +885,11 @@ ErrorCode predict(Train *tra, struct timeval tnow, unsigned flags,
 
   /*----- commit to the plan -----*/
 
-  DPRINTF(safety,predict,"  committing la#%d\n",
-         u.lookahead);
+  DPRINTF(safety,predict,"  committing la#%d %c%c%c\n",
+         u.lookahead,
+         "-n"[ u.need_polarise ],
+         "-i"[ u.train_polarity_inverted ],
+         "-b"[ u.know_best_polarity ]);
 
   tra->plan_lookahead_nsegs= u.lookahead;