From f4d1bfab77f8bfa9699759ba06e2e1fdfe63bb7a Mon Sep 17 00:00:00 2001 From: "haifeng.wang" Date: Mon, 14 Apr 2025 08:14:36 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8F=91=E9=80=81=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E4=BB=8E=E5=A4=A7=E7=AB=AF=E6=94=B9=E4=B8=BA=E5=B0=8F?= =?UTF-8?q?=E7=AB=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- User/uart_dtu.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/User/uart_dtu.c b/User/uart_dtu.c index b36193d..d4d4488 100644 --- a/User/uart_dtu.c +++ b/User/uart_dtu.c @@ -376,28 +376,26 @@ uint8_t pack_lora_send_data(gprs_data_t *pGprs, uint32_t totalSeconds) int i=0; uint16_t val = 0; Task_sendBuff[i++]=0x01; - Int2ByteS(Task_sendBuff, i, htons(dcBuff.sampleData.diff)); + Int2ByteS(Task_sendBuff, i, /*htons*/(dcBuff.sampleData.diff)); + i +=2 ; -// Int2ByteS(Task_sendBuff, i, htons(dcBuff.sampleData.pressure)); -// i += 2; -// Int2ByteS(Task_sendBuff, i, htons(dcBuff.sampleData.extTempr[0])); -// i += 2; - Int2ByteS(Task_sendBuff, i, htons(dcBuff.dtuData.batVoltage)); + + Int2ByteS(Task_sendBuff, i, /*htons*/(dcBuff.dtuData.batVoltage)); i += 2; // 版本号 Task_sendBuff[i++] = dcBuff.powerInfo.hardVer.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; - Int2ByteL(Task_sendBuff, i, htonl(dcBuff.configData.intervalTrans)); + Int2ByteL(Task_sendBuff, i, /*htonl*/(dcBuff.configData.intervalTrans)); i += 4; - Int2ByteS(Task_sendBuff, i, htons(dcBuff.configBottle.fullPct)); //、apex需要改为压强 + Int2ByteS(Task_sendBuff, i, /*htons*/(dcBuff.configBottle.fullPct)); //、apex需要改为压强 i += 2; - Int2ByteS(Task_sendBuff, i, htons(dcBuff.configBottle.emptyPct)); + Int2ByteS(Task_sendBuff, i, /*htons*/(dcBuff.configBottle.emptyPct)); i += 2; // // 压力报警上限