From: ian Date: Fri, 23 May 2008 23:26:31 +0000 (+0000) Subject: bugfix to polarisation X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ijackson/git?a=commitdiff_plain;h=23957a3b61434c33927b28c79d137b8161a1f661;p=trains.git bugfix to polarisation --- 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; }