#include "diabolo.h" #include "bolo.h" #include "acqui.h" #include "carte_acqui.h" #include "trace.h" #include "synchro.h" static double table_som[nb_max_bolo]; // table de moyennage static double table_moy[nb_max_bolo][max_points_DS]; // table de moyennage static double temps_per[max_points_DS]; // table de moyennage static int nombre_moy; // nombre de moyennage static int indice_per; static int flag_trace_moy; static double temps_origine_local; void exec_trace_1_per(int fen,int item,double valeur,...) { static double y[nb_max_bolo]; double decale; static int lissage=10,ipas=1; int j,k; double x; switch(item) { case ouverture : gg->trace_ouvert=gg->trace_ouvert | 2 ; selectgra(fen); graph->ymin=-120; graph->ymax=120; graph->ypas=20; graph->xmax=2; graph->xpas=0.5; graph->taille_graduations=7; // graph->flag_tracen=0; // for(j=0;jbolo_type[j]) graph->flag_tracen+=(1<=max_points_DS) synchro_periode=0; nombre_moy=0; ecritD(fen,tp_nb_moy,"0"); for(indice_per=0;indice_pertrace_ouvert=gg->trace_ouvert & (255-2); // enleve le 2 break; // case t_lissage : case t_lissage+1000 : lissage=valeur; break; case t_efface : if(!flag_trace_moy) flag_trace_moy=1; else flag_trace_moy=0; break; case ds_debut : if(synchro_periode>=max_points_DS) synchro_periode=0; flag_trace_moy=litD(fen,tp_moy,0L); decale=litD(fen,tp_decale,0L); lissage=litD(fen,tp_lissage,0L); if(lissage<1) {lissage=1;ecritD(fen,tp_lissage,"1");} // printf("debut avec flag_trace_moy=%d et nombre_moy=%d \n",flag_trace_moy,nombre_moy); if(flag_trace_moy) { if(nombre_moy) { efface(fen); for(j=0;jtemps_cntl; indice_per=0; for(j=0;j=max_points_DS) indice_per=max_points_DS-1; x=gg->periode_echantillonage*(double)(gg->temps_cntl-temps_origine_local); if(flag_trace_moy) for(j=0;j