]> jspc29.x-matter.uni-frankfurt.de Git - hades_mdc_settings.git/commitdiff
add output of proper commands, execute and write option
authorJan Michel <michel@physik.uni-frankfurt.de>
Fri, 3 Feb 2023 13:00:31 +0000 (14:00 +0100)
committerJan Michel <michel@physik.uni-frankfurt.de>
Fri, 3 Feb 2023 13:00:31 +0000 (14:00 +0100)
scripts/check_voltages.pl

index c0bef12566a6fabf7e96fb31b021efba516f9046..9bf5508a802c27df49f85d889793c86b85cf22ae 100755 (executable)
@@ -17,16 +17,15 @@ my $help;
 Getopt::Long::Configure(qw(gnu_getopt));
 GetOptions(
  'help|h'  => \$help,
- 'write|w'  => \$write,
  'exec|e'  => \$execute,
 );
 
 if($help) {
 print <<HELP;
-./check_voltages.pl [-e] [-w]
+./check_voltages.pl [-e]
 
 Reads voltages of all MBO and suggests changes.
-Use -e to directly execute commands and -w to store changes in file.
+Use -e to directly execute commands
 HELP
 exit;
 }
@@ -72,7 +71,7 @@ foreach my $b (sort keys %{$values}) {
 
 sub makechange {
   my ($b,$v,$c,$r) = @_;
-  my $cmd = sprintf("./mdc_voltage.pl %s -b 0x%04x\t-c %i\t-r %i\t#%i mV\n",$write,$b,$c,$r,$v);
+  my $cmd = sprintf("./mdc_voltage.pl -w -b 0x%04x\t-c %i\t-r %i\t#%i mV\n",$b,$c,$r,$v);
   print $cmd;
   qx($cmd) if defined $execute;
   }