Compare commits
2 commits
46e02c1d6d
...
98e11c2443
Author | SHA1 | Date | |
---|---|---|---|
98e11c2443 | |||
023b77aeba |
|
@ -36,4 +36,16 @@ 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);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -3,5 +3,7 @@
|
|||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
bool writeFlag = 0;
|
||||
|
||||
void clearRawData(int N);
|
||||
void writePowerData(double a[], int N);
|
|
@ -1,5 +1,6 @@
|
|||
#include <stdbool.h>
|
||||
|
||||
extern bool rawDataWriteFlag , stopFlag;
|
||||
extern int nRow;
|
||||
extern int nCol;
|
||||
extern double freqEch;
|
||||
|
@ -7,4 +8,4 @@ extern double freqEch;
|
|||
extern int selectionCaptors[];
|
||||
extern int sizeSelectionArray;
|
||||
|
||||
extern bool flag;
|
||||
extern bool flag;
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
#include "power.h"
|
||||
#include "initialParameters.h"
|
||||
|
||||
bool rawDataWriteFlag = 0, stopFlag = 0;
|
||||
int nRow = 100000;
|
||||
int nCol = 9;
|
||||
double freqEch = 250;
|
||||
|
|
Loading…
Reference in a new issue