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