Browse Source

Small script fix.

Kai Lauterbach 7 years ago
parent
commit
ba3b4d7daf
1 changed files with 5 additions and 1 deletions
  1. 5
    1
      tools/list2cube.pl

+ 5
- 1
tools/list2cube.pl View File

@@ -5,6 +5,7 @@
5 5
 # license: GPL v3
6 6
 #
7 7
 
8
+use Time::HiRes qw(usleep nanosleep);
8 9
 my @list = <STDIN>;
9 10
 my $i = 0;
10 11
 
@@ -15,7 +16,10 @@ foreach my $line (@list)
15 16
     {
16 17
         my $frame = hex(substr($line,2,8));
17 18
         print "Adding ". $line. " with ". ($frame >> 27). " delay\n";
18
-        system("../client/clcc --save --pos $i --delay ". ($frame >> 27)." --frame $line");
19
+        my $cframe = $frame & 0x07ffffff;
20
+        #printf("0x%08x\n", $cframe);
21
+        system("../client/clcc --save --pos $i --delay ". ($frame >> 27)." --frame $cframe");
22
+        usleep(250000);
19 23
         $i++;
20 24
     }
21 25
 }

Loading…
Cancel
Save