]> jspc29.x-matter.uni-frankfurt.de Git - daqtools.git/commitdiff
corrected led 0x1 to led 0x10, mt
authorhadaq <M.Traxler@gsi.de>
Thu, 14 May 2015 11:01:08 +0000 (13:01 +0200)
committerhadaq <M.Traxler@gsi.de>
Thu, 14 May 2015 11:01:08 +0000 (13:01 +0200)
users/gsi_dirc/padiwa_led_off.pl [new file with mode: 0755]

diff --git a/users/gsi_dirc/padiwa_led_off.pl b/users/gsi_dirc/padiwa_led_off.pl
new file mode 100755 (executable)
index 0000000..e53fb20
--- /dev/null
@@ -0,0 +1,39 @@
+#!/usr/bin/perl 
+
+use strict;
+use warnings;
+use Parallel::ForkManager;
+
+my $MAX_PROCESSES=50;
+my $pm = Parallel::ForkManager->new($MAX_PROCESSES);
+
+my @pad0 =(0x2000,0x2001,0x2004,0x2007,0x2009,0x200a,0x200c,0x200f,0x2011,0x2012,0x2013);
+my @pad1 =(0x2000,0x2004,0x2005,0x2006,0x2007,0x2008,0x2009,0x200e);
+my @pad2 =(0x2004,0x2006,0x2008,0x2009,0x200a,0x200e,0x2010);
+
+
+foreach my $b (@pad0) {
+    my $pid = $pm->start and next;
+    my $c = sprintf("../../tools/padiwa.pl 0x%04x 0 led 0x10 >/dev/null",$b);
+    system($c);
+    $pm->finish;
+  }
+$pm->wait_all_children;
+
+foreach my $b (@pad1) {
+    my $pid = $pm->start and next;
+    my $c = sprintf("../../tools/padiwa.pl 0x%04x 1 led 0x10 >/dev/null",$b);
+    system($c);
+    $pm->finish;
+  }
+$pm->wait_all_children;
+
+foreach my $b (@pad2) {
+    my $pid = $pm->start and next;
+    my $c = sprintf("../../tools/padiwa.pl 0x%04x 2 led 0x10 >/dev/null",$b);
+    system($c);
+    $pm->finish;
+}  
+$pm->wait_all_children;
+
+print "finished switching off all led for new Padiwa-Firmware (>= 2014.11.21)\n";