]> jspc29.x-matter.uni-frankfurt.de Git - daqtools.git/commitdiff
write thresholds did not use atomic-padiwa-access routine, what a mess.... now this...
authorhadaq <M.Traxler@gsi.de>
Sun, 28 Jun 2015 22:04:36 +0000 (00:04 +0200)
committerhadaq <M.Traxler@gsi.de>
Sun, 28 Jun 2015 22:04:36 +0000 (00:04 +0200)
thresholds/write_thresholds.pl

index fccdd8971dac5015a66c2fc14ca8f1f3fe5a2e77..79cf32fae3366730fa200eaf4d96b1de63efa6a0 100755 (executable)
@@ -3,7 +3,7 @@
 use strict;
 use warnings;
 use Data::Dumper;
-#use Dmon;
+use Dmon;
 use Getopt::Long;
 use HADES::TrbNet;
 use POSIX qw(strftime);
@@ -104,14 +104,15 @@ sub write_threshold {
 
   my $command= $fixed_bits | ($current_channel << 16) | ($thresh << $shift_bits);
 
-  #Dmon::PadiwaSendCmd($endpoint, $chain, $command);
-  send_command($endpoint, $chain, $command);
+  Dmon::PadiwaSendCmd($command, $endpoint, $chain);
+  #send_command($endpoint, $chain, $command);
 }
 
 
 sub send_command {
   (my $endpoint, my $chain, my $command) = @_;
 
+  
   my $ra_atomic = [$command,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1<<$chain,0x10001];
   my $rh_res = trb_register_write_mem($endpoint, 0xd400, 0, $ra_atomic, scalar @{$ra_atomic});
   send_command_error($endpoint) if (!defined $rh_res);