| Lines 61-62 were replaced by lines 61-63 |
| - var magselect = ""; |
| - var dilselect = "DIL3/DIL4"; |
| + var can; |
| + var vti; |
| + var dil; |
| Lines 64-67 were replaced by lines 65-67 |
| - function getinp(name) { |
| - value = parseInt(document.getElementById(name).value); |
| - return value; |
| - } |
| + var vtiselect = ""; |
| + var dilselect = "DIL3/DIL4"; |
| + var motor = 0; |
| Lines 75-84 were replaced by line 75 |
| - var top = getinp("top"); |
| - var bot = getinp("bot"); |
| - var base = getinp("base"); |
| - var win = getinp("win"); |
| - var winbase = getinp("winbase"); |
| - var sealmix = getinp("sealmix"); |
| - var gapmin = getinp("gapmin"); |
| - var gapmax = getinp("gapmax"); |
| - var motor = getinp("motor"); |
| - var edge = getinp("edge"); |
| + var edge = vti.edge; |
| Lines 88-89 were replaced by lines 79-80 |
| - var vtibot = getinp("vtibot") + motor; |
| - var sample = getinp("sample") + motor; |
| + var vtibot = vti.vtibot + motor; |
| + var sample = vti.sample + motor; |
| Lines 91-93 were replaced by lines 82-84 |
| - var bottom = top + bot - sealmix; |
| - var winmin = bottom + gapmax - winbase - win; |
| - var winmax = bottom + gapmin - winbase; |
| + var bottom = top + bot - dil.sealmix; |
| + var winmin = bottom + can.gapmax - can.winbase - can.win; |
| + var winmax = bottom + can.gapmin - can.winbase; |
| Line 96 was replaced by lines 87-88 |
| - var minsam = top + Math.max(-edge, bot - vtibot) + sample - sealmix + gapmax; |
| + var minsam = can.top + Math.max(-edge, can.bot - vtibot) + sample - dil.sealmix + can.gapmax; |
| + putout("edge", "<" + edge); |
| Lines 98-99 were replaced by lines 90-91 |
| - var minsam = bottom + sample - vtibot + gapmax; |
| - document.getElementById("edge").value = ""; |
| + var minsam = bottom + sample - vtibot + can.gapmax; |
| + putout("edge", ""); |
| Line 101 was replaced by line 93 |
| - var extmax = bottom - base + gapmin; |
| + var extmax = bottom - can.base + can.gapmin; |
| Lines 103-106 were replaced by lines 95-97 |
| - if (win > 0) { |
| - putout("winmin", winmin); |
| - putout("center", center); |
| - putout("winmax", winmax); |
| + if (can.win > 0) { |
| + putout("winmin", ">" + winmin); |
| + putout("winmax", "<" + winmax); |
| Lines 108-110 were replaced by lines 99-100 |
| - putout("winmin", "n/a"); |
| - putout("center", "n/a"); |
| - putout("winmax", "n/a"); |
| + putout("winmin", ""); |
| + putout("winmax", ""); |
| Line 112 was replaced by line 102 |
| - putout("minsam", minsam); |
| + putout("sample", sample); |
| Lines 114-120 were replaced by line 104 |
| - putout("sample_plus", sample); |
| - if (edge) { |
| - putout("edge_plus", edge); |
| - } else { |
| - putout("edge_plus", "n/a"); |
| - } |
| - putout("vtibot_plus", vtibot); |
| + putout("vtibot", vtibot); |
| Removed line 122 |
| - var motor = getinp("motor"); |
| Line 124 was replaced by line 107 |
| - document.getElementById("title").innerHTML = dilselect + " in " + magselect + " with sample rotator"; |
| + document.getElementById("title").innerHTML = dilselect + " in " + vtiselect + " with sample rotator"; |
| Line 126 was replaced by line 109 |
| - document.getElementById("title").innerHTML = dilselect + " in " + magselect + " without sample rotator"; |
| + document.getElementById("title").innerHTML = dilselect + " in " + vtiselect + " without sample rotator"; |
| Line 131 was replaced by line 114 |
| - function setmag(name) { |
| + function setvti(name) { |
| Lines 133-134 were replaced by lines 116-118 |
| - magselect = name; |
| - var can = cans[dilselect][name]; |
| + vtiselect = name; |
| + |
| + can = cans[dilselect][name]; |
| Removed lines 137-138 |
| - console.log(property); |
| - document.getElementById(property).value = can[property]; |
| Line 142 was replaced by line 124 |
| - var vti = vtis[name]; |
| + vti = vtis[name]; |
| Removed line 144 |
| - console.log(property); |
| Line 153 was replaced by line 134 |
| - var dil = dils[dilselect]; |
| + dil = dils[dilselect]; |
| Line 158 was replaced by line 139 |
| - document.getElementById(property).value = dil[property]; |
| + document.getElementById(property).innerHTML = dil[property]; |