From a35b44ea48dd38724204ed74e0a59ce8132aa2ec Mon Sep 17 00:00:00 2001 From: Michael Traxler Date: Wed, 16 Jun 2021 03:00:40 +0200 Subject: [PATCH] corrected help text and added direction argument, mt --- thresholds/write_thresholds.pl | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/thresholds/write_thresholds.pl b/thresholds/write_thresholds.pl index e090ab6..88d786d 100755 --- a/thresholds/write_thresholds.pl +++ b/thresholds/write_thresholds.pl @@ -12,11 +12,13 @@ use POSIX qw(strftime); my $offset = 0; my $help; my $mode="padiwa"; +my $direction=1; my $result = GetOptions ( "h|help" => \$help, "o|offset=s" => \$offset, "m|mode=s" => \$mode, + "d|direction=i" => \$direction, ); if($help) { @@ -36,7 +38,7 @@ if ($offset) { } else { die "wrong number format for offset parameter: \"$offset\"" unless $offset =~ /^\d+$/; - $offset = int($offset) * $sign; + $offset = $direction * int($offset) * $sign; } #print "called with offset: $offset\n"; @@ -158,7 +160,7 @@ sub send_command_error { sub usage { print <] [--mode=<"padiwa"|"cbmrich">] +usage: write_thresholds.pl [--help] [offset=] [--mode=<"padiwa"|"cbmrich"|"dirich2">] example: @@ -170,7 +172,7 @@ increases the thresholds stored in file by the given number. filename: has to be in the format of the output of the automatic threshold determination -currently only mode "padiwa" is implemented. +currently only mode "padiwa" and dirich2 are implemented. The script puts a timestamp of execution and the timestamp of the thresholds file to threshold_log.txt. The script puts the timestamp of the threshold file to billboard_info. -- 2.43.0