From 23957a3b61434c33927b28c79d137b8161a1f661 Mon Sep 17 00:00:00 2001 From: ian Date: Fri, 23 May 2008 23:26:31 +0000 Subject: [PATCH] bugfix to polarisation --- hostside/TODO | 5 +++++ hostside/safety.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/hostside/TODO b/hostside/TODO index 4859f14..b5a7ecf 100644 --- a/hostside/TODO +++ b/hostside/TODO @@ -1,5 +1,10 @@ bugs does not set serial port mode etc. + when checking future polarity possibility, does not account + for MARGIN_POLARISETIME - it just checks to see if + extending front before reducing rear is sufficient + this will not work if there are segments which are + traversed more quickly than MARGIN_POLARISETIME want to document commands [!]movfeat and speed diff --git a/hostside/safety.c b/hostside/safety.c index 9f315ab..1bdfb18 100644 --- a/hostside/safety.c +++ b/hostside/safety.c @@ -643,7 +643,7 @@ static int fdet_nextseg(TrackLocation *t, TrackAdvanceContext *c, } if (u->know_best_polarity && !t->seg->i->invertible && - u->noninv_tally[ t->backwards ^ u->train_polarity_inverted ]) { + u->noninv_tally[ t->backwards ^ u->train_polarity_inverted ^ 1]) { /* incompatible, stop now */ u->walk_compute_polarise= 0; } -- 2.30.2