修改发送数据从大端改为小端
This commit is contained in:
parent
48ddf83d54
commit
f4d1bfab77
|
|
@ -376,28 +376,26 @@ uint8_t pack_lora_send_data(gprs_data_t *pGprs, uint32_t totalSeconds)
|
||||||
int i=0;
|
int i=0;
|
||||||
uint16_t val = 0;
|
uint16_t val = 0;
|
||||||
Task_sendBuff[i++]=0x01;
|
Task_sendBuff[i++]=0x01;
|
||||||
Int2ByteS(Task_sendBuff, i, htons(dcBuff.sampleData.diff));
|
Int2ByteS(Task_sendBuff, i, /*htons*/(dcBuff.sampleData.diff));
|
||||||
|
|
||||||
i +=2 ;
|
i +=2 ;
|
||||||
// Int2ByteS(Task_sendBuff, i, htons(dcBuff.sampleData.pressure));
|
|
||||||
// i += 2;
|
Int2ByteS(Task_sendBuff, i, /*htons*/(dcBuff.dtuData.batVoltage));
|
||||||
// Int2ByteS(Task_sendBuff, i, htons(dcBuff.sampleData.extTempr[0]));
|
|
||||||
// i += 2;
|
|
||||||
Int2ByteS(Task_sendBuff, i, htons(dcBuff.dtuData.batVoltage));
|
|
||||||
i += 2;
|
i += 2;
|
||||||
// 版本号
|
// 版本号
|
||||||
Task_sendBuff[i++] = dcBuff.powerInfo.hardVer.minor;
|
Task_sendBuff[i++] = dcBuff.powerInfo.hardVer.minor;
|
||||||
Task_sendBuff[i++] = dcBuff.powerInfo.softVer.minor;
|
Task_sendBuff[i++] = dcBuff.powerInfo.softVer.minor;
|
||||||
|
|
||||||
|
|
||||||
Int2ByteS(Task_sendBuff, i, htons(dcBuff.configData.intervalSample));
|
Int2ByteS(Task_sendBuff, i, /*htons*/(dcBuff.configData.intervalSample));
|
||||||
i += 2;
|
i += 2;
|
||||||
Int2ByteL(Task_sendBuff, i, htonl(dcBuff.configData.intervalTrans));
|
Int2ByteL(Task_sendBuff, i, /*htonl*/(dcBuff.configData.intervalTrans));
|
||||||
i += 4;
|
i += 4;
|
||||||
|
|
||||||
Int2ByteS(Task_sendBuff, i, htons(dcBuff.configBottle.fullPct)); //¡¢apexÐèÒª¸ÄΪѹǿ
|
Int2ByteS(Task_sendBuff, i, /*htons*/(dcBuff.configBottle.fullPct)); //、apex需要改为压强
|
||||||
i += 2;
|
i += 2;
|
||||||
|
|
||||||
Int2ByteS(Task_sendBuff, i, htons(dcBuff.configBottle.emptyPct));
|
Int2ByteS(Task_sendBuff, i, /*htons*/(dcBuff.configBottle.emptyPct));
|
||||||
i += 2;
|
i += 2;
|
||||||
|
|
||||||
// // 压力报警上限
|
// // 压力报警上限
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue