[bug]passing steps on URL was not working

This commit is contained in:
BigEd 2010-10-30 16:16:54 +00:00
parent e93c11ab20
commit c9443e6718
3 changed files with 11 additions and 11 deletions

View File

@ -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 {

View File

@ -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];
}
}

View File

@ -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();