From 1c5b75800b9452d17cb78b23480fc18cc6875663 Mon Sep 17 00:00:00 2001 From: ian Date: Wed, 5 Jul 2006 21:25:28 +0000 Subject: [PATCH] provide a dummy info_trains --- hostside/Makefile | 2 +- hostside/TODO | 1 + hostside/dummy-trains.c | 17 +++++++++++++++++ 3 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 hostside/dummy-trains.c diff --git a/hostside/Makefile b/hostside/Makefile index b145464..b66c194 100644 --- a/hostside/Makefile +++ b/hostside/Makefile @@ -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 \ diff --git a/hostside/TODO b/hostside/TODO index 21a7e06..a9b4fa2 100644 --- a/hostside/TODO +++ b/hostside/TODO @@ -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 index 0000000..86bd7c1 --- /dev/null +++ b/hostside/dummy-trains.c @@ -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 } +}; -- 2.30.2