From 678acd6dc52aaf4313643727d90c0bba04c857a3 Mon Sep 17 00:00:00 2001 From: BigEd Date: Sat, 6 Nov 2010 17:55:36 +0000 Subject: [PATCH] URL handler: add requested signal names to logging set --- expertWires.js | 7 +++++-- macros.js | 19 +++++++++++++------ 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/expertWires.js b/expertWires.js index bd2607c..3cf1155 100644 --- a/expertWires.js +++ b/expertWires.js @@ -78,10 +78,11 @@ function setup(){ function setup_part2(){ frame = document.getElementById('frame'); statbox = document.getElementById('status'); - setupParams(); - updateExpertMode(expertMode); + // load the circuit before acting on URL parameters setupNodes(); setupTransistors(); + setupParams(); + updateExpertMode(expertMode); detectOldBrowser(); setStatus('loading graphics...'); setTimeout(setup_part3, 0); @@ -151,6 +152,8 @@ function setupParams(){ // user interface mode control if(name=="loglevel" && parseInt(value)!=NaN){ 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){ diff --git a/macros.js b/macros.js index 341dcda..9a76b55 100644 --- a/macros.js +++ b/macros.js @@ -157,7 +157,7 @@ function initChip(){ refresh(); cycle = 0; trace = Array(); - initLogbox(logThese); + updateLogList(); chipStatus(); if(ctrace)console.log('initChip done after', now()-start); } @@ -172,15 +172,22 @@ function signalSet(n){ return signals; } -function updateLogList(){ +function updateLogList(names){ // user supplied a list of signals, which we append to the set defined by loglevel logThese = signalSet(loglevel); - var tmplist = document.getElementById('LogThese').value.split(/[\s,]+/); - for(var i=0;i