]> jspc29.x-matter.uni-frankfurt.de Git - mvdsensorcontrol.git/commitdiff
improved adcmon.pl (warning when no data from CB), added 'startup only' feature to...
authorwww@jspc55 <www@jspc55>
Fri, 6 Jun 2014 13:24:05 +0000 (15:24 +0200)
committerwww@jspc55 <www@jspc55>
Fri, 6 Jun 2014 13:24:05 +0000 (15:24 +0200)
13 files changed:
layout/adcmon.css
layout/jtageditor_blue.css
layout/styles.css
layout/testgui.css
tools/HPlot.pm
tools/adcmon.pl
tools/jtageditor.pl
tools/plotService.pl
tools/run.pl
tools/startup.pl
tools/test.txt [new file with mode: 0644]
tools/testgui.js
tools/testgui.pl

index 1f99875ccffc072d77a1c164d0fa7e54c99fdb1d..f24adc05bc690e1a21bc0f5073dd1638f9cf0755 100644 (file)
@@ -1,17 +1,5 @@
 
 
-
-
-
-
-
-
-.plasticBox {
-   border-radius:5px;
-   background:#eef;
-   box-shadow: 0 0 10px 5px #fff,  0 0 4px 1px #78b inset;
-}
-
 .debugFeature {
   visibility:collapse;
 }
index d5db30468371649b2e1a870686f259eacb098b95..674057e7e21a77fea1ffe3358b4d4656e9126004 100644 (file)
@@ -11,9 +11,6 @@ body {
   width:320px;
   padding:10px;
   margin:50px 10px 0 30px;
-  border-radius:5px;
-  background:#eef;
-  box-shadow: 0 0 10px 5px #fff,  0 0 4px 1px #78b inset;
   }
 
 #fileSelection {
index 3755da288b440881ae69acadbcde2e1afb88708c..1b6a5645a632ec03fcab2f4ff6f6174dd2ae8056 100644 (file)
@@ -262,4 +262,8 @@ table#server-details pre {
    display: inline;
 }
    
-
+.stylishBox {
+   border-radius:5px;
+   background:#eef;
+   box-shadow: 0 0 10px 5px #fff,  0 0 4px 1px #78b inset;
+}
\ No newline at end of file
index 3d9eca620d33739de33516fc659f9dd98dd3d350..1c0bcaa810e387f8cf2a9737047ad48bb0b43a20 100644 (file)
@@ -7,8 +7,16 @@
   visibility:visible;
 }
 
-#theConsole {
+#theConsoleContainer {
   visibility:collapse;
+  margin:5px;
+  padding:10px;
+}
+
+#advancedOptionsContainer {
+  visibility:collapse;
+  margin:5px;
+  padding:10px;
 }
 
 .td_solid {
@@ -35,9 +43,6 @@
 /*    width:320px; */
 /*    padding:10px; */
    margin:0px 0px 30px 0px; 
-   border-radius:5px;
-   background:#eef;
-   box-shadow: 0 0 10px 5px #fff,  0 0 4px 1px #78b inset;
 }
 
 .previewArea img{
@@ -61,19 +66,5 @@ width:100%;
    width:320px;
    padding:10px;
    margin:50px 10px 0 30px;
-   border-radius:5px;
-   background:#eef;
-   box-shadow: 0 0 10px 5px #fff,  0 0 4px 1px #78b inset;
    }
    
-.sensorHeader{
-/*    float:left; */
-/*    position:relative; */
-/*    width:700px; */
-/*    min-height:50px; */
-/*    padding:10px; */
-   margin:50px 0 0 20px;
-   border-radius:5px;
-   background:#eef;
-   box-shadow: 0 0 10px 5px #fff,  0 0 4px 1px #78b inset;
-}
\ No newline at end of file
index 6e2fabab8f625d1c88e7e4c40cc27b890158128b..2c64165e87173fd02fd589635944fc66e7010e61 100644 (file)
@@ -28,7 +28,7 @@ sub plot_write {
 
 
 sub makeTimeString{
-  return strftime("set label 100 \"%H:%M:%S\" at screen 0.02,0.02 left tc rgb \"#000044\" font \"monospace,8\"\n", localtime())
+  return strftime("set label 100 \"%H:%M:%S\" at screen 0.02,0.02 left tc rgb \"#000044\" font \"monospace,8\"\n", localtime());
   }
 
 
@@ -144,6 +144,13 @@ sub PlotDraw {
 #       $p->{$name}->{file}.".png".
 #       "\"");
     plot_write($p->{$name}->{fh},makeTimeString());
+  #### show a label when no data is coming ####
+  if ( $p->{$name}->{value}->[1]->[-1] > $p->{$name}->{value}->[2]->[-1] ) { # test if min>max (impossible for real data)
+    plot_write($p->{$name}->{fh},"set label 101 \"no data from FEE\" at screen 0.52,0.55 center tc rgb \"#770000\" font \"monospace,14\"\n");
+  }else{
+    plot_write($p->{$name}->{fh},"set label 101 \"\"\n");
+  }
+  #### /show a label when no data is coming ####
     plot_write($p->{$name}->{fh},"replot");
     }
   for(my $j=0; $j<$p->{$name}->{curves}; $j++) {
@@ -154,6 +161,7 @@ sub PlotDraw {
       }
     plot_write($p->{$name}->{fh},"e");
     }
+    
   $p->{$name}->{run}++;
   }
 
index eccbe75ec388ebad4be8a92d973ae885c528be91..2311f502877c924f5c5f32877af9712241839ecc 100755 (executable)
@@ -96,16 +96,16 @@ my $q = shift;
 print h2 "Converter Board ADC Monitor";
 
 
-print '<div id="selectors" class="plasticBox">';
+print '<div id="selectors" class="stylishBox">';
 print_selectors($q);
 print '</div>';
 
-print '<div id="plotAreaBg" class="plasticBox plotArea">';
+print '<div id="plotAreaBg" class="stylishBox plotArea">';
 print "<div class='header'>Plots</div>";
 # print "plotAreaBg";
 print '</div>';
 
-print '<div id="plotAreaFg" class="plasticBox plotArea">';
+print '<div id="plotAreaFg" class="stylishBox plotArea">';
 # print "plotAreaFg";
 print '</div>';
 
index bc6213704923d5c3b268267aa380b720b36083d3..99ff677e7073d06d9e51c21b383835dc625af6a3 100755 (executable)
@@ -290,18 +290,18 @@ if ($cgiHash{'edit'}) {
 }
 print <<EOF;
 <h2>JTAG Configuration File Editor</h2>
-<div id="debug">
+<div id="debug" class="stylishBox">
 <div class="header">Debug Output</div>
 debug text
 </div>
-<div id="fileSelection">
+<div id="fileSelection" class="stylishBox">
 Current File: unknown
 </div>
 
-<div id="roterBereich">
+<div id="roterBereich" class="stylishBox">
 empty
 </div>
-<div id="blauerBereich">
+<div id="blauerBereich" class="stylishBox">
 empty
 </div>
 
index f0dd387ee8f13aa9e606470af37eb4125b715278..b7eed89790014c86f597483dbadd743a37bdb560 100755 (executable)
@@ -215,8 +215,13 @@ sub sample {
   my $max = ($minmax >> 16       ) * $self->{scale} + ($self->{scaleoffset}||0);        # upper 16 bit
 #   print $value."\n" if $myverbose;
   HPlot::PlotAdd($self->{requestString},$value,0);
-  HPlot::PlotAdd($self->{requestString},$min,1);
-  HPlot::PlotAdd($self->{requestString},$max,2);
+  if ($min > $max){ # $min>$max means no real data
+    HPlot::PlotAdd($self->{requestString},$value+$self->{scale},1); # draw min and max close to last value ...
+    HPlot::PlotAdd($self->{requestString},$value-$self->{scale},2); # but still the wrong order
+  } else { # valid data
+    HPlot::PlotAdd($self->{requestString},$min,1);
+    HPlot::PlotAdd($self->{requestString},$max,2);
+  }
 
 }
 sub draw {
index 557e0522f816a0f4f98087dfe1e2c138597c7f18..a6f5dc30f2f38cf18115a39df7ebac040afba35f 100755 (executable)
@@ -80,12 +80,14 @@ unless(-e $picPath or mkdir $picPath) {
 my $dummy;
 
 $dummy =qx"./startup.pl $setupFile";
-$dummy.=qx"rm $dumpPath/te1*.hld 2>&1";
-$dummy.=qx"./preview/exec_evtbuild_t.pl -t $runtime -p $dumpPath -s $systemName -d $ports 2>&1";
-$dummy.=qx"rm $dumpPath/temp.hld 2>&1";
-$dummy.=qx"mv $dumpPath/te1* $dumpPath/temp.hld 2>&1";
-$dummy.=qx"rm $picPath/$systemName*.png 2>&1"; # delete old pictures
-$dummy.=qx"./preview/unpack_hld.pl -f $dumpPath/temp.hld -p $picPath -s $systemName 2>&1";
+unless($q->param('startupOnly') eq 'true'){
+  $dummy.=qx"rm $dumpPath/te1*.hld 2>&1";
+  $dummy.=qx"./preview/exec_evtbuild_t.pl -t $runtime -p $dumpPath -s $systemName -d $ports 2>&1";
+  $dummy.=qx"rm $dumpPath/temp.hld 2>&1";
+  $dummy.=qx"mv $dumpPath/te1* $dumpPath/temp.hld 2>&1";
+  $dummy.=qx"rm $picPath/$systemName*.png 2>&1"; # delete old pictures
+  $dummy.=qx"./preview/unpack_hld.pl -f $dumpPath/temp.hld -p $picPath -s $systemName 2>&1";
+}
 my $escapedDummy = escapeHTML($dummy);
 $escapedDummy =~ s/\n/<br>/g;
 print $escapedDummy;
index f0e0acdec0a18c2df45f8d98bb9fcd5fadc4cfa8..30da2ad0d8b250eea1fbd7234f728336073f7122 100755 (executable)
@@ -163,7 +163,7 @@ $chainsinifile->close();
 
 # configure Converter Boards
 local $CWD = XMLDBPATH;
-delete $ENV{'QUERY_STRING'};
+delete $ENV{'QUERY_STRING'}; # make sure put.pl is used in a command line and not in a web context
 foreach my $cmd (@CbCommands){
   my $entity = "CbController";
   my $addr = $cmd->{addr};
diff --git a/tools/test.txt b/tools/test.txt
new file mode 100644 (file)
index 0000000..e69de29
index 6400a59365ad026e0be83bffab679dfa86139fbb..28f0e63a85136c1e00707390970b1ed4cb1f341a 100644 (file)
@@ -35,3 +35,16 @@ function run(time) {
 }
 
 
+
+
+function startupOnly(){
+
+
+  
+  var setupFile_ = encodeURIComponent(setupFile);
+  getdata("run.pl?startupOnly=true&runtime=0&setupFile="+setupFile_,"theConsole",false);
+  
+
+  
+  
+}
\ No newline at end of file
index b4d0a842275b4b011a8cf1309ddc7741f9841f91..0113da98d1cced3baaeb6a2eba23028084d2ba2a 100755 (executable)
@@ -187,13 +187,33 @@ sub init_html{
   print "</script>";
   # end of that story
 
-  print "<input type='button' value='show/hide debug output' onclick='toggleVis(\"theConsole\")'>";
+  print "<input type='button' value='show/hide debug output' onclick='toggleVis(\"theConsoleContainer\")'>";
+  print "<input type='button' value='show/hide advanced options' onclick='toggleVis(\"advancedOptionsContainer\")'>";
 
   print "</td></tr>";
   print "</table>";
 
   print "</p>";
+  
+  print "<div id='advancedOptionsContainer' class='stylishBox'>";
+  print "<div class='header'>advanced options</div>";
+  print "<div id='advancedOptions'>";
+  
+  print "<table><tr><td>";
+  print q%<input type='button' onClick='startupOnly();' value='startup only'
+  title="only program JTAG settings and start the sensors, take no data">%;
+#   print "</td><td>";
+  print "</td></tr></table>"; 
+  
+  
+  print "</div>";
+  print "</div>";
+  
+  
+  print "<div id='theConsoleContainer' class='stylishBox'>";
+  print "<div class='header'>debug output</div>";
   print "<div id='theConsole'>[the \"console\"]</div>";
+  print "</div>";
 
   print end_html;
 
@@ -279,13 +299,13 @@ sub print_sensorArea {
 
   print "<tr>";
   my $previewAreaId = "preview_".$sensorId;
-  print "<td class='previewArea'>";
+  print "<td class='previewArea stylishBox'>";
   print "<div class='header' title='$sensorDescription'>$sensorName (id=$sensorId)</div>";
   print "<div id='".$previewAreaId."' class='prevImgContainer'><div>[not run yet]</div></div>";
   
   print "</td>";
   $quickEditAreaId = "quickEdit_".$sensorId;
-  print "<td id='".$quickEditAreaId."' class='quickEditArea'>";
+  print "<td id='".$quickEditAreaId."' class='quickEditArea stylishBox'>";
   print_quickEditArea($sensorConfig);
   print "</td>";
   print "</tr>";