chiark / gitweb /
provide a dummy info_trains
authorian <ian>
Wed, 5 Jul 2006 21:25:28 +0000 (21:25 +0000)
committerian <ian>
Wed, 5 Jul 2006 21:25:28 +0000 (21:25 +0000)
hostside/Makefile
hostside/TODO
hostside/dummy-trains.c [new file with mode: 0644]

index b14546469dd3342d8f55fac983836f72c2364493..b66c194ad8c739e39e960521c12e201e272387fa 100644 (file)
@@ -23,7 +23,7 @@ on-bessar:    $(TARGETS)
                RSYNC_RSH=fsh rsync $^ $(BESSAR)
 
 realtime:      realtime.o startup.o cdumgr.o safety.o trackloc.o       \
-                actual.o                                               \
+                actual.o dummy-trains.o                                \
                 cmdinput.o obc.o eventhelp.o                           \
                 utils.o serialio.o parseutils.o auproto-pic.o          \
                 ../layout/ours.layout-data.o                           \
index 21a7e0678d263687f508084a2ef5c62ae88db0fd..a9b4fa2a21a83fcdffb3a4dcba98519b3002d5e9 100644 (file)
@@ -2,4 +2,5 @@ things not yet considered at all in safety code
        polarity
        min. curve specifications
 
+put correct data in dummy-trains.c
 initialise safety_state with appropriate stuff
diff --git a/hostside/dummy-trains.c b/hostside/dummy-trains.c
new file mode 100644 (file)
index 0000000..86bd7c1
--- /dev/null
@@ -0,0 +1,17 @@
+/*
+ */
+
+#include "realtime.h"
+
+#define NOTA_TRAIN { 0,0,0,0, "internal-error-not-a-train" }
+
+#define SPEED_MMS2INTERN(mms /* mm/s */) \
+  (((mms) * SPEED_UNIT + 999) / 1000)
+
+const TrainInfo info_trains[]= {
+  /* data here is all made up ! */
+  NOTA_TRAIN,
+  { SPEED_MMS2INTERN(1000), 20, 900, 20 },
+  { SPEED_MMS2INTERN(400), 10, 50, 10 },
+  { 0,0,0,0,0 }
+};