chiark / gitweb /
report train's new position after prediction succeeds
authorian <ian>
Wed, 16 Jul 2008 20:54:44 +0000 (20:54 +0000)
committerian <ian>
Wed, 16 Jul 2008 20:54:44 +0000 (20:54 +0000)
hostside/safety.c

index 9c3a10f9c2c08a30fe83a96c04317c1428c30245..926b21b2b840148360206e551f06ae7df095085f 100644 (file)
@@ -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. */