281{
282
283
284
287 int res=0;
288 bool Found=false;
290 float Posx,Posy,Posz;
291 float VPosx,VPosy,VPosz;
292 float GPosx,GPosy,GPosz;
297 printf(
"Search path is generated with StepX=%f and StepY=%f\n",
StepX,
StepY);
301 {
302 if(kbhit()){getch();printf("Paused. Continue? (y/n)"); if(getchar()=='n') break;}
303 Posx=CenterX+
StepX*ix[v];
304 Posy=CenterY+
StepY*iy[v];
305 res=0;
306 while(!res)
307 {
308 if(kbhit()){getch();printf("Paused. Continue? (y/n)"); if(getchar()=='n') break;}
309 res=1;
314 }
315 if(!res){ printf("Move is not complete within timeout of 2sec! \n"); break;}
316 printf("Searching at (%f,%f).\n",Posx,Posy);
317
319 {
320 Found=true;
321
322
323
324 GPosx=Posx+VPosx;
325 GPosy=Posy+VPosy;
326
327 res=0;
328 while(!res)
329 {
330 if(kbhit()){getch();printf("Paused. Continue? (y/n)"); if(getchar()=='n') break;}
331 res=1;
336 }
337 if(!res){ printf("Move is not complete within timeout of 2sec! \n"); break;}
340 printf("Searching at (%f,%f).\n",GPosx,GPosy);
342
343
344 GPosx=GPosx+VPosx;
345 GPosy=GPosy+VPosy;
346
347 res=0;
348 while(!res)
349 {
350 if(kbhit()){getch();printf("Paused. Continue? (y/n)"); if(getchar()=='n') break;}
351 res=1;
356 }
357 if(!res){ printf("Move is not complete within timeout of 2sec! \n"); break;}
360 printf("Searching at (%f,%f).\n",GPosx,GPosy);
362
363
364 GPosx=GPosx+VPosx;
365 GPosy=GPosy+VPosy;
366
367
368 GPosz=VPosz;
370 if(!
X || !
Y || !
Z)
break;
374 break;
375 }
377 }
378 if(Found) printf("Mark found at global (%f,%f,%f)\n",GPosx,GPosy,GPosz);
379 delete ear;
380 delete [] ix;
381 delete [] iy;
382 return Found;
383}
Expr< UnaryOp< Fabs< T >, Expr< A, T, D >, T >, T, D > fabs(const Expr< A, T, D > &rhs)
Definition: UnaryOperators.hh:96
float GetPos()
Definition: AcqStage1.cxx:599
float StepY
Definition: AcqMarksScanner.h:53
bool SearchMarkFast(float *X=NULL, float *Y=NULL, float *Z=NULL)
Definition: AcqMarksScanner.cxx:210
float StepX
Definition: AcqMarksScanner.h:53
int SizeX
Definition: AcqOdyssey.h:168
void ShowImage(int N)
Definition: AcqOdyssey.cxx:263
int SizeY
Definition: AcqOdyssey.h:168
float PixelToMicronX
Definition: AcqOdyssey.h:178
Definition: EdbFiducial.h:134
int MakeSpiralPath(int n, int *x, int *y)
Definition: EdbFiducial.cxx:170