problems changing from processing 1 to 2
in
Programming Questions
•
22 days ago
this is is a similair question to my last which has now been solved (i hope)
i recently downloaded a program for processing, unfortunately it was written for processing 1 and does not run properly on 2. the section i am having problems with is as follows:
scanGcode(FIND_LIMITS);
}
void findLimits(int i, int j){ // find the limits of the G code file
float tempPos;
switch(lines[j].charAt(i)) {
case('G'):
// println("found G at line " + j);
// println("with a "+ (int)getValue(j,i));
break;
case('X'):
// println("found X at line " + j);
// println("with a "+ getValue(j,i));
tempPos = getValue(j,i);
if(tempPos > XmaxPos){XmaxPos = tempPos; } // YatXmaxPos =
if(tempPos < XminPos)XminPos = tempPos;
break;
case('Y'):
// println("found Y at line " + j);
// println("with a "+ getValue(j,i));
tempPos = getValue(j,i);
if(tempPos > YmaxPos)YmaxPos = tempPos;
if(tempPos < YminPos)YminPos = tempPos;
break;
case('Z'):
// println("found Z at line " + j);
// println("with a "+ getValue(j,i));
tempPos = getValue(j,i);
if(tempPos > ZmaxPos)ZmaxPos = tempPos;
if(tempPos < ZminPos)ZminPos = tempPos;
break;
} // end of switch structure
}
i have seen this page
http://wiki.processing.org/w/Changes but i have not been able to fix the problem
i have no experience with processing and was hoping someone would be able to help me make this work with processing 2
Thanks in advance
1