修复MQTT发送数据bug

This commit is contained in:
zhangsheng 2025-05-13 18:27:34 +08:00
parent 149637d97a
commit 6f5364ee38
4 changed files with 5 additions and 3 deletions

View File

@ -68,6 +68,7 @@
"stop_token": "cpp", "stop_token": "cpp",
"thread": "cpp", "thread": "cpp",
"cfenv": "cpp", "cfenv": "cpp",
"typeindex": "cpp" "typeindex": "cpp",
"xstring": "cpp"
} }
} }

BIN
Cidn-SH

Binary file not shown.

View File

@ -24,8 +24,8 @@ enum enumZigBeeTransmitStatus {
#define Q4G_MODULE #define Q4G_MODULE
//#define WIFI_MODULE //#define WIFI_MODULE
//#define NR5G_MEIGE //#define NR5G_MEIGE
//#define G2UL_GATEWAY #define G2UL_GATEWAY
#define IMX6UL_GATEWAY //#define IMX6UL_GATEWAY
class GlobalConfig class GlobalConfig
{ {

View File

@ -3968,6 +3968,7 @@ void Uart::WriteDatFile(int sampleRate,string& strMeasurementID,int iChannel,std
LOG_INFO( " vecData.size : %d,start \n", vecData.size()); LOG_INFO( " vecData.size : %d,start \n", vecData.size());
int id = 0; int id = 0;
char buf[33] = {0x00}; char buf[33] = {0x00};
memset(mqttData, 0x00, sizeof(mqttData));
float mean = pCalculation->mean(vecData); float mean = pCalculation->mean(vecData);
float frTemp; float frTemp;
for (size_t i = 0; i < vecData.size(); i++) { for (size_t i = 0; i < vecData.size(); i++) {