From d47d6fcc4724dcd0cfed2f165f52770d4e586bce Mon Sep 17 00:00:00 2001 From: Jan Michel Date: Sat, 24 Sep 2016 19:31:39 +0200 Subject: [PATCH] add option for setting thresholds on DiRich and other internal registers --- web/htdocs/thresh/threshold.htm | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/web/htdocs/thresh/threshold.htm b/web/htdocs/thresh/threshold.htm index 5b92038..ac45354 100644 --- a/web/htdocs/thresh/threshold.htm +++ b/web/htdocs/thresh/threshold.htm @@ -14,8 +14,8 @@
Configuration
Board
DAC-Chain -
Channel -
Board Type +
Channel +
Board Type
Update Interval (ms)
Reference (mV)
Last read @@ -77,8 +77,13 @@ function update(bar,scale) { document.getElementById("bar"+bar+"value").innerHTML = value[bar-1]; total = Math.min(value[0]+value[1],65535); document.getElementById("total").innerHTML = total+" - 0x"+total.toString(16)+" - "+Math.round(total/655.36*reference)/100+" mV"; - command = (type << 20) + (chan << 16) + (total); - command = command.toString(16); + if(type != 0) { + command = (type << 20) + (chan << 16) + (total); + command = command.toString(16); + } + else { + command = total.toString(16); + } if(wasRead == 0) { dataWaiting = 1; if(updateTask == 0) { @@ -93,7 +98,14 @@ function update(bar,scale) { function doUpdate() { if(dataWaiting) { - cmdstring = "../commands/put.pl?"+board+"-d400-"+command+"-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-"+(1<