Skip to content

Commit

Permalink
Add CALC support to Byte
Browse files Browse the repository at this point in the history
  • Loading branch information
slominskir committed Jun 28, 2021
1 parent c94572c commit a241967
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/main/webapp/resources/widgets/ByteClass/widget.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,24 @@ jlab.wedm.BytePvObserverInit = function () {
$bits = $obj.find(".bit"),
index;

if (jlab.wedm.isCalcExpr(this.pvSet.ctrlPvExpr)) {
var pvs = [];
for (var i = 0; i < this.pvSet.ctrlPvs.length; i++) {
var name = this.pvSet.ctrlPvs[i],
val;

val = this.pvNameToValueMap[name];

if (typeof val === 'undefined') {
/*Still more PVs we need values from*/
return;
}
pvs.push(val);
}

value = jlab.wedm.evalCalcExpr(this.pvSet.ctrlPvExpr, pvs);
}

/*console.log("value: " + value);*/

//$(".ActiveByte[data-pv='" + this.pv + "']").text(value);
Expand Down

0 comments on commit a241967

Please sign in to comment.