From ef88fdeb9096f433e14d8e3c2b1a97423e2508bb Mon Sep 17 00:00:00 2001 From: Barry Silverman Date: Sun, 19 Sep 2010 03:02:26 -0400 Subject: [PATCH] Fixed console references for Firefox --- chipsim.js | 4 ++-- macros.js | 4 ++-- wires.js | 1 - 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/chipsim.js b/chipsim.js index ffa0f30..2156a90 100644 --- a/chipsim.js +++ b/chipsim.js @@ -35,7 +35,7 @@ function recalcNodeList(list){ list = recalclist; recalclist = new Array(); } - console.log(n,'looping...'); + if(ctrace) console.log(n,'looping...'); } function recalcNode(node, recalclist){ @@ -131,7 +131,7 @@ function getNodeValue(group){ if((n.state=='fl')&&(flstate==undefined)) flstate = 'fl'; if(n.state=='fh') flstate = 'fh'; } - if(flstate==undefined) console.log(group); + if(flstate==undefined && ctrace) console.log(group); return flstate; } diff --git a/macros.js b/macros.js index dcba25e..2526c18 100644 --- a/macros.js +++ b/macros.js @@ -104,7 +104,7 @@ function initChip(){ cycle = 0; trace = Array(); chipStatus(); - console.log('initChip done after', now()-start); + if(ctrace)console.log('initChip done after', now()-start); } function step(){ @@ -275,7 +275,7 @@ function chipStatus(){ ' clearIR:' + readBit('clearIR') + ' D1x1:' + readBit('D1x1'); setStatus(machine1 + "
" + machine2); - if (loglevel>2) { + if (loglevel>2 && ctrace) { console.log(machine1 + " " + machine2 + " " + machine3 + " " + machine4 + " " + machine5); } selectCell(ab); diff --git a/wires.js b/wires.js index f5b8a28..eac5040 100644 --- a/wires.js +++ b/wires.js @@ -115,7 +115,6 @@ function setupLayerVisibility(){ } function setupBackground(){ - console.log('starting setupBackground'); chipbg = document.getElementById('chipbg'); chipbg.width = 4000; chipbg.height = 4000;