From 369a188ad9a2092d36a6d7f5c40e8c016242fa74 Mon Sep 17 00:00:00 2001 From: BigEd Date: Mon, 8 Nov 2010 09:03:13 +0000 Subject: [PATCH 1/3] use expertMode to suppress loglist actions in kiosk mode --- expertWires.js | 2 +- macros.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/expertWires.js b/expertWires.js index 3cf1155..85cc96e 100644 --- a/expertWires.js +++ b/expertWires.js @@ -52,7 +52,7 @@ var drawlayers = [true, true, true, true, true, true]; // some modes and parameters which can be passed in from the URL query var moveHereFirst; -var expertMode=false +var expertMode=true; var animateChipLayout = true; var userCode=[]; var userResetLow; diff --git a/macros.js b/macros.js index 9a76b55..81f8b54 100644 --- a/macros.js +++ b/macros.js @@ -157,7 +157,8 @@ function initChip(){ refresh(); cycle = 0; trace = Array(); - updateLogList(); + if(typeof expertMode != "undefined") + updateLogList(); chipStatus(); if(ctrace)console.log('initChip done after', now()-start); } From 3804eace6ea9d31faf68ae061e2dd2d427017b91 Mon Sep 17 00:00:00 2001 From: BigEd Date: Mon, 8 Nov 2010 09:04:47 +0000 Subject: [PATCH 2/3] simplify: expertMode is no longer a checkbox, just a static indicator --- expertWires.js | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/expertWires.js b/expertWires.js index 85cc96e..fe49071 100644 --- a/expertWires.js +++ b/expertWires.js @@ -82,7 +82,6 @@ function setup_part2(){ setupNodes(); setupTransistors(); setupParams(); - updateExpertMode(expertMode); detectOldBrowser(); setStatus('loading graphics...'); setTimeout(setup_part3, 0); @@ -154,8 +153,6 @@ function setupParams(){ updateLoglevel(value); } else if(name=="logmore" && value!=""){ updateLogList(value); - } else if(name=="expert" && value.indexOf("t")==0){ - updateExpertMode(true); } else if(name=="headlesssteps" && parseInt(value)!=NaN){ headlessSteps=parseInt(value); } else if(name=="graphics" && value.indexOf("f")==0){ @@ -346,15 +343,6 @@ function updateLoglevel(value){ initLogbox(logThese); } -function updateExpertMode(isOn){ - expertMode=true - document.getElementById('expertControlPanel').style.display = 'block'; - if(loglevel==0) - updateLoglevel(1); - if(chipLayoutIsVisible) - document.getElementById('layoutControlPanel').style.display = 'block'; -} - var chipsurround; function updateChipLayoutVisibility(isOn){ @@ -367,8 +355,7 @@ function updateChipLayoutVisibility(isOn){ // replace the Show Chip button with the chip graphics chipsurround=document.getElementById('chipsurround'); chipsurround.style.display = 'block'; - if(expertMode) - document.getElementById('layoutControlPanel').style.display = 'block'; + document.getElementById('layoutControlPanel').style.display = 'block'; document.getElementById('nochip').style.display = 'none'; // allow the browser to respond while we load the graphics setStatus('loading graphics...'); From d2a31398fdc868203041c1fe50b0b4aad04d4820 Mon Sep 17 00:00:00 2001 From: BigEd Date: Mon, 8 Nov 2010 09:14:18 +0000 Subject: [PATCH 3/3] [bug]repair expert mode - had removed too much --- expertWires.js | 9 +++++++++ macros.js | 1 - 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/expertWires.js b/expertWires.js index fe49071..087be7e 100644 --- a/expertWires.js +++ b/expertWires.js @@ -82,6 +82,7 @@ function setup_part2(){ setupNodes(); setupTransistors(); setupParams(); + setupExpertMode(); detectOldBrowser(); setStatus('loading graphics...'); setTimeout(setup_part3, 0); @@ -343,6 +344,14 @@ function updateLoglevel(value){ initLogbox(logThese); } +function setupExpertMode(isOn){ + document.getElementById('expertControlPanel').style.display = 'block'; + if(loglevel==0) + updateLoglevel(1); + if(chipLayoutIsVisible) + document.getElementById('layoutControlPanel').style.display = 'block'; +} + var chipsurround; function updateChipLayoutVisibility(isOn){ diff --git a/macros.js b/macros.js index 81f8b54..8b922e0 100644 --- a/macros.js +++ b/macros.js @@ -188,7 +188,6 @@ function updateLogList(names){ if(typeof busToString(names[i]) != "undefined") logThese.push(names[i]); } -console.log(logThese); initLogbox(logThese); }