From f354f107e646cb7cf0a3a994838525fbf5c057c9 Mon Sep 17 00:00:00 2001 From: ian Date: Wed, 16 Jul 2008 20:54:44 +0000 Subject: [PATCH] report train's new position after prediction succeeds --- hostside/safety.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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. */ -- 2.30.2