恭喜,你发布的帖子
发布于 2020-09-25 14:08:32
1楼
这是写的脚本,但是转出来不对
int i,j,z,n;
BYTE tempByte[12],actByte[12];
float tempFloat[3],*tempF;
//读取原始数据
GetTagRawWait("456",actByte,12);
//颠倒数据中字节位置
j = 0;
for(i = 0; i < 12;i++)
{
if(i != 0 && i % 4 == 0)
{
j = j + 1;
}
z = i * (-1) + 3 + 8 *(j);
tempByte[i] = actByte[z];
printf("%d ",tempByte[i]);
}
for(n = 0;n<3;n++)
{
tempF =(float *)actByte;
tempFloat[0]= (float)(tempF);
printf("%f ",tempFloat[0]);
}
请填写推广理由:
分享
只看
楼主