From 95a9a1db91463efb6618c63009b52583eb125bfe Mon Sep 17 00:00:00 2001 From: Dima Kogan Date: Tue, 8 Sep 2009 11:32:44 -0700 Subject: [PATCH] do not require xlen if !streaming Ignore-this: 41377b9f3e94ad852e88f14e678e30d3 darcs-hash:20090908183244-0cb85-a38c1b999cf6e86ea54eb41573921df9b0875132.gz --- driveGnuPlots.pl | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/driveGnuPlots.pl b/driveGnuPlots.pl index 16d7cba..4866601 100755 --- a/driveGnuPlots.pl +++ b/driveGnuPlots.pl @@ -55,26 +55,23 @@ if( defined $options{"help"} ) usage(); return; } -if( defined $options{"hardcopy"} && $options{"stream"} ) -{ - $options{"stream"} = undef; -} -if( !defined $options{"xlen"} ) -{ - usage(); - die("Must specify the size of the moving x-window. Doing nothing\n"); -} -my $xwindow = $options{"xlen"}; - - - # now start the data acquisition and plotting threads my $dataQueue = Thread::Queue->new(); - if($options{"stream"}) { + if( defined $options{"hardcopy"}) + { + $options{"stream"} = undef; + } + if( !defined $options{"xlen"} ) + { + usage(); + die("Must specify the size of the moving x-window. Doing nothing\n"); + } + my $xwindow = $options{"xlen"}; + my $addThr = threads->create(\&mainThread); my $plotThr = threads->create(\&plotThread);