From: ian Date: Sun, 4 May 2008 16:09:31 +0000 (+0000) Subject: better filenames X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ijackson/git?a=commitdiff_plain;h=80e98b3753bc0dbf647a1884e0a1c44e3a12a4cf;p=trains.git better filenames --- diff --git a/hostside/.cvsignore b/hostside/.cvsignore index b86480b..fd3ef62 100644 --- a/hostside/.cvsignore +++ b/hostside/.cvsignore @@ -18,11 +18,5 @@ stastate.h retransmit-table.h record-l.[ch] record-y.[ch] -persist.lock -persist.data.old -persist.data -persist.data.new -persist.conv.old -persist.conv -persist.conv.new -persist.record ++persist* ++*.log diff --git a/hostside/main.c b/hostside/main.c index 1a8ffbd..48216d7 100644 --- a/hostside/main.c +++ b/hostside/main.c @@ -23,7 +23,7 @@ const char *progname= "hostside-old"; static FILE *dump_stream= 0; static int repeat_delay= -1, iterations= -1; -static const char *serial_port; +static const char *serial_port= "/dev/railway"; static Nmra buf; @@ -126,8 +126,6 @@ int main(int argc, const char **argv) { } } - if (!serial_port) badusage("need serial port option"); - if (!arg) badusage("need arg"); #define BARE(f) \ diff --git a/hostside/measure-speeds b/hostside/measure-speeds index 60d0ead..360d166 100755 --- a/hostside/measure-speeds +++ b/hostside/measure-speeds @@ -1,11 +1,11 @@ #!/usr/bin/tclsh8.3 # Put loco on track segment X5 ish, facing anticlockwise -# ./measure-speeds /dev/ttyUSB0 2 0 `seq 1 126` |tee santafe.speeds +# ./measure-speeds /dev/railway 2 0 `seq 1 126` |tee santafe.speeds # ^reverse # debugging: -# ./measure-speeds /dev/ttyUSB0 1 1 `seq 1 126` 2>&1 | perl -pe '$|=1; s/\r/\n/g' | 3<&0 tclsh8.3 <(echo 'set f [open /dev/fd/3]; proc cm {} { clock clicks -milliseconds }; set z [cm]; while {[gets $f l]>=0} { puts [format "%-10s %s" [expr {[cm]-$z}] $l] }') +# ./measure-speeds /dev/railway 1 1 `seq 1 126` 2>&1 | perl -pe '$|=1; s/\r/\n/g' | 3<&0 tclsh8.3 <(echo 'set f [open /dev/fd/3]; proc cm {} { clock clicks -milliseconds }; set z [cm]; while {[gets $f l]>=0} { puts [format "%-10s %s" [expr {[cm]-$z}] $l] }') load chiark_tcl_hbytes-1.so diff --git a/hostside/persist.c b/hostside/persist.c index defc4cc..a477757 100644 --- a/hostside/persist.c +++ b/hostside/persist.c @@ -45,7 +45,7 @@ #include "realtime.h" -const char *persist_fn= "persist"; +const char *persist_fn= "+persist"; char *persist_record_converted; static int fd= -1; diff --git a/hostside/realtime.c b/hostside/realtime.c index 7acd982..731c9af 100644 --- a/hostside/realtime.c +++ b/hostside/realtime.c @@ -11,8 +11,8 @@ const char *progname= "realtime"; CommandInput cmdi; int picio_send_noise= 1; -static const char *device= "/dev/ttya0"; -static const char *logcopy_fn= "realtime.log"; +static const char *device= "/dev/railway"; +static const char *logcopy_fn= "+realtime.log"; /*---------- general event handling ----------*/