diff --git a/common/utils/SettingConfig.cpp b/common/utils/SettingConfig.cpp index 0fe0adf..f71cd39 100644 --- a/common/utils/SettingConfig.cpp +++ b/common/utils/SettingConfig.cpp @@ -25,6 +25,7 @@ CHANNEL_COUNT = getProperty("dev", "channelCount").toUInt(); SKIP_HEADER = getProperty("dev", "skipHeader").toUInt(); + MAX_COUNT = getProperty("dev", "maxCount").toUInt(); BASE_LOG_PATH = getProperty("log", "basePath").toString(); DELAY_ARR = getProperty("delay", "delayArr").toString().split(","); diff --git a/common/utils/SettingConfig.cpp b/common/utils/SettingConfig.cpp index 0fe0adf..f71cd39 100644 --- a/common/utils/SettingConfig.cpp +++ b/common/utils/SettingConfig.cpp @@ -25,6 +25,7 @@ CHANNEL_COUNT = getProperty("dev", "channelCount").toUInt(); SKIP_HEADER = getProperty("dev", "skipHeader").toUInt(); + MAX_COUNT = getProperty("dev", "maxCount").toUInt(); BASE_LOG_PATH = getProperty("log", "basePath").toString(); DELAY_ARR = getProperty("delay", "delayArr").toString().split(","); diff --git a/common/utils/SettingConfig.h b/common/utils/SettingConfig.h index 33502de..a774ba7 100644 --- a/common/utils/SettingConfig.h +++ b/common/utils/SettingConfig.h @@ -35,6 +35,7 @@ quint8 CHANNEL_COUNT; quint8 SKIP_HEADER; + quint16 MAX_COUNT; QString BASE_LOG_PATH; diff --git a/common/utils/SettingConfig.cpp b/common/utils/SettingConfig.cpp index 0fe0adf..f71cd39 100644 --- a/common/utils/SettingConfig.cpp +++ b/common/utils/SettingConfig.cpp @@ -25,6 +25,7 @@ CHANNEL_COUNT = getProperty("dev", "channelCount").toUInt(); SKIP_HEADER = getProperty("dev", "skipHeader").toUInt(); + MAX_COUNT = getProperty("dev", "maxCount").toUInt(); BASE_LOG_PATH = getProperty("log", "basePath").toString(); DELAY_ARR = getProperty("delay", "delayArr").toString().split(","); diff --git a/common/utils/SettingConfig.h b/common/utils/SettingConfig.h index 33502de..a774ba7 100644 --- a/common/utils/SettingConfig.h +++ b/common/utils/SettingConfig.h @@ -35,6 +35,7 @@ quint8 CHANNEL_COUNT; quint8 SKIP_HEADER; + quint16 MAX_COUNT; QString BASE_LOG_PATH; diff --git a/conf/config.ini b/conf/config.ini index 39ff360..c6be4d2 100644 --- a/conf/config.ini +++ b/conf/config.ini @@ -6,6 +6,7 @@ [dev] channelCount=16 skipHeader=5 +maxCount=86400 [log] basePath="/home/admin/Qt/ZXSSCJ-Release/PhaseCompAcq/logs/" diff --git a/common/utils/SettingConfig.cpp b/common/utils/SettingConfig.cpp index 0fe0adf..f71cd39 100644 --- a/common/utils/SettingConfig.cpp +++ b/common/utils/SettingConfig.cpp @@ -25,6 +25,7 @@ CHANNEL_COUNT = getProperty("dev", "channelCount").toUInt(); SKIP_HEADER = getProperty("dev", "skipHeader").toUInt(); + MAX_COUNT = getProperty("dev", "maxCount").toUInt(); BASE_LOG_PATH = getProperty("log", "basePath").toString(); DELAY_ARR = getProperty("delay", "delayArr").toString().split(","); diff --git a/common/utils/SettingConfig.h b/common/utils/SettingConfig.h index 33502de..a774ba7 100644 --- a/common/utils/SettingConfig.h +++ b/common/utils/SettingConfig.h @@ -35,6 +35,7 @@ quint8 CHANNEL_COUNT; quint8 SKIP_HEADER; + quint16 MAX_COUNT; QString BASE_LOG_PATH; diff --git a/conf/config.ini b/conf/config.ini index 39ff360..c6be4d2 100644 --- a/conf/config.ini +++ b/conf/config.ini @@ -6,6 +6,7 @@ [dev] channelCount=16 skipHeader=5 +maxCount=86400 [log] basePath="/home/admin/Qt/ZXSSCJ-Release/PhaseCompAcq/logs/" diff --git a/protocol/PhaseProtocolBM.cpp b/protocol/PhaseProtocolBM.cpp index ad930e1..0518f5a 100644 --- a/protocol/PhaseProtocolBM.cpp +++ b/protocol/PhaseProtocolBM.cpp @@ -41,7 +41,7 @@ dataObj->channelBeforeDelay.append(0.00); dataObj->channelData.append(0.00); dataObj->channelDataStr.append("0.00"); - } else + } else if (channelRawData > CALCULATE_OFFSET) { double phase = (channelRawData - CALCULATE_OFFSET) * CALCULATE_FACTOR; dataObj->channelActive.append("1"); @@ -49,6 +49,14 @@ dataObj->channelBeforeDelay.append(phase); dataObj->channelData.append(phase); // 暂时不加补偿值 dataObj->channelDataStr.append(QString::number(phase, 'f', 15)); + } else + { + double phase = (CALCULATE_OFFSET - channelRawData) * CALCULATE_FACTOR; + dataObj->channelActive.append("1"); + dataObj->rawPhaseDiffData.append(channelRawData - CALCULATE_OFFSET); + dataObj->channelBeforeDelay.append(phase); + dataObj->channelData.append(phase); // 暂时不加补偿值 + dataObj->channelDataStr.append(QString::number(phase, 'f', 15)); } }