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:
995084c
)
can reprogram santafe
author
ian
<ian>
Sun, 20 Jan 2008 19:00:27 +0000
(19:00 +0000)
committer
ian
<ian>
Sun, 20 Jan 2008 19:00:27 +0000
(19:00 +0000)
hostside/factory-reset-svc
patch
|
blob
|
history
hostside/fun-randmore
patch
|
blob
|
history
hostside/fun-random
patch
|
blob
|
history
hostside/fun-updown
patch
|
blob
|
history
hostside/nmra-packets.h
patch
|
blob
|
history
diff --git
a/hostside/factory-reset-svc
b/hostside/factory-reset-svc
index 3034a790b4e1dee5aae86a5045707b70b4485adf..ccb34f32e9631ba555eae5d1523fe73871404dfa 100755
(executable)
--- a/
hostside/factory-reset-svc
+++ b/
hostside/factory-reset-svc
@@
-28,4
+28,10
@@
rc svc_pagepreset
rc reset
rc reset
rc svc_factoryreset
rc reset
rc reset
rc svc_factoryreset
+for x in `seq 1 20`; do
+ sleep 0.1
+ ho command 10
+ sleep 0.05
+ ho command 11
+done
rc reset
rc reset
diff --git
a/hostside/fun-randmore
b/hostside/fun-randmore
index 4f318f1ee018b709ddccfe4ec4799277b4c45da1..49971d861117ae1cba63fc9d33dcd9373949c8d6 100755
(executable)
--- a/
hostside/fun-randmore
+++ b/
hostside/fun-randmore
@@
-1,5
+1,6
@@
#!/bin/sh
set -e
#!/bin/sh
set -e
+s=$1
while true; do
echo
which=$(hexdump </dev/urandom -n1 -e '"%d"')
while true; do
echo
which=$(hexdump </dev/urandom -n1 -e '"%d"')
@@
-10,12
+11,12
@@
while true; do
b2=$(hexdump </dev/urandom -n1 -e '"%d"')
dirn=$(($b2 / 128))
echo which=$which b1=$b1 speed=$speed b2=$b2 dirn=$dirn
b2=$(hexdump </dev/urandom -n1 -e '"%d"')
dirn=$(($b2 / 128))
echo which=$which b1=$b1 speed=$speed b2=$b2 dirn=$dirn
- ./hostside-old -s
/dev/ttya0
speed126 2 $speed $dirn
+ ./hostside-old -s
$s
speed126 2 $speed $dirn
fi
if [ $which -lt 128 ]; then
value=$(( $which * 16 ))
printf "which=%s value=%s value=0x%x\n" $which $value $value
fi
if [ $which -lt 128 ]; then
value=$(( $which * 16 ))
printf "which=%s value=%s value=0x%x\n" $which $value $value
- ./hostside-old -s
/dev/ttya0
funcs5to8 2 $value
+ ./hostside-old -s
$s
funcs5to8 2 $value
fi
delay=$(hexdump </dev/urandom -n1 -e '"%d"')
delayv=$(( $delay / 2 + 10 ))
fi
delay=$(hexdump </dev/urandom -n1 -e '"%d"')
delayv=$(( $delay / 2 + 10 ))
diff --git
a/hostside/fun-random
b/hostside/fun-random
index 06e8d33e614deaaee938b85e089fd14cbc9dc552..f05082ea742f9c612dfa87d491abba5cbd1d7087 100755
(executable)
--- a/
hostside/fun-random
+++ b/
hostside/fun-random
@@
-1,5
+1,6
@@
#!/bin/sh
set -e
#!/bin/sh
set -e
+s=$1
while true; do
b1=$(hexdump </dev/urandom -n1 -e '"%d"')
squ=$(($b1 * $b1))
while true; do
b1=$(hexdump </dev/urandom -n1 -e '"%d"')
squ=$(($b1 * $b1))
@@
-7,6
+8,6
@@
while true; do
b2=$(hexdump </dev/urandom -n1 -e '"%d"')
dirn=$(($b2 / 128))
echo b1=$b1 speed=$speed b2=$b2 dirn=$dirn
b2=$(hexdump </dev/urandom -n1 -e '"%d"')
dirn=$(($b2 / 128))
echo b1=$b1 speed=$speed b2=$b2 dirn=$dirn
- ./hostside-old -s
/dev/ttya0
speed126 2 $speed $dirn
+ ./hostside-old -s
$s
speed126 2 $speed $dirn
sleep 30
done
sleep 30
done
diff --git
a/hostside/fun-updown
b/hostside/fun-updown
index 717587910f23362115be3afae4681957ba658988..f33085e77a727057f937d40a96b98b17db2a6fbc 100755
(executable)
--- a/
hostside/fun-updown
+++ b/
hostside/fun-updown
@@
-1,13
+1,13
@@
#!/bin/sh
set -e
#!/bin/sh
set -e
-
+s=$1
while true; do
while true; do
- for x in '0 11' '-- 11
0 -1
'; do
+ for x in '0 11' '-- 11
-1 0
'; do
echo $x;
echo $x;
- for f in `
numbers
$x`; do
+ for f in `
seq
$x`; do
sleep 20; g=$(($f*$f));
echo $f $g;
sleep 20; g=$(($f*$f));
echo $f $g;
- ./hostside-old -s
/dev/ttya0
speed126 2 $g 0
+ ./hostside-old -s
$s
speed126 2 $g 0
done
done
done
done
done
done
diff --git
a/hostside/nmra-packets.h
b/hostside/nmra-packets.h
index 3d6b6072afa75014f8d2bee1d8d64539b5c8a189..ea8f33d671c0bb909a3135dc1b0b91370a6daf4d 100644
(file)
--- a/
hostside/nmra-packets.h
+++ b/
hostside/nmra-packets.h
@@
-94,7
+94,7
@@
NMRA(svc_factoryreset, Anone, {
* (See also Packet Sequence for Physical Register Addressing
* RP 9.2.3 E l.166-)
*/
* (See also Packet Sequence for Physical Register Addressing
* RP 9.2.3 E l.166-)
*/
- CONST(0x7f, 0x
40
);
+ CONST(0x7f, 0x
08
);
})
NMRA(svc_pagepreset, Anone, {
/* Service Mode Page Preset Instruction
})
NMRA(svc_pagepreset, Anone, {
/* Service Mode Page Preset Instruction