diff --git a/expertWires.js b/expertWires.js index bcd24b7..9dbdb6e 100644 --- a/expertWires.js +++ b/expertWires.js @@ -57,7 +57,7 @@ var animateChipLayout = true; var userCode=[]; var userResetLow; var userResetHigh; -var userSteps=1000; +var headlessSteps=1000; var testprogram=[]; var testprogramAddress; @@ -126,6 +126,8 @@ function setupParams(){ updateExpertMode(true); } else if(name=="graphics" && value.indexOf("f")==0){ updateChipLayoutVisibility(false); + } else if(name=="headlesssteps" && parseInt(value)!=NaN){ + headlessSteps=parseInt(value); } else // place the graphics window at a point of interest if(name=="panx" && parseInt(value)!=NaN){ @@ -148,7 +150,7 @@ function setupParams(){ // run a test program, and optionally check against a golden checksum if(name=="steps" && parseInt(value)!=NaN){ userSteps=parseInt(value); -// running=true; + running=true; } else if(name=="checksum" && parseInt(value,16)!=NaN){ goldenChecksum=(0x100000000+parseInt(value,16)).toString(16).slice(-8); } else { diff --git a/kioskWires.js b/kioskWires.js index 14df22d..ccf55ff 100644 --- a/kioskWires.js +++ b/kioskWires.js @@ -24,7 +24,6 @@ var centerx=300, centery=300; var zoom=1; var dragMouseX, dragMouseY, moved; var statbox; -var userSteps; var animateChipLayout = true; var userCode=[]; var userResetLow; @@ -195,4 +194,3 @@ function setChipStyle(props){ hitbuffer.style[i] = props[i]; } } - diff --git a/macros.js b/macros.js index bf2a7e5..236a933 100644 --- a/macros.js +++ b/macros.js @@ -52,12 +52,12 @@ function loadProgram(){ } function go(){ -// if(userSteps!=undefined){ -// if(--userSteps==0){ -// running=false; -// userSteps=undefined; -// } -// } + if(userSteps!=undefined){ + if(--userSteps==0){ + running=false; + userSteps=undefined; + } + } if(running) { step(); setTimeout(go, 0); // schedule the next poll @@ -386,7 +386,7 @@ function chipStatus(){ } function goFor(){ - var n = userSteps; + var n = headlessSteps; estimatedHz1(); while(--n){ halfStep();