chiark
/
gitweb
/
~ijackson
/
trains.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
544b5b1
)
fixes from NYE 2007/8.
author
ian
<ian>
Fri, 11 Jan 2008 20:01:03 +0000
(20:01 +0000)
committer
ian
<ian>
Fri, 11 Jan 2008 20:01:03 +0000
(20:01 +0000)
hostside/eventrun.events
patch
|
blob
|
history
hostside/stopgap-controller
patch
|
blob
|
history
diff --git
a/hostside/eventrun.events
b/hostside/eventrun.events
index 78e20e5f98de177bce317b8bb6f8835791f9bae5..7cffd04674640d62615dcb5d323aaee4bf389888 100644
(file)
--- a/
hostside/eventrun.events
+++ b/
hostside/eventrun.events
@@
-1,15
+1,16
@@
# spong
INIT source /u/ian/things/Bessar/trains/eventrun.procs
# 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 e331b7da6d45a4971aedc6998120657d6384385e..d782b594801bb78b329559f8566e5dd449ee786f 100755
(executable)
--- a/
hostside/stopgap-controller
+++ b/
hostside/stopgap-controller
@@
-564,6
+564,11
@@
proc ask_randspeed {} {
maybechange speeddirn 1
}
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
proc ask_funcs {lr} {
global loco
upvar #0 funcs${lr}${loco} list