From: ian Date: Wed, 16 Jul 2008 20:54:44 +0000 (+0000) Subject: report train's new position after prediction succeeds X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ijackson/git?a=commitdiff_plain;h=f354f107e646cb7cf0a3a994838525fbf5c057c9;p=trains.git report train's new position after prediction succeeds --- diff --git a/hostside/safety.c b/hostside/safety.c index 9c3a10f..926b21b 100644 --- a/hostside/safety.c +++ b/hostside/safety.c @@ -1124,7 +1124,11 @@ ErrorCode safety_setdirection(Train *tra, int backwards, tra->maxinto= pci->dist - newfdet.remain; ec= predict(tra,tnow, PREDF_NEWPLAN,0,0, ppc,ppcu); - if (!ec) return 0; /* yay! */ + if (!ec) { + /* yay! */ + report_train_position(tra); + return 0; + } /* It can happen eg that the uncertainty is more troublesome when * considered one way than the other. In which case just put it back now. */