chiark / gitweb /
realtime: tune the retransmission table, and change the time unit to be NMRADATA...
authorIan Jackson <ian@liberator.relativity.greenend.org.uk>
Sat, 8 Jan 2011 20:50:13 +0000 (20:50 +0000)
committerIan Jackson <ian@liberator.relativity.greenend.org.uk>
Sat, 8 Jan 2011 20:50:13 +0000 (20:50 +0000)
hostside/retransmit-table.h.gen
hostside/retransmit.c

index 469d2302c0aa799b5020c699af00b6308d78a42f..5f401b9353855a39c78fce103510ee4508d259bb 100755 (executable)
@@ -1,8 +1,10 @@
 #!/usr/bin/perl
 
-$count= 20;
+$count= 17;
 $exp= 1.3;
-$first= 1.0;
+$first= 6.0; # units are bytes of command NMRADATA command sent to PICs.
+# A 3-byte (including checksum) NMRA command (which is the
+# smallest possible) produces 6 bytes.
 
 print <<END or die $!;
 #define SPEEDYCOUNT $count
index 1c882dfb7874c8e7e40f8f5941ee16b71b74efb3..8cb011a089e36c4f2e4ed42006dc892b543f8fd1 100644 (file)
@@ -68,7 +68,7 @@ static void debug_message(const PicInsn *pi, const Nmra *n) {
 static void retransmit_this(const PicInsn *pi) {
   if (DEBUGP(retransmit,message)) debug_message(pi, 0);
   serial_transmit(pi);
-  elapsed++;
+  elapsed += pi->l;
 }
 
 void retransmit_start(void) {