chiark / gitweb /
use CV 5 to control speed
authorian <ian>
Thu, 20 Mar 2008 01:51:49 +0000 (01:51 +0000)
committerian <ian>
Thu, 20 Mar 2008 01:51:49 +0000 (01:51 +0000)
hostside/.cvsignore
hostside/shinkansen-motor.cv-s [new file with mode: 0644]
hostside/shinkansen-motor.cv-s.gen [deleted file]

index 325f7ff78dbfcc7b61e4b7a062c5c7af681d089f..024a957c6eafb41f5830643884ce10afcbcdd556 100644 (file)
@@ -25,4 +25,3 @@ persist.data.new
 persist.conv.old
 persist.conv
 persist.conv.new
-shinkansen-motor.cv-s
diff --git a/hostside/shinkansen-motor.cv-s b/hostside/shinkansen-motor.cv-s
new file mode 100644 (file)
index 0000000..e5f71d2
--- /dev/null
@@ -0,0 +1,5 @@
+addr   1
+5      9
+29     0x06
+51     0x07
+57     0x06
diff --git a/hostside/shinkansen-motor.cv-s.gen b/hostside/shinkansen-motor.cv-s.gen
deleted file mode 100755 (executable)
index 716e24e..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/usr/bin/perl
-
-$nmax= 126;
-
-#$max= 117;
-#$max= 50;
-$max= 108.9;
-
-@steps= 67..94;
-
-$doublings= 0;
-$vmin= 40;
-$vmax= 255;
-
-for ($i=0; $i<@steps; $i++) {
-    push @vals, $i + @steps * (exp($i/@steps * log(2) * $doublings) - 1.0);
-}
-$maxval= $vals[$#val];
-grep { $_ *= ($vmax-$vmin)/$maxval * $max/$nmax; $_ += $vmin; } @vals;
-
-printf "# autogenerated!\n" or die $!;
-while (<DATA>) { print or die $!; }
-
-for ($i=0; $i<@steps; $i++) {
-    printf "%d %d\n", $steps[$i], $vals[$i]
-       or die $!;
-}
-
-__END__
-addr   1
-#2     1
-29     0x16
-51     0x07
-57     0x06
-
-# speed curve: