From: ian Date: Fri, 11 Jan 2008 20:01:03 +0000 (+0000) Subject: fixes from NYE 2007/8. X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ijackson/git?a=commitdiff_plain;h=995084cb4c8d0a743c14b6da139578bac79e87b6;p=trains.git fixes from NYE 2007/8. --- diff --git a/hostside/eventrun.events b/hostside/eventrun.events index 78e20e5..7cffd04 100644 --- a/hostside/eventrun.events +++ b/hostside/eventrun.events @@ -1,15 +1,16 @@ # spong INIT source /u/ian/things/Bessar/trains/eventrun.procs -e3 trains_stop -eb trains_start +c0223 trains_stop +c018a trains_start -b2 tw ask_speed -1 -ec tw ask_speed +1 -e6 tw ask_randspeed +_ffbc0025 tw ask_speed -1 +_ffbc0024 tw ask_speed +1 +c022a tw ask_randspeed -ea tw ask_funcs l -e9 tw ask_funcs r -e8 tw ask_pointprob +1 -e7 tw ask_pointprob -1 -e5 tw ask_pointrelabs +90001 tw ask_funcs l +90002 tw ask_funcs r +_c008d tw ask_pointprob +1 +_ffbc0047 tw ask_pointprob -1 +_c0209 tw ask_pointrelabs +_ffbc000d tw ask_loco diff --git a/hostside/stopgap-controller b/hostside/stopgap-controller index e331b7d..d782b59 100755 --- a/hostside/stopgap-controller +++ b/hostside/stopgap-controller @@ -564,6 +564,11 @@ proc ask_randspeed {} { maybechange speeddirn 1 } +proc ask_loco {} { + global loco + set loco [expr {$loco==1 ? 2 : 1}] +} + proc ask_funcs {lr} { global loco upvar #0 funcs${lr}${loco} list