fix wave save bugs
This commit is contained in:
parent
634b54f435
commit
e8ee09d976
@ -34,12 +34,11 @@ enum InteractiveCommand {
|
|||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
kUpgradeSuccess = 0, // 成功
|
kUpgradeSuccess = 0, // 成功
|
||||||
kUpgradeIndexError = 1, //包接收序号错误,要重试
|
kProductTypeMismatch = 1, // 包有问题,不再重试
|
||||||
kProductTypeMismatch = 2, // 包有问题,不再重试
|
kZigbeeHWMismatch = 2, // 包有问题,不再重试
|
||||||
kZigbeeHWMismatch = 3, // 包有问题,不再重试
|
kTransmitFileCrcError = 3, // 此返回值时,要重试
|
||||||
kTransmitFileCrcError = 4, // 此返回值时,要重试
|
kRecvDataLenError = 4, // 此返回值时,要重试
|
||||||
kRecvDataLenError = 5, // 此返回值时,要重试
|
kUpgradeDoneBefore = 5 // 当前就是这个版本,不需要升级了
|
||||||
kUpgradeDoneBefore = 6 // 当前就是这个版本,不需要升级了
|
|
||||||
} FirmFileCheckResult;
|
} FirmFileCheckResult;
|
||||||
// 无线传感器请求任务
|
// 无线传感器请求任务
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
|||||||
@ -1081,8 +1081,7 @@ void Uart::WriteDatFile(int sampleRate, std::string &strMeasurementID, int iChan
|
|||||||
id = id + strlen(buf);
|
id = id + strlen(buf);
|
||||||
strncpy(mqttData + id,",",1);
|
strncpy(mqttData + id,",",1);
|
||||||
id = id + 1;
|
id = id + 1;
|
||||||
}
|
}else{
|
||||||
else{
|
|
||||||
strncpy(mqttData + id ,buf,strlen(buf));
|
strncpy(mqttData + id ,buf,strlen(buf));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,6 +8,7 @@
|
|||||||
#include <boost/algorithm/string.hpp>
|
#include <boost/algorithm/string.hpp>
|
||||||
#include <zlog.h>
|
#include <zlog.h>
|
||||||
#include "common/common_func.hpp"
|
#include "common/common_func.hpp"
|
||||||
|
#include "minilzo/minilzo.h"
|
||||||
|
|
||||||
extern zlog_category_t* zct;
|
extern zlog_category_t* zct;
|
||||||
extern zlog_category_t* zbt;
|
extern zlog_category_t* zbt;
|
||||||
@ -83,7 +84,7 @@ bool Uart::ReadUpdatePackge(unsigned short shortAdd) {
|
|||||||
fread(buffer, sizeof(char), thisSize, pFile);
|
fread(buffer, sizeof(char), thisSize, pFile);
|
||||||
fclose(pFile);
|
fclose(pFile);
|
||||||
}
|
}
|
||||||
|
int r = lzo1x_1_compress(data, count, outdata, &new_len, NULL);
|
||||||
unsigned char Data[12] = {0x00};
|
unsigned char Data[12] = {0x00};
|
||||||
unsigned char size[4] = {0x00};
|
unsigned char size[4] = {0x00};
|
||||||
zlog_info(zct, "thisSize = %d", thisSize);
|
zlog_info(zct, "thisSize = %d", thisSize);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user