#include "diabolo.h" #include "bolo.h" #include "acqui.h" #include "carte_acqui.h" #include "trace.h" #include "synchro.h" //#define scroll_courbe 0 //---------------------------------- fenetre : lit_fifo ----------------------------------- void exec_trace_tout(int fen,int item,double valeur,...) { static double y[nb_max_bolo+1]; static double f1[nb_max_bolo+1]; static double f2[nb_max_bolo+1]; static double fmin,fmax; static int moyenne,ipas; static double fmini,fmaxi; int j; double x,c1,c2; switch(item) { case ouverture : gg->trace_ouvert=gg->trace_ouvert | 1 ; graph->ymin=-120; graph->ymax=120; graph->ypas=20; graph->xmax=500; graph->xpas=50; graph->taille_graduations=8; // graph->sans_image=1; // graph->flag_tracen=0; // for(j=0;jflag_tracen+=(1<periode_echantillonage; c1=c1/(1+c1); c2=2*3.14*fmaxi*gg->periode_echantillonage; c2=c2/(1+c2); printf("c1=%g c2=%g \n",c1,c2); break; case fermeture : gg->trace_ouvert=gg->trace_ouvert & (255-1); // enleve le 1 break; case t_raz : gg->temps_origine=gg->periode_echantillonage*(double)gg->temps_cntl; //break; case t_efface : efface(fen); break; case tache_de_fond : selectgra(fen); c1=2*3.14*fmini*gg->periode_echantillonage; c1=c1/(1+c1); c2=2*3.14*fmaxi*gg->periode_echantillonage; c2=c2/(1+c2); for(j=0;jymin+0.05*graph->ymax) + // + ( (gg->don.sync[sync_subscan]!=0) et (gg->don.sync[sync_scan]!=0) ) // * 0.9 * (graph->ymax-graph->ymin); x=gg->periode_echantillonage*(double)gg->temps_cntl-gg->temps_origine; // printf("x=%g x0=%g \n",x,x0); //if(x<0) {x0=gg->periode_echantillonage*(double)gg->temps_cntl;x=0;} montracen(fen,parametr.nb_bolo,x,y); // SANS LA SYNCHRO // montracen(fen,parametr.nb_bolo+1,x,y); // avec la synchro if(!(graph->scroll_courbe) && litD(fen,t_retour,0L) && ( (xxmin) ou (x>graph->xmax) )) { graph->xmax-=graph->xmin;graph->xmin=0; gg->temps_origine=gg->periode_echantillonage*(double)gg->temps_cntl; x=0; } for(j=0;j