-
Notifications
You must be signed in to change notification settings - Fork 0
/
fetchdatathread.cpp
48 lines (43 loc) · 1.52 KB
/
fetchdatathread.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#include "fetchdatathread.h"
extern RVP900 rvp9;//rvp9控制对象
/*构造函数*/
FetchDataThread::FetchDataThread()
{
threadFlag = false;
}
void FetchDataThread::run() {
while (threadFlag) {
//rvp9.PROC();
int i=0;
if (rvp9.PROC() != RVP_NO_ERR) {
threadFlag = false;
break;
}
//取得tag数据
memcpy(rvp9.binsTAGBuff,rvp9.outbuff,8);
// //取得dBZ数据
// memcpy(rvp9.binsZBuff,rvp9.outbuff+8,rvp9.lrmskBinsNum);
// //取得dBT数据
// memcpy(rvp9.binsTBuff,rvp9.outbuff+rvp9.lrmskBinsNum+8,rvp9.lrmskBinsNum);
// //取得V数据
// memcpy(rvp9.binsVBuff,rvp9.outbuff+2*rvp9.lrmskBinsNum+8,rvp9.lrmskBinsNum);
// //取得W数据
// memcpy(rvp9.binsWBuff,rvp9.outbuff+3*rvp9.lrmskBinsNum+8,rvp9.lrmskBinsNum);
//计算出平均每个像素占多少个库
float numPerPixl = rvp9.lrmskBinsNum / sectorWidth;
int inumPerPixl = numPerPixl;
//将数据均分到显示区域中
for(i=0;i< sectorWidth;i++){
rvp9.binsZBuff[i] = rvp9.outbuff[8+i*inumPerPixl];
}
for(i=0;i< sectorWidth;i++){
rvp9.binsTBuff[i] = rvp9.outbuff[8+rvp9.lrmskBinsNum+i*inumPerPixl];
}
for(i=0;i< sectorWidth;i++){
rvp9.binsVBuff[i] = rvp9.outbuff[8+2*rvp9.lrmskBinsNum+i*inumPerPixl];
}
for(i=0;i< sectorWidth;i++){
rvp9.binsWBuff[i] = rvp9.outbuff[8+3*rvp9.lrmskBinsNum+i*inumPerPixl];
}
}
}