This commit is contained in:
quentin.perret 2022-06-08 12:29:34 +02:00
parent 38366241a1
commit a8f1486e2c
3 changed files with 14 additions and 4 deletions

Binary file not shown.

View file

@ -41,6 +41,7 @@ int writeOneRawData(){
}
fclose(f);
cpt++;
sleep(0.004); //simul la freq ech
return 0;
}
else {
@ -48,13 +49,20 @@ int writeOneRawData(){
}
}
void simulateFlux(){
int simulateFlux(){
while(writeOneRawData()==0){
sleep(0.004);
if(cpt==nRows){
tFlag = 1;
}
while(tFlag == 1){
/*printf("max nRows");
cpt = 0;
tFlag = 0;
break;*/
}
}
}
int main(int argc , char argv[]){
simulateFlux();
printf("%d",cpt);
}

View file

@ -6,6 +6,8 @@
#include <time.h>
int cpt = 0;
int tFlag = 0;
int nRows = 1000;
typedef struct {
uint8_t octet1;