add flag
This commit is contained in:
parent
38366241a1
commit
a8f1486e2c
Binary file not shown.
|
@ -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(){
|
||||
while(writeOneRawData()==0){
|
||||
sleep(0.004);
|
||||
int simulateFlux(){
|
||||
while(writeOneRawData()==0){
|
||||
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);
|
||||
}
|
|
@ -6,6 +6,8 @@
|
|||
#include <time.h>
|
||||
|
||||
int cpt = 0;
|
||||
int tFlag = 0;
|
||||
int nRows = 1000;
|
||||
|
||||
typedef struct {
|
||||
uint8_t octet1;
|
||||
|
|
Loading…
Reference in a new issue