Compare commits

...

2 commits

Author SHA1 Message Date
Aurélien Gauthier 98e11c2443 merge struct queue file and functions 2022-06-10 10:11:57 +02:00
Aurélien Gauthier 023b77aeba struct queue file and functions 2022-06-10 10:10:28 +02:00
4 changed files with 17 additions and 1 deletions

View file

@ -37,3 +37,15 @@ void writePowerData(double powerArray[], int nCol){
}
fclose(f);
}
void threadCalcul(){
while(stopFlag == false){
if(rawDataWriteFlag){
pthread_mutex_lock(&mutex);
while(power(nRow,nCol,period,timeBandwidth) == false){}
pthread_mutex_unlock(&mutex);
rawDataWriteFlag = true;
delay(10);
}
}
}

View file

@ -3,5 +3,7 @@
#include <stdint.h>
#include <stdlib.h>
bool writeFlag = 0;
void clearRawData(int N);
void writePowerData(double a[], int N);

View file

@ -1,5 +1,6 @@
#include <stdbool.h>
extern bool rawDataWriteFlag , stopFlag;
extern int nRow;
extern int nCol;
extern double freqEch;

View file

@ -6,6 +6,7 @@
#include "power.h"
#include "initialParameters.h"
bool rawDataWriteFlag = 0, stopFlag = 0;
int nRow = 100000;
int nCol = 9;
double freqEch = 250;