diff --git a/index.html b/index.html index 1e83507..8ff5a2f 100644 --- a/index.html +++ b/index.html @@ -70,6 +70,15 @@ bottom : 9.6%; right : 10%; z-index:1001; + } + + #InflectorInfo{ + color: black; + position:absolute; + font-size: 15px; + bottom : 19%; + right : 10.1%; + z-index:1001; } #TandemInfo{ @@ -79,6 +88,20 @@ bottom : 35%; right : 10%; z-index:1001; + } + #DipoleInfo{ + color: black; + position:absolute; + font-size: 15px; + z-index:1001; + } + #SwitchInfo{ + color: black; + position:absolute; + font-size: 15px; + top : 15%; + left : 40%; + z-index:1001; } #footnote{ @@ -101,6 +124,7 @@
+ @@ -170,36 +194,52 @@ function GetBeamSetting(){ client.send(); } - - function BeamSettings(){ GetBeamSetting(); //format beamInfo - let beamKEA = beamEnergy/parseFloat(beamMass); + let beamKEA = beamEnergy/parseFloat(beamMass);'42%' let beamInfo = ""+ beamMass + "" + Sym + "("+ beamCharge + "+) " + beamKEA.toFixed(2) + " MeV/u"; document.getElementById("BeamInfo").innerHTML = beamInfo; //srouce info document.getElementById("SrcInfo").innerHTML = preAccel + " kV"; + //inflector info + document.getElementById("InflectorInfo").innerHTML = inflector + " A"; + //tadem info document.getElementById("TandemInfo").innerHTML = TandemPot + " MV"; destination = beam_Line; - EnableDetector(); - lineMotion(); + //Dipole info + if( beam_Line == 'RESOLUT'){ + document.getElementById("DipoleInfo").style.left = targetRoom2.d2.entracePos[0]-80 + 'px'; + document.getElementById("DipoleInfo").style.top = targetRoom2.d2.entracePos[1]-50 + 'px'; + }else{ + document.getElementById("DipoleInfo").style.left = targetRoom1.dipole.entracePos[0]-80 + 'px'; + document.getElementById("DipoleInfo").style.top = targetRoom1.dipole.entracePos[1]-50 + 'px'; + } + document.getElementById("DipoleInfo").innerHTML = dipoleField + " G"; + //Switching magnet info + if( beam_Line == 'RESOLUT'){ + document.getElementById("SwitchInfo").style.left = targetRoom2.fan2.entracePos[0]-80 + 'px'; + document.getElementById("SwitchInfo").style.top = targetRoom2.fan2.entracePos[1] + 'px'; + }else{ + document.getElementById("SwitchInfo").style.left = targetRoom1.fan.entracePos[0]-80 + 'px'; + document.getElementById("SwitchInfo").style.top = targetRoom1.fan.entracePos[1] + 'px'; + } + document.getElementById("SwitchInfo").innerHTML = SwitchMagnet + " A"; + + EnableDetector(); } BeamSettings(); setInterval(BeamSettings, updateTime * 60 * 1000); - - - - +lineMotion();