From d29f002e7df611b52b25340d68352eb2a0f66d17 Mon Sep 17 00:00:00 2001 From: ian Date: Sun, 24 Aug 2008 22:51:51 +0000 Subject: [PATCH] more debugging of inversions --- hostside/safety.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/hostside/safety.c b/hostside/safety.c index f7bd782..4c77c64 100644 --- a/hostside/safety.c +++ b/hostside/safety.c @@ -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; -- 2.30.2