]> jspc29.x-matter.uni-frankfurt.de Git - daqtools.git/commitdiff
*** empty log message ***
authorhadeshyp <hadeshyp>
Mon, 15 Oct 2012 11:39:11 +0000 (11:39 +0000)
committerhadeshyp <hadeshyp>
Mon, 15 Oct 2012 11:39:11 +0000 (11:39 +0000)
cts/htdocs/thresh/styles.css
cts/htdocs/thresh/threshold.htm

index 0b06ac0d93e53607e4adde51c89b5a3fa5580aa0..fc212f6b2dc2a6bfb61f7ab2f5dc930323689a63 100644 (file)
@@ -27,7 +27,7 @@ div#bar1 {
   }
   
 div#bar1 div {
-  width:66000px;
+  width:66500px;
   height:0px;
 }
 
index 899a6689ce059c5185b9aa69a3ba4ca315b009d4..8743c5d8e9e12f8b6bb11ec32afbddbece64819c 100644 (file)
@@ -14,6 +14,7 @@
 <tr><td>DAC-Chain:<td><select id="form_chain" name="chain"><option>0<option>1<option>2<option>3<option>4<option>5<option>6<option>7<option>8<option>9<option>10<option>11<option>12<option>13<option>14<option>15</select>
 <tr><td>Channel<td><select id="form_channel" name="channel"><option>0<option>1<option>2<option>3<option>4<option>5<option>6<option>7<option>8<option>9<option>10<option>11<option>12<option>13<option>14<option>15</select>
 <tr><td>Update Interval (ms)<td><input type="text" id="form_rate" name="rate" maxlength="5" value="500">
+<tr><td>Reference (mV)<td><input type="text" id="form_ref" name="reference" maxlength="4" value="2500">
 <tr><td><td><input type="button" onClick="setValues()" value="OK">
 </table>
 </form>
@@ -42,14 +43,16 @@ var updaterate = document.getElementById("form_rate").value;
 var board      = document.getElementById("form_board").value;
 var chain      = 1<<document.getElementById("form_chain").value;
 var chan       = document.getElementById("form_channel").value;
+var reference  = document.getElementById("form_ref").value;
 var updateTask = setInterval("doUpdate()",updaterate);
 
 
 function update(bar,scale) {
   value[bar-1] = Math.round(document.getElementById("bar"+bar).scrollLeft/scale);
   document.getElementById("bar"+bar+"value").innerHTML = value[bar-1];
-  document.getElementById("total").innerHTML = value[0]+value[1];
-  command = 0x00300000 + (chan << 16) + ((value[0]+value[1]) & 0xFFFF);
+  total = Math.min(value[0]+value[1],65535);
+  document.getElementById("total").innerHTML = total+" - "+Math.round(total/655.36*reference)/100+" mV";
+  command = 0x00300000 + (chan << 16) + (total);
   command = command.toString(16);
   dataWaiting = 1;
   if(updateTask == 0) {